-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathjmp.S
33 lines (31 loc) · 770 Bytes
/
jmp.S
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
.global setjmp_q
setjmp_q:
movw r26, r24
st X+, r28
st X+, r29
pop r31
pop r30
in r24, 0x3d ; 61
st X+, r24
in r24, 0x3e ; 62
st X+, r24
in r24, 0x3f ; 63
st X+, r24
st X+, r30
st X+, r31
ijmp
.global longjmp_q
longjmp_q:
movw r26, r24
ld r28, X+
ld r29, X+
ld r30, X+
ld r31, X+
ld r0, X+
cli
out 0x3e, r31 ; 62
out 0x3f, r0 ; 63
out 0x3d, r30 ; 61
ld r30, X+
ld r31, X+
ijmp