Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ppc32/src/fibril.S

    ra35a3d8 rb4f1171  
    3333#include <libarch/fibril_context.h>
    3434
    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)
     35FUNCTION_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)
    5757
    5858        mflr r4
    59         stw r4, CONTEXT_OFFSET_PC(r3)
     59        stw r4, __CONTEXT_OFFSET_PC(r3)
    6060
    6161        mfcr r4
    62         stw r4, CONTEXT_OFFSET_CR(r3)
     62        stw r4, __CONTEXT_OFFSET_CR(r3)
    6363
    64         # __setjmp returns 0
     64        # __context_save returns 0
    6565        li r3, 0
    6666        blr
    67 FUNCTION_END(__setjmp)
     67FUNCTION_END(__context_save)
    6868
    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)
     69FUNCTION_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)
    9191
    92         lwz r5, CONTEXT_OFFSET_CR(r3)
     92        lwz r5, __CONTEXT_OFFSET_CR(r3)
    9393        mtcr r5
    9494
    95         lwz r5, CONTEXT_OFFSET_PC(r3)
     95        lwz r5, __CONTEXT_OFFSET_PC(r3)
    9696        mtlr r5
    9797
    98         # __longjmp returns second argument
     98        # __context_restore returns second argument
    9999        mr r3, r4
    100100        blr
    101 FUNCTION_END(__longjmp)
     101FUNCTION_END(__context_restore)
Note: See TracChangeset for help on using the changeset viewer.