ia32: Remove the ia32_x87_attr_t from ia32_asm_attr_t.
authorChristoph Mallon <christoph.mallon@gmx.de>
Fri, 30 Nov 2012 10:25:22 +0000 (11:25 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Fri, 30 Nov 2012 10:25:22 +0000 (11:25 +0100)
It does not provide sufficient information to handle float in asm.

ir/be/ia32/ia32_new_nodes.c
ir/be/ia32/ia32_nodes_attr.h
ir/be/ia32/ia32_spec.pl

index 8a52921..c1f553c 100644 (file)
@@ -809,9 +809,10 @@ static void init_ia32_asm_attributes(ir_node *res)
 #ifndef NDEBUG
        ia32_attr_t *attr  = get_ia32_attr(res);
        attr->attr_type   |= IA32_ATTR_ia32_asm_attr_t;
-#else
-       (void) res;
 #endif
+
+       ir_graph *const irg = get_irn_irg(res);
+       ia32_request_x87_sim(irg); /* asm might have fp operands. */
 }
 
 static void init_ia32_immediate_attributes(ir_node *res, ir_entity *symconst,
index 152a476..9dcf9ad 100644 (file)
@@ -291,7 +291,7 @@ struct ia32_asm_reg_t {
  */
 typedef struct ia32_asm_attr_t ia32_asm_attr_t;
 struct ia32_asm_attr_t {
-       ia32_x87_attr_t       x87_attr;
+       ia32_attr_t           attr;         /**< the generic attribute */
        ident                *asm_text;
        const ia32_asm_reg_t *register_map;
 };
index bedbeb1..a31fd7a 100644 (file)
@@ -117,7 +117,6 @@ $custom_init_attr_func = \&ia32_custom_init_attr;
 %init_attr = (
        ia32_asm_attr_t =>
                "\tinit_ia32_attributes(res, irn_flags_, in_reqs, n_res);\n".
-               "\tinit_ia32_x87_attributes(res);".
                "\tinit_ia32_asm_attributes(res);",
        ia32_attr_t     =>
                "\tinit_ia32_attributes(res, irn_flags_, in_reqs, n_res);",