sparc: fix float to short conversion
authorMatthias Braun <matze@braunis.de>
Thu, 26 Jan 2012 18:10:47 +0000 (19:10 +0100)
committerMatthias Braun <matze@braunis.de>
Thu, 9 Feb 2012 17:01:51 +0000 (18:01 +0100)
ir/be/sparc/bearch_sparc.c
ir/be/sparc/sparc_transform.c

index 4dc330f..2b7d769 100644 (file)
@@ -326,7 +326,7 @@ static int sparc_rewrite_Conv(ir_node *node, void *ctx)
                return 1;
        }
        if (mode_is_float(from_mode) && mode_is_int(to_mode)
-           && get_mode_size_bits(to_mode) == 32
+           && get_mode_size_bits(to_mode) <= 32
            && !mode_is_signed(to_mode)) {
            rewrite_float_unsigned_Conv(node);
            return 1;
index 310f575..3392271 100644 (file)
@@ -1436,7 +1436,7 @@ static ir_node *gen_Conv(ir_node *node)
                        } else {
                                /* float -> int conv */
                                if (!mode_is_signed(dst_mode))
-                                       panic("float to unsigned not implemented yet");
+                                       panic("float to unsigned not lowered");
                                return create_ftoi(dbgi, block, new_op, src_mode);
                        }
                } else {