fix wrong lea to add transformation
authorMatthias Braun <matze@braunis.de>
Thu, 22 Mar 2007 15:02:22 +0000 (15:02 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 22 Mar 2007 15:02:22 +0000 (15:02 +0000)
ir/be/ia32/ia32_finish.c
ir/be/ia32/ia32_spec.pl

index c59192f..15ec9ea 100644 (file)
@@ -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 */
index 927fd45..7cb0215 100644 (file)
@@ -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