Handle GTO, LOR/STR 0 also use local base
authorceriel <none@none>
Fri, 2 Oct 1987 12:43:54 +0000 (12:43 +0000)
committerceriel <none@none>
Fri, 2 Oct 1987 12:43:54 +0000 (12:43 +0000)
util/ego/cf/cf.c
util/ego/cf/cf_succ.c

index b1cd275..fe4be61 100644 (file)
@@ -23,6 +23,7 @@
 #include "../../../h/em_pseu.h"
 #include "../../../h/em_spec.h"
 #include "../../../h/em_flag.h"
+#include "../../../h/em_mes.h"
 #include "../share/def.h"
 #include "cf.h"
 #include "cf_succ.h"
@@ -303,6 +304,17 @@ STATIC interproc_analysis(p)
                   case op_lxa:
                        curproc->p_flags1 |= PF_ENVIRON;
                        break;
+                  case op_lor:
+                  case op_str:
+                       if (SHORT(lnp) == 0) {
+                               curproc->p_flags1 |= PF_ENVIRON;
+                       }
+                       break;
+                  case ps_mes:
+                       if (aoff(ARG(lnp),0) == ms_gto) {
+                               ENTERED_WITH_GTO(curproc);
+                       }
+                       break;
                }
           }
        }
index ac71e5f..21176c4 100644 (file)
@@ -236,7 +236,9 @@ control_flow(head)
                } else {
                   if (!IS_RETURN(instr)) {
                        if (IS_UNCOND_JUMP(instr)) {
-                               succeeds(TARGET(lnp),b);
+                               if (instr != op_gto) {
+                                       succeeds(TARGET(lnp),b);
+                               }
                        } else {
                                if (IS_COND_JUMP(instr)) {
                                        succeeds(TARGET(lnp),b);