better debug output when assembler constraints fail, don't create psis with 64bit...
authorMatthias Braun <matze@braunis.de>
Thu, 27 Sep 2007 17:41:20 +0000 (17:41 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 27 Sep 2007 17:41:20 +0000 (17:41 +0000)
[r15976]

ir/be/ia32/bearch_ia32.c
ir/be/ia32/ia32_transform.c

index 5b97324..bb623a7 100644 (file)
@@ -2018,17 +2018,16 @@ static int ia32_is_psi_allowed(ir_node *sel, ir_node *phi_list, int i, int j)
        (void)i;
        (void)j;
 
-#if 1
+       /* we can't handle psis with 64bit compares yet */
        if(is_Proj(sel)) {
                ir_node *pred = get_Proj_pred(sel);
                if(is_Cmp(pred)) {
                        ir_node *left     = get_Cmp_left(pred);
                        ir_mode *cmp_mode = get_irn_mode(left);
-                       if(mode_is_float(cmp_mode))
+                       if(!mode_is_float(cmp_mode) && get_mode_size_bits(cmp_mode) > 32)
                                return 0;
                }
        }
-#endif
 
        /* check the Phi nodes */
        for (phi = phi_list; phi; phi = get_irn_link(phi)) {
index 5a1e37b..b8e14c7 100644 (file)
@@ -2152,7 +2152,8 @@ static ir_node *try_create_Test(ir_node *node)
        if(!is_Const_0(cmp_right))
                return NULL;
 
-       if(is_And(cmp_left) && can_fold_test_and(node)) {
+       if(is_And(cmp_left) && get_irn_n_edges(cmp_left) == 1 &&
+                       can_fold_test_and(node)) {
                ir_node *and_left  = get_And_left(cmp_left);
                ir_node *and_right = get_And_right(cmp_left);
 
@@ -3063,10 +3064,12 @@ void parse_asm_constraint(int pos, constraint_t *constraint, const char *c)
                case 'y': /* we don't support mmx registers yet */
                case 'Z': /* not available in 32 bit mode */
                case 'e': /* not available in 32 bit mode */
-                       assert(0 && "asm constraint not supported");
+                       panic("unsupported asm constraint '%c' found in (%+F)",
+                             *c, current_ir_graph);
                        break;
                default:
-                       assert(0 && "unknown asm constraint found");
+                       panic("unknown asm constraint '%c' found in (%+F)", *c,
+                             current_ir_graph);
                        break;
                }
                ++c;