|
|
1.1 root 1: # C library -- setjmp, longjmp
2:
3: # longjmp(a,v)
4: # will generate a "return(v)" from
5: # the last call to
6: # setjmp(a)
7: # by restoring r6-pc from 'a'
8: # and doing a return.
9: #
10:
11: .globl _setjmp
12: .globl _longjmp
13:
14: .align 1
15: _setjmp:
16: .word 0x0000
17: movl 4(ap),r0
18: movq r6,(r0)+
19: movq r8,(r0)+
20: movq r10,(r0)+
21: movq 8(fp),(r0)+ # ap, fp
22: movab 8(ap),(r0)+ # sp
23: movl 16(fp),(r0) # pc
24: clrl r0
25: ret
26:
27: .align 1
28: _longjmp:
29: .word 0x0000
30: movl 8(ap),r0 # return(v)
31: movl 4(ap),r1
32: movq (r1)+,r6
33: movq (r1)+,r8
34: movq (r1)+,r10
35: movq (r1)+,r12
36: movl (r1)+,sp
37: tstl r0
38: bneq L1
39: movzbl $1,r0
40: L1:
41: jmp *(r1)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.