Changes in uspace/lib/c/arch/ppc32/src/fibril.S [a35a3d8:b4f1171] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ppc32/src/fibril.S
ra35a3d8 rb4f1171 33 33 #include <libarch/fibril_context.h> 34 34 35 FUNCTION_BEGIN(__ setjmp)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)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) 57 57 58 58 mflr r4 59 stw r4, CONTEXT_OFFSET_PC(r3)59 stw r4, __CONTEXT_OFFSET_PC(r3) 60 60 61 61 mfcr r4 62 stw r4, CONTEXT_OFFSET_CR(r3)62 stw r4, __CONTEXT_OFFSET_CR(r3) 63 63 64 # __ setjmpreturns 064 # __context_save returns 0 65 65 li r3, 0 66 66 blr 67 FUNCTION_END(__ setjmp)67 FUNCTION_END(__context_save) 68 68 69 FUNCTION_BEGIN(__ longjmp)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)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) 91 91 92 lwz r5, CONTEXT_OFFSET_CR(r3)92 lwz r5, __CONTEXT_OFFSET_CR(r3) 93 93 mtcr r5 94 94 95 lwz r5, CONTEXT_OFFSET_PC(r3)95 lwz r5, __CONTEXT_OFFSET_PC(r3) 96 96 mtlr r5 97 97 98 # __ longjmpreturns second argument98 # __context_restore returns second argument 99 99 mr r3, r4 100 100 blr 101 FUNCTION_END(__ longjmp)101 FUNCTION_END(__context_restore)
Note:
See TracChangeset
for help on using the changeset viewer.