Changes in uspace/lib/c/arch/ppc32/src/fibril.S [b66cc97:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ppc32/src/fibril.S
rb66cc97 r9d58539 29 29 .text 30 30 31 #include <abi/asmtool.h> 31 .global context_save 32 .global context_restore 33 32 34 #include <libarch/regname.h> 33 #include <libarch/ fibril_context.h>35 #include <libarch/context_offset.h> 34 36 35 FUNCTION_BEGIN(context_save) 36 stw sp, CONTEXT_OFFSET_SP(r3) 37 stw r2, CONTEXT_OFFSET_TLS(r3) 38 stw r13, CONTEXT_OFFSET_R13(r3) 39 stw r14, CONTEXT_OFFSET_R14(r3) 40 stw r15, CONTEXT_OFFSET_R15(r3) 41 stw r16, CONTEXT_OFFSET_R16(r3) 42 stw r17, CONTEXT_OFFSET_R17(r3) 43 stw r18, CONTEXT_OFFSET_R18(r3) 44 stw r19, CONTEXT_OFFSET_R19(r3) 45 stw r20, CONTEXT_OFFSET_R20(r3) 46 stw r21, CONTEXT_OFFSET_R21(r3) 47 stw r22, CONTEXT_OFFSET_R22(r3) 48 stw r23, CONTEXT_OFFSET_R23(r3) 49 stw r24, CONTEXT_OFFSET_R24(r3) 50 stw r25, CONTEXT_OFFSET_R25(r3) 51 stw r26, CONTEXT_OFFSET_R26(r3) 52 stw r27, CONTEXT_OFFSET_R27(r3) 53 stw r28, CONTEXT_OFFSET_R28(r3) 54 stw r29, CONTEXT_OFFSET_R29(r3) 55 stw r30, CONTEXT_OFFSET_R30(r3) 56 stw r31, CONTEXT_OFFSET_R31(r3) 37 context_save: 38 CONTEXT_SAVE_ARCH_CORE r3 57 39 58 40 mflr r4 59 stw r4, CONTEXT_OFFSET_PC(r3)41 stw r4, OFFSET_PC(r3) 60 42 61 43 mfcr r4 62 stw r4, CONTEXT_OFFSET_CR(r3)44 stw r4, OFFSET_CR(r3) 63 45 64 46 # context_save returns 1 65 47 li r3, 1 66 48 blr 67 FUNCTION_END(context_save)68 49 69 FUNCTION_BEGIN(context_restore) 70 lwz sp, CONTEXT_OFFSET_SP(r3) 71 lwz r2, CONTEXT_OFFSET_TLS(r3) 72 lwz r13, CONTEXT_OFFSET_R13(r3) 73 lwz r14, CONTEXT_OFFSET_R14(r3) 74 lwz r15, CONTEXT_OFFSET_R15(r3) 75 lwz r16, CONTEXT_OFFSET_R16(r3) 76 lwz r17, CONTEXT_OFFSET_R17(r3) 77 lwz r18, CONTEXT_OFFSET_R18(r3) 78 lwz r19, CONTEXT_OFFSET_R19(r3) 79 lwz r20, CONTEXT_OFFSET_R20(r3) 80 lwz r21, CONTEXT_OFFSET_R21(r3) 81 lwz r22, CONTEXT_OFFSET_R22(r3) 82 lwz r23, CONTEXT_OFFSET_R23(r3) 83 lwz r24, CONTEXT_OFFSET_R24(r3) 84 lwz r25, CONTEXT_OFFSET_R25(r3) 85 lwz r26, CONTEXT_OFFSET_R26(r3) 86 lwz r27, CONTEXT_OFFSET_R27(r3) 87 lwz r28, CONTEXT_OFFSET_R28(r3) 88 lwz r29, CONTEXT_OFFSET_R29(r3) 89 lwz r30, CONTEXT_OFFSET_R30(r3) 90 lwz r31, CONTEXT_OFFSET_R31(r3) 50 51 context_restore: 52 CONTEXT_RESTORE_ARCH_CORE r3 91 53 92 lwz r4, CONTEXT_OFFSET_CR(r3)54 lwz r4, OFFSET_CR(r3) 93 55 mtcr r4 94 56 95 lwz r4, CONTEXT_OFFSET_PC(r3)57 lwz r4, OFFSET_PC(r3) 96 58 mtlr r4 97 59 … … 99 61 li r3, 0 100 62 blr 101 FUNCTION_END(context_restore)
Note:
See TracChangeset
for help on using the changeset viewer.