From 2f83a7e3d9c861917be2f6c3abc17efd5040613c Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 3 Sep 1990 11:12:44 +0000 Subject: [PATCH] fix: also kill condition codes if they are set to a register that is to be killed --- mach/proto/ncg/codegen.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mach/proto/ncg/codegen.c b/mach/proto/ncg/codegen.c index 56ce7f594..cac27869f 100644 --- a/mach/proto/ncg/codegen.c +++ b/mach/proto/ncg/codegen.c @@ -498,7 +498,16 @@ normalfailed: if (stackpad!=tokpatlen) { if (result.e_typ!=EV_REG) break; if ( in_stack(result.e_v.e_reg) ) BROKE() ; /* Check aside-stack */ - if (dokill) machregs[result.e_v.e_reg].r_contents.t_token = 0; + if (dokill) { + /* kill register, and kill condition codes if they are set to + this register + */ + machregs[result.e_v.e_reg].r_contents.t_token = 0; + if (machregs[0].r_contents.t_token == -1 && + machregs[0].r_contents.t_att[0].ar == result.e_v.e_reg) { + machregs[0].r_contents.t_token = 0; + } + } for (tp= &fakestack[stackheight-tokpatlen-1];tp>=&fakestack[0];tp--) if (tp->t_token==-1) { if(tp->t_att[0].ar==result.e_v.e_reg)