proper trap on divide by 0

This commit is contained in:
ceriel 1993-10-04 14:13:51 +00:00
parent c118bca2c2
commit 4092904071

View file

@ -2,6 +2,8 @@
.global dvi4 .global dvi4
.global mathdvi4 .global mathdvi4
EIDIVZ=6
dvi4: dvi4:
! %o0' = %o0 / %o1 ! %o0' = %o0 / %o1
! %o1' = %o0 % %o1 ! %o1' = %o0 % %o1
@ -167,4 +169,8 @@ mathdvi4:
nop nop
0: /* divide by zero */ 0: /* divide by zero */
ta 2 set EIDIVZ, %o0
call trp
nop
retl
nop