From 0a2cfa0e6966cfaf4e479e30c75093274a809c9f Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 22 Mar 2007 15:02:22 +0000 Subject: [PATCH] fix wrong lea to add transformation --- ir/be/ia32/ia32_finish.c | 2 +- ir/be/ia32/ia32_spec.pl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ir/be/ia32/ia32_finish.c b/ir/be/ia32/ia32_finish.c index c59192f69..15ec9ea3d 100644 --- a/ir/be/ia32/ia32_finish.c +++ b/ir/be/ia32/ia32_finish.c @@ -136,7 +136,7 @@ static void ia32_transform_lea_to_add(ir_node *irn, ia32_code_gen_t *cg) { am_flav = get_ia32_am_flavour(irn); /* mustn't have a symconst */ - if (get_ia32_am_sc(irn)) + if (get_ia32_am_sc(irn) != NULL || get_ia32_frame_ent(irn) != NULL) return; /* only some LEAs can be transformed to an Add */ diff --git a/ir/be/ia32/ia32_spec.pl b/ir/be/ia32/ia32_spec.pl index 927fd45af..7cb0215d9 100644 --- a/ir/be/ia32/ia32_spec.pl +++ b/ir/be/ia32/ia32_spec.pl @@ -105,6 +105,7 @@ $arch = "ia32"; # 4 - ignore (do not assign this register) # 8 - emitter can choose an arbitrary register of this class # 16 - the register is a virtual one +# 32 - register represents a state # NOTE: Last entry of each class is the largest Firm-Mode a register can hold %reg_classes = ( gp => [ @@ -158,8 +159,8 @@ $arch = "ia32"; { mode => "mode_E" } ], fp_cw => [ # the floating point control word - { name => "fpcw", type => 0 }, - { mode => "mode_Hu" }, + { name => "fpcw", type => 32 }, + { mode => "mode_Hu" }, ], ); # %reg_classes -- 2.20.1