diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-10-17 11:17:07 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2015-10-19 01:37:11 +0200 |
commit | 312f482d395b591398296b5472a3884a12716cbd (patch) | |
tree | 682402fa4c470d4aa7c1334f7616408779559a8f /libc/sysdeps/linux/lm32/setjmp.S | |
parent | c807e03c88504cf01508daa6dbae9e93dacfcf3c (diff) |
lm32: add new architecture
Add support for FPGA systems from Lattice Semiconductor
http://www.latticesemi.com
Merge https://github.com/m-labs/uclibc-lm32.git
Diffstat (limited to 'libc/sysdeps/linux/lm32/setjmp.S')
-rw-r--r-- | libc/sysdeps/linux/lm32/setjmp.S | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/lm32/setjmp.S b/libc/sysdeps/linux/lm32/setjmp.S new file mode 100644 index 000000000..6badd8099 --- /dev/null +++ b/libc/sysdeps/linux/lm32/setjmp.S @@ -0,0 +1,53 @@ +#define _SETJMP_H +#define _ASM +#include <bits/setjmp.h> + +#include <libc-symbols.h> + +.text +.global C_SYMBOL_NAME(setjmp) +.type C_SYMBOL_NAME(setjmp),@function +.align 4 + +C_SYMBOL_NAME(setjmp): + mvi r2, 1 /* save the signal mask */ + bi C_SYMBOL_NAME(__sigsetjmp) + +.text +.global C_SYMBOL_NAME(_setjmp) +.type C_SYMBOL_NAME(_setjmp),@function +.align 4 + +C_SYMBOL_NAME(_setjmp): + mvi r2, 0 /* don't save the signal mask */ + bi C_SYMBOL_NAME(__sigsetjmp) + +.text +.global C_SYMBOL_NAME(__sigsetjmp) +.type C_SYMBOL_NAME(__sigsetjmp),@function +.align 4 + +C_SYMBOL_NAME(__sigsetjmp): + /* save registers relative to r1 (arg0) */ + sw (r1+0), r11 + sw (r1+4), r12 + sw (r1+8), r13 + sw (r1+12), r14 + sw (r1+16), r15 + sw (r1+20), r16 + sw (r1+24), r17 + sw (r1+28), r18 + sw (r1+32), r19 + sw (r1+36), r20 + sw (r1+40), r21 + sw (r1+44), r22 + sw (r1+48), r23 + sw (r1+52), r24 + sw (r1+56), r25 + sw (r1+60), gp + sw (r1+64), fp + sw (r1+68), sp + sw (r1+72), ra + + /* make a tail call to __sigjmp_save; it takes the same args */ + bi C_SYMBOL_NAME(__sigjmp_save) |