From 906a0d83df566010a6341d0542bdeb5f3191aa95 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 22 Mar 2007 14:01:55 +0000 Subject: [PATCH] make CondJmps and Switches pinned, now we can do code_placement in the backend again --- ir/be/ia32/ia32_spec.pl | 7 +++++++ ir/be/ia32/ia32_x87.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ir/be/ia32/ia32_spec.pl b/ir/be/ia32/ia32_spec.pl index dcfcc04de..927fd45af 100644 --- a/ir/be/ia32/ia32_spec.pl +++ b/ir/be/ia32/ia32_spec.pl @@ -654,6 +654,7 @@ Not => { # other operations CondJmp => { + state => "pinned", op_flags => "L|X|Y", comment => "construct conditional jump: CMP A, B && JMPxx LABEL", reg_req => { in => [ "gp", "gp", "gp", "gp", "none" ] }, @@ -663,6 +664,7 @@ CondJmp => { }, TestJmp => { + state => "pinned", op_flags => "L|X|Y", comment => "construct conditional jump: TEST A, B && JMPxx LABEL", reg_req => { in => [ "gp", "gp" ] }, @@ -672,6 +674,7 @@ TestJmp => { }, CJmpAM => { + state => "pinned", op_flags => "L|X|Y", comment => "construct conditional jump without CMP (replaces CondJmp): JMPxx LABEL", reg_req => { in => [ "gp", "gp", "gp", "gp", "none" ], out => [ "none", "none" ] }, @@ -680,6 +683,7 @@ CJmpAM => { }, CJmp => { + state => "pinned", op_flags => "L|X|Y", comment => "construct conditional jump without CMP (replaces TestJmp): JMPxx LABEL", reg_req => { in => [ "gp", "gp" ] }, @@ -687,6 +691,7 @@ CJmp => { }, SwitchJmp => { + state => "pinned", op_flags => "L|X|Y", comment => "construct switch", reg_req => { in => [ "gp" ], out => [ "none" ] }, @@ -1053,6 +1058,7 @@ xCmp => { }, xCondJmp => { + state => "pinned", op_flags => "L|X|Y", comment => "construct conditional jump: UCOMIS A, B && JMPxx LABEL", reg_req => { in => [ "gp", "gp", "xmm", "xmm", "none" ], out => [ "none", "none" ] }, @@ -1548,6 +1554,7 @@ vfConst => { # other vfCondJmp => { + state => "pinned", op_flags => "L|X|Y", comment => "represents a virtual floating point compare", reg_req => { in => [ "gp", "gp", "vfp", "vfp", "none" ], out => [ "none", "none", "eax" ] }, diff --git a/ir/be/ia32/ia32_x87.c b/ir/be/ia32/ia32_x87.c index 33624a03d..9c7d60bb9 100644 --- a/ir/be/ia32/ia32_x87.c +++ b/ir/be/ia32/ia32_x87.c @@ -870,7 +870,7 @@ static void vfp_dump_live(vfp_liveness live) { * @param tmpl the template containing the 4 possible x87 opcodes */ static int sim_binop(x87_state *state, ir_node *n, const exchange_tmpl *tmpl) { - int op2_idx, op1_idx; + int op2_idx = 0, op1_idx; int out_idx, do_pop = 0; ia32_attr_t *attr; ir_node *patched_insn; -- 2.20.1