diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2011-02-05 04:35:27 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2011-02-05 04:35:27 +0100 |
commit | 61ba39a23786a7ae9694705af1d146c00a319144 (patch) | |
tree | f9ad51bee751f7e878ac3e7ad4d45f993605c37d /arch/arm/lpc17xx/setjmp.s | |
parent | e2d292afdb43cd7d9391128563384e1edd53c52e (diff) |
Getting rid of newlib, starting to implement a libc. Highly experimental, highly untested.
Diffstat (limited to 'arch/arm/lpc17xx/setjmp.s')
-rw-r--r-- | arch/arm/lpc17xx/setjmp.s | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/lpc17xx/setjmp.s b/arch/arm/lpc17xx/setjmp.s new file mode 100644 index 0000000..9ffffc2 --- /dev/null +++ b/arch/arm/lpc17xx/setjmp.s @@ -0,0 +1,33 @@ +.cpu cortex-m3 +.syntax unified + +.section ".text.setjmp","x",%progbits +.align 2 +.thumb +.thumb_func +.globl setjmp +.type setjmp, %function +setjmp: +.fnstart + mov ip, sp + stmea a1!, {v1-v7, fp, ip, lr} + mov a1, #0 + bx lr +.fnend +.size setjmp,.-setjmp + +.section ".text.longjmp","x",%progbits +.align 2 +.thumb +.thumb_func +.globl longjmp +.type longjmp, %function +longjmp: +.fnstart + ldmfd a1!, {v1-v7, fp, ip, lr} + mov sp, ip + movs a1, a2 + it eq + moveq a1, #1 +.fnend +.size longjmp,.-longjmp |