improve signal handling of Floating Point Exception

This commit is contained in:
ceriel 1989-02-21 10:49:51 +00:00
parent 6beb10355e
commit b37c8b0b24
2 changed files with 23 additions and 2 deletions

View file

@ -25,8 +25,8 @@ a2:
pushl r0
pushl r2
pushl r1
# movl $m1,ap
# chmk (ap)+ # catch floating point exception
movl $m1,ap
chmk (ap)+ # catch floating point exception
calls $3,_m_a_i_n
movl $m2,ap
movl r0,6(ap)

View file

@ -38,6 +38,13 @@ a2:
sig8:
.word 0x0000
pushl 8(ap)
movl $m3,ap
chmk (ap)+ # restore default handler
movl $m5,ap
chmk (ap)+ # get current signal mask
andl3 d0,$0xffffff7f,m4+6 # and remove the 8th bit
movl $m4,ap
chmk (ap)+ # and
movl (sp)+,ap
pushl tab [ap]
jsb .trp
@ -52,6 +59,20 @@ m1:
.long 8
.long m1a
.long 0
m3:
.word SYS_sigvec
.long 3
.long 8
.long 0
.long 0
m4:
.word SYS_sigsetmask
.long 1
.long 0
m5:
.word SYS_sigblock
.long 1
.long 0
m1a:
.long sig8
.long 0