Handle GTO, LOR/STR 0 also use local base

This commit is contained in:
ceriel 1987-10-02 12:43:54 +00:00
parent d2006b19af
commit 1ac5d9c95a
2 changed files with 15 additions and 1 deletions

View 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;
}
}
}

View 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);