Check for any 16/32bit signed integer modes, not just for Hs and Is.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 12 Nov 2008 21:29:56 +0000 (21:29 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 12 Nov 2008 21:29:56 +0000 (21:29 +0000)
[r23605]

ir/be/ia32/ia32_transform.c

index 11a8f7b..c97a579 100644 (file)
@@ -2225,10 +2225,13 @@ static ir_node *try_create_dest_am(ir_node *node)
 static int is_float_to_int_conv(const ir_node *node)
 {
        ir_mode  *mode = get_irn_mode(node);
+       unsigned  size = get_mode_size_bits(mode);
        ir_node  *conv_op;
        ir_mode  *conv_mode;
 
-       if (mode != mode_Is && mode != mode_Hs)
+       if (size != 16 && size != 32)
+               return 0;
+       if (!mode_is_signed(mode))
                return 0;
 
        if (!is_Conv(node))
@@ -3090,7 +3093,10 @@ static ir_node *gen_x87_gp_to_fp(ir_node *node, ir_mode *src_mode)
        ir_node  *new_node;
 
        /* fild can use source AM if the operand is a signed 16bit or 32bit integer */
-       if (src_mode == mode_Is || src_mode == mode_Hs) {
+       if (mode_is_signed(src_mode) && (
+                               get_mode_size_bits(src_mode) == 32 ||
+                               get_mode_size_bits(src_mode) == 16
+                       )) {
                ia32_address_mode_t am;
 
                match_arguments(&am, src_block, NULL, op, NULL, match_am | match_try_am | match_16bit_am);