Commit 7125ea59 authored by Christoph Mallon's avatar Christoph Mallon

be: Factor out code to set the va_list type to a void pointer.

parent dc9ff719
......@@ -66,3 +66,8 @@ void be_default_lower_va_arg_compound_val(ir_node *const node)
{
be_default_lower_va_arg(node, false);
}
void be_set_va_list_type_pointer(backend_params *const p)
{
p->vararg.va_list_type = new_type_pointer(get_type_for_mode(mode_ANY));
}
......@@ -12,6 +12,7 @@
#ifndef FIRM_BE_BEVARARGS_H
#define FIRM_BE_BEVARARGS_H
#include "be.h"
#include "firm_types.h"
/**
......@@ -36,4 +37,6 @@ void be_default_lower_va_arg_compound_ptr(ir_node *node);
*/
void be_default_lower_va_arg_compound_val(ir_node *node);
void be_set_va_list_type_pointer(backend_params *p);
#endif
......@@ -1388,9 +1388,7 @@ static void ia32_init(void)
ia32_mode_float32 = new_float_mode("fp32", irma_ieee754, 8, 23,
ir_overflow_indefinite);
// va_list is a void pointer
ir_type *type_va_list = new_type_pointer(get_type_for_mode(mode_ANY));
ia32_backend_params.vararg.va_list_type = type_va_list;
be_set_va_list_type_pointer(&ia32_backend_params);
if (ia32_cg_config.use_sse2 || ia32_cg_config.use_softfloat) {
ia32_backend_params.mode_float_arithmetic = NULL;
......
......@@ -552,9 +552,7 @@ static const backend_params *sparc_get_backend_params(void)
},
};
ir_type *type_va_list
= new_type_pointer(get_type_for_mode(mode_ANY));
p.vararg.va_list_type = type_va_list;
be_set_va_list_type_pointer(&p);
sparc_mode_Q
= new_float_mode("Q", irma_ieee754, 15, 112, ir_overflow_min_max);
......
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