From: ceriel Date: Wed, 7 Sep 1988 09:20:37 +0000 (+0000) Subject: FIX: did not handle most of the 'end of basic block' instructions right; X-Git-Tag: release-5-5~2867 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f78b282fb4f7fd90e1f49c3f5e7eb36dd3896087;p=ack.git FIX: did not handle most of the 'end of basic block' instructions right; many of them have effect on the stack, and this went by unnoticed --- diff --git a/util/ego/cs/cs_vnm.c b/util/ego/cs/cs_vnm.c index 5eede9387..9d3f21f2f 100644 --- a/util/ego/cs/cs_vnm.c +++ b/util/ego/cs/cs_vnm.c @@ -186,6 +186,34 @@ STATIC fiddle_stack(lnp) dummy.tk_size = off_set(lnp); Push(&dummy); break; + case op_beq: + case op_bge: + case op_bgt: + case op_bne: + case op_ble: + case op_blt: + Pop(&dummy, (offset) ws); + Pop(&dummy, (offset) ws); + break; + case op_bra: + case op_csa:/* ??? */ + case op_csb:/* ??? */ + case op_gto:/* ??? */ + case op_ret:/* ??? */ + case op_rtt:/* ??? */ + break; + case op_zeq: + case op_zge: + case op_zgt: + case op_zne: + case op_zle: + case op_zlt: + case op_trp: + Pop(&dummy, (offset) ws); + break; + case op_rck: + Pop(&dummy, (offset) ps); + break; } } @@ -317,6 +345,7 @@ vnm(bp) hopeless(INSTR(lnp)); break; case BBLOCK_END: + fiddle_stack(lnp); break; default: assert(FALSE);