Changes in uspace/lib/c/arch/ppc32/src/fibril.S [9d58539:b66cc97] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ppc32/src/fibril.S
r9d58539 rb66cc97 29 29 .text 30 30 31 .global context_save 32 .global context_restore 31 #include <abi/asmtool.h> 32 #include <libarch/regname.h> 33 #include <libarch/fibril_context.h> 33 34 34 #include <libarch/regname.h> 35 #include <libarch/context_offset.h> 36 37 context_save: 38 CONTEXT_SAVE_ARCH_CORE r3 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) 39 57 40 58 mflr r4 41 stw r4, OFFSET_PC(r3)59 stw r4, CONTEXT_OFFSET_PC(r3) 42 60 43 61 mfcr r4 44 stw r4, OFFSET_CR(r3)62 stw r4, CONTEXT_OFFSET_CR(r3) 45 63 46 64 # context_save returns 1 47 65 li r3, 1 48 66 blr 67 FUNCTION_END(context_save) 49 68 50 51 context_restore: 52 CONTEXT_RESTORE_ARCH_CORE r3 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) 53 91 54 lwz r4, OFFSET_CR(r3)92 lwz r4, CONTEXT_OFFSET_CR(r3) 55 93 mtcr r4 56 94 57 lwz r4, OFFSET_PC(r3)95 lwz r4, CONTEXT_OFFSET_PC(r3) 58 96 mtlr r4 59 97 … … 61 99 li r3, 0 62 100 blr 101 FUNCTION_END(context_restore)
Note:
See TracChangeset
for help on using the changeset viewer.