From f8ead9acbe48af00885e64a6f2f895d1b6cae434 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Fri, 30 Nov 2012 11:25:22 +0100 Subject: [PATCH] ia32: Remove the ia32_x87_attr_t from ia32_asm_attr_t. It does not provide sufficient information to handle float in asm. --- ir/be/ia32/ia32_new_nodes.c | 5 +++-- ir/be/ia32/ia32_nodes_attr.h | 2 +- ir/be/ia32/ia32_spec.pl | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ir/be/ia32/ia32_new_nodes.c b/ir/be/ia32/ia32_new_nodes.c index 8a52921f0..c1f553c8a 100644 --- a/ir/be/ia32/ia32_new_nodes.c +++ b/ir/be/ia32/ia32_new_nodes.c @@ -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, diff --git a/ir/be/ia32/ia32_nodes_attr.h b/ir/be/ia32/ia32_nodes_attr.h index 152a47682..9dcf9ad3c 100644 --- a/ir/be/ia32/ia32_nodes_attr.h +++ b/ir/be/ia32/ia32_nodes_attr.h @@ -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; }; diff --git a/ir/be/ia32/ia32_spec.pl b/ir/be/ia32/ia32_spec.pl index bedbeb1af..a31fd7a43 100644 --- a/ir/be/ia32/ia32_spec.pl +++ b/ir/be/ia32/ia32_spec.pl @@ -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);", -- 2.20.1