fixed bug with state

This commit is contained in:
eck 1990-07-26 15:08:49 +00:00
parent cef36d185e
commit f321062250
2 changed files with 6 additions and 5 deletions

View file

@ -9,8 +9,9 @@ BEGIN { print "#define CONDBRA '\001'" > "pop_push.h"
} }
/aar/ { switch = NR } /aar/ { switch = NR }
{ if (switch) { { if (switch) {
printf("\"%s\",\n",$3) printf("/* %s */ \"%s\",\n",$1,$3)
col_2[NR-switch] = $2 col_2[NR-switch] = $2
comment[NR-switch] = $1
} }
} }
END { print "};" END { print "};"
@ -19,11 +20,11 @@ END { print "};"
print "'\000'," print "'\000',"
for(i=0; i < NR-switch; i++) { for(i=0; i < NR-switch; i++) {
inf = col_2[i] inf = col_2[i]
f_out = "" f_out = "/* " comment[i] " */ "
if (substr(inf,1,1)=="b") f_out = "HASLABEL|" if (substr(inf,1,1)=="b") f_out = f_out "HASLABEL|"
if (substr(inf,2,1)=="c") f_out = f_out "CONDBRA" if (substr(inf,2,1)=="c") f_out = f_out "CONDBRA"
else if (substr(inf,2,1)=="t") f_out = f_out "JUMP" else if (substr(inf,2,1)=="t") f_out = f_out "JUMP"
else f_out = "'\000'" else f_out = f_out "'\000'"
print f_out"," print f_out","
} }
print "};" print "};"

View file

@ -178,7 +178,6 @@ register lblst_p lst_elt;
} }
} else { /* after a label */ } else { /* after a label */
stack_height = lst_elt->ll_height; stack_height = lst_elt->ll_height;
change_state(KNOWN);
} }
} }
@ -223,4 +222,5 @@ line_p lnp;
} else if (ISCONDBRANCH(instr)) { /* conditional branch */ } else if (ISCONDBRANCH(instr)) { /* conditional branch */
label->n_flags |= NUMCOND; label->n_flags |= NUMCOND;
} }
if (state != NO_STACK_MES) change_state(KNOWN);
} }