summaryrefslogtreecommitdiff
path: root/arch/arm/lpc17xx/setjmp.s
blob: 9ffffc2fad85a7438877d51d5c683d549d72b8e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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