libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / system / libroot / posix / arch / ppc / sigsetjmp.S
blob91585255d11ebef4fb9391bab38267e4518ab3a9
1 /* 
2  * Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>. All rights
3  * reserved. Distributed under the terms of the Haiku License.
4  */
6 #include "setjmp_internal.h"
8 /* int sigsetjmp(jmp_buf buffer, int saveMask) */
9 FUNCTION(__sigsetjmp):
10 FUNCTION(sigsetjmp):
11         // r3: buffer, r4: saveMask
13         // store non-volatile general purpose registers
14         stw             %r1, JMP_REGS_R1(3)
15         stw             %r2, JMP_REGS_R2(3)
16         stw             %r13, JMP_REGS_R13(3)
17         stw             %r14, JMP_REGS_R14(3)
18         stw             %r15, JMP_REGS_R15(3)
19         stw             %r16, JMP_REGS_R16(3)
20         stw             %r17, JMP_REGS_R17(3)
21         stw             %r18, JMP_REGS_R18(3)
22         stw             %r19, JMP_REGS_R19(3)
23         stw             %r20, JMP_REGS_R20(3)
24         stw             %r21, JMP_REGS_R21(3)
25         stw             %r22, JMP_REGS_R22(3)
26         stw             %r23, JMP_REGS_R23(3)
27         stw             %r24, JMP_REGS_R24(3)
28         stw             %r25, JMP_REGS_R25(3)
29         stw             %r26, JMP_REGS_R26(3)
30         stw             %r27, JMP_REGS_R27(3)
31         stw             %r28, JMP_REGS_R28(3)
32         stw             %r29, JMP_REGS_R29(3)
33         stw             %r30, JMP_REGS_R30(3)
34         stw             %r31, JMP_REGS_R31(3)
36         // store special registers (link, condition)
37         mflr    %r0
38         stw             %r0, JMP_REGS_LR(3)
39         mfcr    %r0
40         stw             %r0, JMP_REGS_CR(3)
42         b               __setjmp_save_sigs
45 /* int setjmp(jmp_buf buffer) */
46 FUNCTION(setjmp):
47 FUNCTION(_setjmp):
48         // call __sigsetjmp with saveMask = 0
49         addi    %r4, 0, 0
50         b               __sigsetjmp
52 #pragma weak _setjmp=setjmp