check result of array address calculation

This commit is contained in:
ceriel 1990-07-04 14:24:55 +00:00
parent c6a11d1f62
commit fbe4a79045
2 changed files with 15 additions and 7 deletions

View file

@ -19,6 +19,13 @@ calcarr: move.l (sp)+,d3 !save return address
mulu d1,d0 !objectsize in d1
move.l (sp)+,a0
ad d0,a0 !a0 address of array element
#if test
locptr
heaptr
extptr
7: bra e_badptr
6:
#endif
move.l d3,-(sp)
rts
9: bsr e_array ;tst.l (sp)+ ; jmp (a4)

View file

@ -38,11 +38,11 @@ sig_bad: mov #22,-(sp) !_Xsignal. If pointer 0 trapping is
.sect .data
sig_adr: .data4 sig1 ; .data4 sig2 ; .data4 sig3 ; .data4 0
.data4 0 ; .data4 0 ; .data4 0 ; .data4 0
.data4 0 ; .data4 0 ; .data4 sig11 ; .data4 sig12
.data4 0 ; .data4 sig10 ; .data4 sig11 ; .data4 sig12
.data4 sig13 ; .data4 sig14 ; .data4 sig15 ; .data4 sig16
sig_trp: .data4 -2 ; .data4 -2 ; .data4 -2 ; .data4 -2
.data4 -2 ; .data4 -2 ; .data4 -2 ; .data4 -2
.data4 -2 ; .data4 -2 ; .data4 21 ; .data4 25
.data4 -2 ; .data4 22 ; .data4 21 ; .data4 25
.data4 -2 ; .data4 -2 ; .data4 -2 ; .data4 -2
.sect .text
!the next procedures map the catched signal to em errors. The em error
@ -118,11 +118,12 @@ sig11:
#ifdef __BSD4_2
jsr setmask
#endif
move.l 4(a5),d0
sub.l sp,d0
bcs e_memflt !in this case error handling possible
move.l ml,sp !refresh stack and stop .
bra notrap1
bra e_memflt
sig10:
#ifdef __BSD4_2
jsr setmask
#endif
bra e_badptr
#ifdef __BSD4_2
setmask: