do better bad-pointer testing
authorceriel <none@none>
Thu, 30 Jul 1987 09:20:59 +0000 (09:20 +0000)
committerceriel <none@none>
Thu, 30 Jul 1987 09:20:59 +0000 (09:20 +0000)
mach/mantra/int/deffile
mach/mantra/int/mloop0

index d95394d..c45b434 100644 (file)
@@ -74,7 +74,9 @@
 #endif
 #define  adroff move.b (a3)+,(a5) ;    move.b  (a3)+,1(a5)
 #define        claimstack      tst.b   -1024(sp)
-#define        locptr  cmp.l   sp,a0 ;\
+#define        locptr  cmp.l   topstack,a0 ;\
+               bhi     7f ;\
+               cmp.l   sp,a0 ;\
                bcc     6f  
 #define        heaptr  cmp.l   hp,a0 ;\
                bhi     7f ;\
index d64ad12..9577cfe 100644 (file)
@@ -12,6 +12,7 @@
        .define tblmax
        .define ml
        .define argc
+       .define topstack
 .sect .text
 .sect .rom
 .sect .data
@@ -22,6 +23,7 @@
 !---------------------------------------------------------------------------
 
 _m_a_i_n:
+               move.l  sp,topstack
                tst.l   (sp)+
                lea     retarea,a5              !a5 POINTS AT RETURN AREA
                move.l  nd,-(sp)                !nd contains endbss
@@ -507,6 +509,7 @@ maxcount:  .space 4
 
 tblmax:        .space  4
 globmax: .space        4
+topstack: .space 4
 ml:    .space  4
 eb:    .space  4               !EXPLICITELY REQUIRED eb, filb, curproc IN
 filb:  .space  4               !THIS ORDER