From 61ba39a23786a7ae9694705af1d146c00a319144 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 5 Feb 2011 04:35:27 +0100 Subject: Getting rid of newlib, starting to implement a libc. Highly experimental, highly untested. --- arch/arm/lpc17xx/setjmp.s | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 arch/arm/lpc17xx/setjmp.s (limited to 'arch/arm/lpc17xx/setjmp.s') 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 -- cgit v1.2.3