Commit 1e77e520 authored by Matthias Braun's avatar Matthias Braun
Browse files

add compound parameter lower to lower_for_target

parent f27b7782
...@@ -338,6 +338,16 @@ static int TEMPLATE_get_reg_class_alignment(const arch_register_class_t *cls) ...@@ -338,6 +338,16 @@ static int TEMPLATE_get_reg_class_alignment(const arch_register_class_t *cls)
static void TEMPLATE_lower_for_target(void) static void TEMPLATE_lower_for_target(void)
{ {
lower_params_t params = {
4, /* def_ptr_alignment */
LF_COMPOUND_RETURN | LF_RETURN_HIDDEN, /* flags */
ADD_HIDDEN_ALWAYS_IN_FRONT, /* hidden_params */
NULL, /* find pointer type */
NULL, /* ret_compound_in_regs */
};
/* lower compound param handling */
lower_calls_with_compounds(&params);
} }
static int TEMPLATE_is_mux_allowed(ir_node *sel, ir_node *mux_false, static int TEMPLATE_is_mux_allowed(ir_node *sel, ir_node *mux_false,
......
...@@ -500,6 +500,16 @@ static int amd64_get_reg_class_alignment(const arch_register_class_t *cls) ...@@ -500,6 +500,16 @@ static int amd64_get_reg_class_alignment(const arch_register_class_t *cls)
static void amd64_lower_for_target(void) static void amd64_lower_for_target(void)
{ {
lower_params_t params = {
4, /* def_ptr_alignment */
LF_COMPOUND_RETURN | LF_RETURN_HIDDEN, /* flags */
ADD_HIDDEN_ALWAYS_IN_FRONT, /* hidden_params */
NULL, /* find pointer type */
NULL, /* ret_compound_in_regs */
};
/* lower compound param handling */
lower_calls_with_compounds(&params);
} }
static int amd64_is_mux_allowed(ir_node *sel, ir_node *mux_false, static int amd64_is_mux_allowed(ir_node *sel, ir_node *mux_false,
......
...@@ -541,6 +541,17 @@ static void arm_lower_for_target(void) ...@@ -541,6 +541,17 @@ static void arm_lower_for_target(void)
int i; int i;
int n_irgs = get_irp_n_irgs(); int n_irgs = get_irp_n_irgs();
lower_params_t params = {
4, /* def_ptr_alignment */
LF_COMPOUND_RETURN | LF_RETURN_HIDDEN, /* flags */
ADD_HIDDEN_ALWAYS_IN_FRONT, /* hidden_params */
NULL, /* find pointer type */
NULL, /* ret_compound_in_regs */
};
/* lower compound param handling */
lower_calls_with_compounds(&params);
for (i = 0; i < n_irgs; ++i) { for (i = 0; i < n_irgs; ++i) {
ir_graph *irg = get_irp_irg(i); ir_graph *irg = get_irp_irg(i);
lower_switch(irg, 256, true); lower_switch(irg, 256, true);
......
...@@ -2037,6 +2037,16 @@ static void ia32_lower_for_target(void) ...@@ -2037,6 +2037,16 @@ static void ia32_lower_for_target(void)
ia32_create_set, ia32_create_set,
0, /* don't lower direct compares */ 0, /* don't lower direct compares */
}; };
lower_params_t params = {
4, /* def_ptr_alignment */
LF_COMPOUND_RETURN | LF_RETURN_HIDDEN, /* flags */
ADD_HIDDEN_ALWAYS_IN_FRONT, /* hidden_params */
NULL, /* find pointer type */
NULL, /* ret_compound_in_regs */
};
/* lower compound param handling */
lower_calls_with_compounds(&params);
/* perform doubleword lowering */ /* perform doubleword lowering */
lwrdw_param_t lower_dw_params = { lwrdw_param_t lower_dw_params = {
......
...@@ -543,6 +543,15 @@ static void sparc_lower_for_target(void) ...@@ -543,6 +543,15 @@ static void sparc_lower_for_target(void)
sparc_create_set, sparc_create_set,
0, 0,
}; };
lower_params_t params = {
4, /* def_ptr_alignment */
LF_COMPOUND_RETURN | LF_RETURN_HIDDEN, /* flags */
ADD_HIDDEN_ALWAYS_IN_FRONT, /* hidden_params */
NULL, /* find pointer type */
NULL, /* ret_compound_in_regs */
};
lower_calls_with_compounds(&params);
for (i = 0; i < n_irgs; ++i) { for (i = 0; i < n_irgs; ++i) {
ir_graph *irg = get_irp_irg(i); ir_graph *irg = get_irp_irg(i);
......
...@@ -936,3 +936,4 @@ void lower_calls_with_compounds(const lower_params_t *params) ...@@ -936,3 +936,4 @@ void lower_calls_with_compounds(const lower_params_t *params)
if (type_map) if (type_map)
pmap_destroy(type_map); pmap_destroy(type_map);
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment