]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/l4re-core/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/metag/setjmp.S
Update
[l4.git] / l4 / pkg / l4re-core / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / metag / setjmp.S
1 /*
2  * Copyright (C) 2013 Imagination Technologies Ltd.
3  *
4  * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
5  */
6
7 !!! setjmp and variants
8         .text
9
10 !! int _setjmp (jmp_buf __env)
11 !! Store the calling environment in ENV, not saving the signal mask.
12 !! Return 0.  */
13         .global __setjmp
14         .type   __setjmp,function
15 __setjmp:
16         MOV     D0Ar2,#0
17         B       ___sigsetjmp1
18         .size   __setjmp,.-__setjmp
19
20 !! int setjmp (jmp_buf __env)
21 !! Store the calling environment in ENV, also saving the signal mask.
22 !! Return 0.  */
23         .global _setjmp
24         .type   _setjmp,function
25 _setjmp:
26         MOV     D0Ar2,#1
27         !! fall through to __sigsetjmp
28         .size   _setjmp,.-_setjmp
29
30 !! int __sigsetjmp (jmp_buf __env, int __savemask)
31 !! Store the calling environment in ENV, also saving the
32 !! signal mask if SAVEMASK is nonzero.  Return 0.
33 !! This is the internal name for `sigsetjmp'.
34         .global ___sigsetjmp
35         .type   ___sigsetjmp,function
36 ___sigsetjmp:
37 ___sigsetjmp1:
38         !! Save A0/A1 regs
39         MSETL   [D1Ar1++],A0.0,A0.1
40         !! Use A0.3 as temp
41         MOV     A0.3,D1Ar1
42         !! Rewind D1Ar1 that was modified above
43         SUB     D1Ar1,D1Ar1,#(2*8)
44         !! Save D0/D1 regs
45         MSETL   [A0.3++],D0FrT,D0.5,D0.6,D0.7
46         !! Tail call __sigjmp_save
47 #ifdef __PIC__
48         B       ___sigjmp_save@PLT
49 #else
50         B       ___sigjmp_save
51 #endif
52         .size   ___sigsetjmp,.-___sigsetjmp