Commit 27ad99a2 authored by Matthias Braun's avatar Matthias Braun
Browse files

use designated initializers for arch_irn_ops

parent 73446e0b
......@@ -63,16 +63,11 @@ static int TEMPLATE_get_sp_bias(const ir_node *irn)
/* fill register allocator interface */
static const arch_irn_ops_t TEMPLATE_irn_ops = {
TEMPLATE_get_frame_entity,
TEMPLATE_set_frame_offset,
TEMPLATE_get_sp_bias,
NULL, /* get_op_estimated_cost */
NULL, /* possible_memory_operand */
NULL, /* perform_memory_operand */
.get_frame_entity = TEMPLATE_get_frame_entity,
.set_frame_offset = TEMPLATE_set_frame_offset,
.get_sp_bias = TEMPLATE_get_sp_bias,
};
/**
* Transforms the standard firm graph into
* a TEMLPATE firm graph
......
......@@ -116,12 +116,9 @@ static int amd64_get_sp_bias(const ir_node *node)
/* fill register allocator interface */
static const arch_irn_ops_t amd64_irn_ops = {
amd64_get_frame_entity,
amd64_set_frame_offset,
amd64_get_sp_bias,
NULL, /* get_op_estimated_cost */
NULL, /* possible_memory_operand */
NULL, /* perform_memory_operand */
.get_frame_entity = amd64_get_frame_entity,
.set_frame_offset = amd64_set_frame_offset,
.get_sp_bias = amd64_get_sp_bias,
};
static void amd64_before_ra(ir_graph *irg)
......
......@@ -80,7 +80,7 @@ static ir_entity *arm_get_frame_entity(const ir_node *irn)
* This function is called by the generic backend to correct offsets for
* nodes accessing the stack.
*/
static void arm_set_stack_bias(ir_node *irn, int bias)
static void arm_set_frame_offset(ir_node *irn, int bias)
{
if (is_arm_FrameAddr(irn)) {
arm_Address_attr_t *attr = get_arm_Address_attr(irn);
......@@ -101,12 +101,9 @@ static int arm_get_sp_bias(const ir_node *node)
/* fill register allocator interface */
const arch_irn_ops_t arm_irn_ops = {
arm_get_frame_entity,
arm_set_stack_bias,
arm_get_sp_bias,
NULL, /* get_op_estimated_cost */
NULL, /* possible_memory_operand */
NULL, /* perform_memory_operand */
.get_frame_entity = arm_get_frame_entity,
.set_frame_offset = arm_set_frame_offset,
.get_sp_bias = arm_get_sp_bias,
};
/**
......
......@@ -695,12 +695,9 @@ static int be_node_get_sp_bias(const ir_node *irn)
/* for be nodes */
static const arch_irn_ops_t be_node_irn_ops = {
be_node_get_frame_entity,
be_node_set_frame_offset,
be_node_get_sp_bias,
NULL, /* get_op_estimated_cost */
NULL, /* possible_memory_operand */
NULL, /* perform_memory_operand */
.get_frame_entity = be_node_get_frame_entity,
.set_frame_offset = be_node_set_frame_offset,
.get_sp_bias = be_node_get_sp_bias,
};
static int get_start_reg_index(ir_graph *irg, const arch_register_t *reg)
......@@ -758,12 +755,9 @@ static int dummy_get_sp_bias(const ir_node *node)
/* for "middleend" nodes */
static const arch_irn_ops_t dummy_be_irn_ops = {
dummy_get_frame_entity,
dummy_set_frame_offset,
dummy_get_sp_bias,
NULL, /* get_op_estimated_cost */
NULL, /* possible_memory_operand */
NULL, /* perform_memory_operand */
.get_frame_entity = dummy_get_frame_entity,
.set_frame_offset = dummy_set_frame_offset,
.get_sp_bias = dummy_get_sp_bias,
};
ir_node *be_new_Phi(ir_node *block, int n_ins, ir_node **ins, ir_mode *mode,
......
......@@ -448,12 +448,12 @@ static const be_abi_callbacks_t ia32_abi_callbacks = {
/* register allocator interface */
static const arch_irn_ops_t ia32_irn_ops = {
ia32_get_frame_entity,
ia32_set_frame_offset,
ia32_get_sp_bias,
ia32_get_op_estimated_cost,
ia32_possible_memory_operand,
ia32_perform_memory_operand,
.get_frame_entity = ia32_get_frame_entity,
.set_frame_offset = ia32_set_frame_offset,
.get_sp_bias = ia32_get_sp_bias,
.get_op_estimated_cost = ia32_get_op_estimated_cost,
.possible_memory_operand = ia32_possible_memory_operand,
.perform_memory_operand = ia32_perform_memory_operand,
};
static bool gprof = 0;
......
......@@ -175,12 +175,9 @@ static int sparc_get_sp_bias(const ir_node *node)
/* fill register allocator interface */
const arch_irn_ops_t sparc_irn_ops = {
sparc_get_frame_entity,
sparc_set_frame_offset,
sparc_get_sp_bias,
NULL, /* get_op_estimated_cost */
NULL, /* possible_memory_operand */
NULL, /* perform_memory_operand */
.get_frame_entity = sparc_get_frame_entity,
.set_frame_offset = sparc_set_frame_offset,
.get_sp_bias = sparc_get_sp_bias,
};
/**
......
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