From 0e4318adc38a54110c1b1f7f1d5edc0ee2c78170 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 6 Sep 2011 13:55:20 +0200 Subject: [PATCH] remove has_compound_ret_parameter, we already had cc_compound_ret This should also fix compound returns in combination with -msoft-float on sparc --- ir/be/sparc/sparc_cconv.c | 3 ++- ir/be/sparc/sparc_emitter.c | 2 +- ir/be/sparc/sparc_transform.c | 2 +- ir/lower/lower_calls.c | 1 - ir/tr/type_t.h | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ir/be/sparc/sparc_cconv.c b/ir/be/sparc/sparc_cconv.c index f1bc958dc..5e4c648be 100644 --- a/ir/be/sparc/sparc_cconv.c +++ b/ir/be/sparc/sparc_cconv.c @@ -203,7 +203,8 @@ calling_convention_t *sparc_decide_calling_convention(ir_type *function_type, int bits = get_mode_size_bits(mode); reg_or_stackslot_t *param = ¶ms[i]; - if (i == 0 && function_type->attr.ma.has_compound_ret_parameter) { + if (i == 0 && + (get_method_calling_convention(function_type) & cc_compound_ret)) { assert(mode_is_reference(mode) && bits == 32); /* special case, we have reserved space for this on the between * type */ diff --git a/ir/be/sparc/sparc_emitter.c b/ir/be/sparc/sparc_emitter.c index 59c634697..413b59af2 100644 --- a/ir/be/sparc/sparc_emitter.c +++ b/ir/be/sparc/sparc_emitter.c @@ -645,7 +645,7 @@ static void emit_sparc_Return(const ir_node *node) } be_emit_cstring("\tjmp "); be_emit_string(destreg); - if (type->attr.ma.has_compound_ret_parameter) { + if (get_method_calling_convention(type) & cc_compound_ret) { be_emit_cstring("+12"); } else { be_emit_cstring("+8"); diff --git a/ir/be/sparc/sparc_transform.c b/ir/be/sparc/sparc_transform.c index 917e1601f..3e70dc900 100644 --- a/ir/be/sparc/sparc_transform.c +++ b/ir/be/sparc/sparc_transform.c @@ -1729,7 +1729,7 @@ static ir_node *gen_Call(ir_node *node) ir_entity *entity = NULL; ir_node *new_frame = get_stack_pointer_for(node); bool aggregate_return - = type->attr.ma.has_compound_ret_parameter; + = get_method_calling_convention(type) & cc_compound_ret; ir_node *incsp; int mem_pos; ir_node *res; diff --git a/ir/lower/lower_calls.c b/ir/lower/lower_calls.c index 9e57bef30..14b93c480 100644 --- a/ir/lower/lower_calls.c +++ b/ir/lower/lower_calls.c @@ -150,7 +150,6 @@ static ir_type *lower_mtp(compound_call_lowering_flags flags, ir_type *mtp) /* create the new type */ lowered = new_d_type_method(nn_params, nn_ress, get_type_dbg_info(mtp)); - lowered->attr.ma.has_compound_ret_parameter = true; /* fill it */ for (i = 0; i < nn_params; ++i) diff --git a/ir/tr/type_t.h b/ir/tr/type_t.h index 660fb24f2..41337cf1a 100644 --- a/ir/tr/type_t.h +++ b/ir/tr/type_t.h @@ -75,7 +75,6 @@ typedef struct { ir_variadicity variadicity; /**< The variadicity of the method. */ mtp_additional_properties additional_properties; /**< Set of additional method properties. */ unsigned irg_calling_conv; /**< A set of calling convention flags. */ - bool has_compound_ret_parameter : 1; /**< first parameter compound return address */ } mtd_attr; /** Union type attributes. */ -- 2.20.1