remove has_compound_ret_parameter, we already had cc_compound_ret
authorMatthias Braun <matze@braunis.de>
Tue, 6 Sep 2011 11:55:20 +0000 (13:55 +0200)
committerMatthias Braun <matze@braunis.de>
Tue, 6 Sep 2011 12:12:08 +0000 (14:12 +0200)
This should also fix compound returns in combination with
-msoft-float on sparc

ir/be/sparc/sparc_cconv.c
ir/be/sparc/sparc_emitter.c
ir/be/sparc/sparc_transform.c
ir/lower/lower_calls.c
ir/tr/type_t.h

index f1bc958..5e4c648 100644 (file)
@@ -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      = &params[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 */
index 59c6346..413b59a 100644 (file)
@@ -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");
index 917e160..3e70dc9 100644 (file)
@@ -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;
index 9e57bef..14b93c4 100644 (file)
@@ -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)
index 660fb24..41337cf 100644 (file)
@@ -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. */