ack/mach/ns/libem/trp.s

30 lines
385 B
ArmAsm
Raw Normal View History

1985-07-26 11:56:24 +00:00
.define .trp
1987-01-16 16:49:46 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1985-07-26 11:56:24 +00:00
1987-01-16 16:49:46 +00:00
.sect .text
1985-07-26 11:56:24 +00:00
.trp:
save [r0, r1]
movd 12(sp), r0 !error number
1988-03-10 16:00:58 +00:00
movd r0,tos
1985-07-26 11:56:24 +00:00
cmpd r0, 16
bge 1f
1988-03-10 16:00:58 +00:00
tbitd r0, @.ignmask
bfs 3f !do not trap
1985-07-26 11:56:24 +00:00
1: !do trap
movd @.trpreg, r1
cmpqd 0, r1
beq 2f
movqd 0, @.trpreg
jsr r1
3:
adjspd -4
1985-07-26 11:56:24 +00:00
restore [r0, r1]
ret 4
2:
jump @.stop !no trapprocedure supplied