* If the node returns a tuple (mode_T) then the proj's
* will be asked for this information.
*/
-static const
-arch_register_req_t *TEMPLATE_get_irn_reg_req(const void *self,
- const ir_node *node, int pos) {
+static const arch_register_req_t *TEMPLATE_get_irn_reg_req(const ir_node *node,
+ int pos)
+{
long node_pos = pos == -1 ? 0 : pos;
ir_mode *mode = get_irn_mode(node);
- (void) self;
if (mode == mode_T || mode == mode_M) {
return arch_no_register_req;
return arch_no_register_req;
}
-static void TEMPLATE_set_irn_reg(const void *self, ir_node *irn, const arch_register_t *reg)
+static void TEMPLATE_set_irn_reg(ir_node *irn, const arch_register_t *reg)
{
int pos = 0;
- (void) self;
if (is_Proj(irn)) {
pos = TEMPLATE_translate_proj_pos(irn);
}
}
-static
-const arch_register_t *TEMPLATE_get_irn_reg(const void *self,
- const ir_node *irn)
+static const arch_register_t *TEMPLATE_get_irn_reg(const ir_node *irn)
{
int pos = 0;
const arch_register_t *reg = NULL;
- (void) self;
if (is_Proj(irn)) {
pos = TEMPLATE_translate_proj_pos(irn);
return reg;
}
-static arch_irn_class_t TEMPLATE_classify(const void *self, const ir_node *irn) {
+static arch_irn_class_t TEMPLATE_classify(const ir_node *irn)
+{
irn = skip_Proj_const(irn);
- (void) self;
if (is_cfop(irn)) {
return arch_irn_class_branch;
return 0;
}
-static arch_irn_flags_t TEMPLATE_get_flags(const void *self, const ir_node *irn) {
+static arch_irn_flags_t TEMPLATE_get_flags(const ir_node *irn)
+{
irn = skip_Proj_const(irn);
- (void) self;
if (is_TEMPLATE_irn(irn)) {
return get_TEMPLATE_flags(irn);
return 0;
}
-static ir_entity *TEMPLATE_get_frame_entity(const void *self, const ir_node *node) {
- (void) self;
+static ir_entity *TEMPLATE_get_frame_entity(const ir_node *node)
+{
(void) node;
/* TODO: return the ir_entity assigned to the frame */
return NULL;
}
-static void TEMPLATE_set_frame_entity(const void *self, ir_node *node, ir_entity *ent) {
- (void) self;
+static void TEMPLATE_set_frame_entity(ir_node *node, ir_entity *ent)
+{
(void) node;
(void) ent;
/* TODO: set the ir_entity assigned to the frame */
* This function is called by the generic backend to correct offsets for
* nodes accessing the stack.
*/
-static void TEMPLATE_set_frame_offset(const void *self, ir_node *irn, int offset) {
- (void) self;
+static void TEMPLATE_set_frame_offset(ir_node *irn, int offset)
+{
(void) irn;
(void) offset;
/* TODO: correct offset if irn accesses the stack */
}
-static int TEMPLATE_get_sp_bias(const void *self, const ir_node *irn) {
- (void) self;
+static int TEMPLATE_get_sp_bias(const ir_node *irn)
+{
(void) irn;
return 0;
}
* If the node returns a tuple (mode_T) then the proj's
* will be asked for this information.
*/
-static const
-arch_register_req_t *arm_get_irn_reg_req(const void *self, const ir_node *node,
- int pos)
+static const arch_register_req_t *arm_get_irn_reg_req(const ir_node *node,
+ int pos)
{
long node_pos = pos == -1 ? 0 : pos;
ir_mode *mode = get_irn_mode(node);
- (void) self;
if (is_Block(node) || mode == mode_X) {
return arch_no_register_req;
return arch_no_register_req;
}
-static void arm_set_irn_reg(const void *self, ir_node *irn,
- const arch_register_t *reg)
+static void arm_set_irn_reg(ir_node *irn, const arch_register_t *reg)
{
int pos = 0;
- (void) self;
if (get_irn_mode(irn) == mode_X) {
return;
}
}
-static const arch_register_t *arm_get_irn_reg(const void *self,
- const ir_node *irn)
+static const arch_register_t *arm_get_irn_reg(const ir_node *irn)
{
int pos = 0;
const arch_register_t *reg = NULL;
- (void) self;
if (is_Proj(irn)) {
return reg;
}
-static arch_irn_class_t arm_classify(const void *self, const ir_node *irn)
+static arch_irn_class_t arm_classify(const ir_node *irn)
{
- (void) self;
irn = skip_Proj_const(irn);
if (is_cfop(irn)) {
return 0;
}
-static arch_irn_flags_t arm_get_flags(const void *self, const ir_node *irn)
+static arch_irn_flags_t arm_get_flags(const ir_node *irn)
{
arch_irn_flags_t flags = arch_irn_flags_none;
- (void) self;
if(is_Unknown(irn)) {
return arch_irn_flags_ignore;
return flags;
}
-static ir_entity *arm_get_frame_entity(const void *self, const ir_node *irn)
+static ir_entity *arm_get_frame_entity(const ir_node *irn)
{
- (void) self;
(void) irn;
/* TODO: return the entity assigned to the frame */
return NULL;
}
-static void arm_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent)
+static void arm_set_frame_entity(ir_node *irn, ir_entity *ent)
{
- (void) self;
(void) irn;
(void) ent;
/* TODO: set the entity assigned to the frame */
* This function is called by the generic backend to correct offsets for
* nodes accessing the stack.
*/
-static void arm_set_stack_bias(const void *self, ir_node *irn, int bias)
+static void arm_set_stack_bias(ir_node *irn, int bias)
{
- (void) self;
(void) irn;
(void) bias;
/* TODO: correct offset if irn accesses the stack */
}
-static int arm_get_sp_bias(const void *self, const ir_node *irn)
+static int arm_get_sp_bias(const ir_node *irn)
{
- (void) self;
(void) irn;
return 0;
}
const ir_node *irn, int pos)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- return ops->get_irn_reg_req(ops, irn, pos);
+ return ops->get_irn_reg_req(irn, pos);
}
void arch_set_frame_offset(const arch_env_t *env, ir_node *irn, int offset)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- ops->set_frame_offset(ops, irn, offset);
+ ops->set_frame_offset(irn, offset);
}
ir_entity *arch_get_frame_entity(const arch_env_t *env, const ir_node *irn)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- return ops->get_frame_entity(ops, irn);
+ return ops->get_frame_entity(irn);
}
void arch_set_frame_entity(const arch_env_t *env, ir_node *irn, ir_entity *ent)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- ops->set_frame_entity(ops, irn, ent);
+ ops->set_frame_entity(irn, ent);
}
int arch_get_sp_bias(const arch_env_t *env, ir_node *irn)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- return ops->get_sp_bias(ops, irn);
+ return ops->get_sp_bias(irn);
}
arch_inverse_t *arch_get_inverse(const arch_env_t *env, const ir_node *irn, int i, arch_inverse_t *inverse, struct obstack *obstack)
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
if(ops->get_inverse) {
- return ops->get_inverse(ops, irn, i, inverse, obstack);
+ return ops->get_inverse(irn, i, inverse, obstack);
} else {
return NULL;
}
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
if(ops->possible_memory_operand) {
- return ops->possible_memory_operand(ops, irn, i);
+ return ops->possible_memory_operand(irn, i);
} else {
return 0;
}
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
if(ops->perform_memory_operand) {
- ops->perform_memory_operand(ops, irn, spill, i);
+ ops->perform_memory_operand(irn, spill, i);
} else {
return;
}
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
if(ops->get_op_estimated_cost) {
- return ops->get_op_estimated_cost(ops, irn);
+ return ops->get_op_estimated_cost(irn);
} else {
return 1;
}
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
if(ops->possible_memory_operand) {
- return ops->possible_memory_operand(ops, irn, i);
+ return ops->possible_memory_operand(irn, i);
} else {
return 0;
}
int arch_get_allocatable_regs(const arch_env_t *env, const ir_node *irn, int pos, bitset_t *bs)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- const arch_register_req_t *req = ops->get_irn_reg_req(ops, irn, pos);
+ const arch_register_req_t *req = ops->get_irn_reg_req(irn, pos);
if(req->type == arch_register_req_type_none) {
bitset_clear_all(bs);
const ir_node *irn, int pos)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- const arch_register_req_t *req = ops->get_irn_reg_req(ops, irn, pos);
+ const arch_register_req_t *req = ops->get_irn_reg_req(irn, pos);
return req != NULL;
}
arch_get_irn_reg_class(const arch_env_t *env, const ir_node *irn, int pos)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- const arch_register_req_t *req = ops->get_irn_reg_req(ops, irn, pos);
+ const arch_register_req_t *req = ops->get_irn_reg_req(irn, pos);
assert(req->type != arch_register_req_type_none || req->cls == NULL);
arch_get_irn_register(const arch_env_t *env, const ir_node *irn)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- return ops->get_irn_reg(ops, irn);
+ return ops->get_irn_reg(irn);
}
extern void arch_set_irn_register(const arch_env_t *env,
ir_node *irn, const arch_register_t *reg)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- ops->set_irn_reg(ops, irn, reg);
+ ops->set_irn_reg(irn, reg);
}
extern arch_irn_class_t arch_irn_classify(const arch_env_t *env, const ir_node *irn)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- return ops->classify(ops, irn);
+ return ops->classify(irn);
}
extern arch_irn_flags_t arch_irn_get_flags(const arch_env_t *env, const ir_node *irn)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
- return ops->get_flags(ops, irn);
+ return ops->get_flags(irn);
}
extern const char *arch_irn_flag_str(arch_irn_flags_t fl)
* @return The register requirements for the selected operand.
* The pointer returned is never NULL.
*/
- const arch_register_req_t *(*get_irn_reg_req)(const void *self,
- const ir_node *irn, int pos);
+ const arch_register_req_t *(*get_irn_reg_req)(const ir_node *irn, int pos);
/**
* Set the register for an output operand.
* @note If the operand is not a register operand,
* the call is ignored.
*/
- void (*set_irn_reg)(const void *self, ir_node *irn, const arch_register_t *reg);
+ void (*set_irn_reg)(ir_node *irn, const arch_register_t *reg);
/**
* Get the register allocated for an output operand.
* @c arch_register_invalid, if no register has yet been
* allocated for this node.
*/
- const arch_register_t *(*get_irn_reg)(const void *self, const ir_node *irn);
+ const arch_register_t *(*get_irn_reg)(const ir_node *irn);
/**
* Classify the node.
* @param irn The node.
* @return A classification.
*/
- arch_irn_class_t (*classify)(const void *self, const ir_node *irn);
+ arch_irn_class_t (*classify)(const ir_node *irn);
/**
* Get the flags of a node.
* @param irn The node.
* @return A set of flags.
*/
- arch_irn_flags_t (*get_flags)(const void *self, const ir_node *irn);
+ arch_irn_flags_t (*get_flags)(const ir_node *irn);
/**
* Get the entity on the stack frame this node depends on.
* @return The entity on the stack frame or NULL, if the node does not have a
* stack frame entity.
*/
- ir_entity *(*get_frame_entity)(const void *self, const ir_node *irn);
+ ir_entity *(*get_frame_entity)(const ir_node *irn);
/**
* Set the entity on the stack frame this node depends on.
* @param irn The node in question.
* @param ent The entity to set
*/
- void (*set_frame_entity)(const void *self, ir_node *irn, ir_entity *ent);
+ void (*set_frame_entity)(ir_node *irn, ir_entity *ent);
/**
* Set the offset of a node carrying an entity on the stack frame.
* @param irn The node.
* @param offset The offset of the node's stack frame entity.
*/
- void (*set_frame_offset)(const void *self, ir_node *irn, int offset);
+ void (*set_frame_offset)(ir_node *irn, int offset);
/**
* Returns the delta of the stackpointer for nodes that increment or
* @return 0 if the stackpointer is not modified with a constant
* value, otherwise the increment/decrement value
*/
- int (*get_sp_bias)(const void *self, const ir_node *irn);
+ int (*get_sp_bias)(const ir_node *irn);
/**
* Returns an inverse operation which yields the i-th argument
* @param obstack The obstack to use for allocation of the returned nodes array
* @return The inverse operation or NULL if operation invertible
*/
- arch_inverse_t *(*get_inverse)(const void *self, const ir_node *irn, int i, arch_inverse_t *inverse, struct obstack *obstack);
+ arch_inverse_t *(*get_inverse)(const ir_node *irn, int i, arch_inverse_t *inverse, struct obstack *obstack);
/**
* Get the estimated cycle count for @p irn.
*
* @return The estimated cycle count for this operation
*/
- int (*get_op_estimated_cost)(const void *self, const ir_node *irn);
+ int (*get_op_estimated_cost)(const ir_node *irn);
/**
* Asks the backend whether operand @p i of @p irn can be loaded form memory internally
*
* @return nonzero if argument can be loaded or zero otherwise
*/
- int (*possible_memory_operand)(const void *self, const ir_node *irn, unsigned int i);
+ int (*possible_memory_operand)(const ir_node *irn, unsigned int i);
/**
* Ask the backend to assimilate @p reload of operand @p i into @p irn.
* @param spill The spill.
* @param i The position of the reload.
*/
- void (*perform_memory_operand)(const void *self, ir_node *irn, ir_node *spill, unsigned int i);
+ void (*perform_memory_operand)(ir_node *irn, ir_node *spill, unsigned int i);
};
/**
}
static void
-be_node_set_irn_reg(const void *self, ir_node *irn, const arch_register_t *reg)
+be_node_set_irn_reg(ir_node *irn, const arch_register_t *reg)
{
be_reg_data_t *r = retrieve_reg_data(irn);
- (void) self;
r->reg = reg;
}
/* Set output constraint to stack register. */
be_node_set_reg_class(irn, 0, sp->reg_class);
be_set_constr_single_reg(irn, BE_OUT_POS(0), sp);
- be_node_set_irn_reg(NULL, irn, sp);
+ be_node_set_irn_reg(irn, sp);
return irn;
}
}
static const arch_register_req_t *
-be_node_get_irn_reg_req(const void *self, const ir_node *irn, int pos)
+be_node_get_irn_reg_req(const ir_node *irn, int pos)
{
int out_pos = pos;
- (void) self;
if (pos < 0) {
if (get_irn_mode(irn) == mode_T)
return arch_no_register_req;
}
const arch_register_t *
-be_node_get_irn_reg(const void *self, const ir_node *irn)
+be_node_get_irn_reg(const ir_node *irn)
{
be_reg_data_t *r;
- (void) self;
if (get_irn_mode(irn) == mode_T)
return NULL;
r = retrieve_reg_data(irn);
return r->reg;
}
-static arch_irn_class_t be_node_classify(const void *self, const ir_node *irn)
+static arch_irn_class_t be_node_classify(const ir_node *irn)
{
- (void) self;
-
restart:
switch (get_irn_opcode(irn)) {
#define XXX(a,b) case a: return b
return 0;
}
-static arch_irn_flags_t be_node_get_flags(const void *self, const ir_node *node)
+static arch_irn_flags_t be_node_get_flags(const ir_node *node)
{
be_req_t *bereq;
int pos = -1;
- (void) self;
if(is_Proj(node)) {
pos = OUT_POS(get_Proj_proj(node));
return bereq->flags;
}
-static ir_entity *be_node_get_frame_entity(const void *self, const ir_node *irn)
+static ir_entity *be_node_get_frame_entity(const ir_node *irn)
{
- (void) self;
return be_get_frame_entity(irn);
}
-static void be_node_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent)
+static void be_node_set_frame_entity(ir_node *irn, ir_entity *ent)
{
be_frame_attr_t *a;
- (void) self;
assert(be_has_frame_entity(irn));
a->ent = ent;
}
-static void be_node_set_frame_offset(const void *self, ir_node *irn, int offset)
+static void be_node_set_frame_offset(ir_node *irn, int offset)
{
- (void) self;
if(be_has_frame_entity(irn)) {
be_frame_attr_t *a = get_irn_attr(irn);
a->offset = offset;
}
}
-static int be_node_get_sp_bias(const void *self, const ir_node *irn)
+static int be_node_get_sp_bias(const ir_node *irn)
{
- (void) self;
if(be_is_IncSP(irn))
return be_get_IncSP_offset(irn);
if(be_is_Call(irn))
}
static
-const arch_register_req_t *phi_get_irn_reg_req(const void *self,
- const ir_node *irn, int pos)
+const arch_register_req_t *phi_get_irn_reg_req(const ir_node *irn, int pos)
{
phi_attr_t *attr;
- (void) self;
(void) pos;
if(!mode_is_datab(get_irn_mode(irn)))
attr->flags = flags;
}
-static
-void phi_set_irn_reg(const void *self, ir_node *irn, const arch_register_t *reg)
+static void phi_set_irn_reg(ir_node *irn, const arch_register_t *reg)
{
phi_attr_t *attr = get_Phi_attr(irn);
- (void) self;
attr->reg = reg;
}
-static
-const arch_register_t *phi_get_irn_reg(const void *self, const ir_node *irn)
+static const arch_register_t *phi_get_irn_reg(const ir_node *irn)
{
phi_attr_t *attr = get_Phi_attr(irn);
- (void) self;
return attr->reg;
}
-static
-arch_irn_class_t phi_classify(const void *self, const ir_node *irn)
+static arch_irn_class_t phi_classify(const ir_node *irn)
{
- (void) self;
(void) irn;
return arch_irn_class_normal;
}
-static
-arch_irn_flags_t phi_get_flags(const void *self, const ir_node *irn)
+static arch_irn_flags_t phi_get_flags(const ir_node *irn)
{
phi_attr_t *attr = get_Phi_attr(irn);
- (void) self;
return attr->flags;
}
-static
-ir_entity *phi_get_frame_entity(const void *self, const ir_node *irn)
+static ir_entity *phi_get_frame_entity(const ir_node *irn)
{
- (void) self;
(void) irn;
return NULL;
}
-static
-void phi_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent)
+static void phi_set_frame_entity(ir_node *irn, ir_entity *ent)
{
- (void) self;
(void) irn;
(void) ent;
assert(0);
}
-static
-void phi_set_frame_offset(const void *self, ir_node *irn, int bias)
+static void phi_set_frame_offset(ir_node *irn, int bias)
{
- (void) self;
(void) irn;
(void) bias;
assert(0);
}
-static
-int phi_get_sp_bias(const void* self, const ir_node *irn)
+static int phi_get_sp_bias(const ir_node *irn)
{
- (void) self;
(void) irn;
return 0;
}
* If the node returns a tuple (mode_T) then the proj's
* will be asked for this information.
*/
-static const arch_register_req_t *ia32_get_irn_reg_req(const void *self,
- const ir_node *node,
+static const arch_register_req_t *ia32_get_irn_reg_req(const ir_node *node,
int pos)
{
ir_mode *mode = get_irn_mode(node);
long node_pos;
- (void)self;
if (mode == mode_X || is_Block(node)) {
return arch_no_register_req;
}
return arch_no_register_req;
}
-static void ia32_set_irn_reg(const void *self, ir_node *irn,
- const arch_register_t *reg)
+static void ia32_set_irn_reg(ir_node *irn, const arch_register_t *reg)
{
int pos = 0;
- (void) self;
if (get_irn_mode(irn) == mode_X) {
return;
}
}
-static const arch_register_t *ia32_get_irn_reg(const void *self,
- const ir_node *irn)
+static const arch_register_t *ia32_get_irn_reg(const ir_node *irn)
{
int pos = 0;
const arch_register_t *reg = NULL;
- (void) self;
if (is_Proj(irn)) {
return reg;
}
-static arch_irn_class_t ia32_classify(const void *self, const ir_node *irn) {
+static arch_irn_class_t ia32_classify(const ir_node *irn) {
arch_irn_class_t classification = arch_irn_class_normal;
- (void) self;
irn = skip_Proj_const(irn);
return classification;
}
-static arch_irn_flags_t ia32_get_flags(const void *self, const ir_node *irn) {
+static arch_irn_flags_t ia32_get_flags(const ir_node *irn) {
arch_irn_flags_t flags = arch_irn_flags_none;
- (void) self;
if (is_Unknown(irn))
return arch_irn_flags_ignore;
ir_graph *irg; /**< The associated graph. */
} ia32_abi_env_t;
-static ir_entity *ia32_get_frame_entity(const void *self, const ir_node *irn) {
- (void) self;
+static ir_entity *ia32_get_frame_entity(const ir_node *irn) {
return is_ia32_irn(irn) ? get_ia32_frame_ent(irn) : NULL;
}
-static void ia32_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent) {
- (void) self;
+static void ia32_set_frame_entity(ir_node *irn, ir_entity *ent) {
set_ia32_frame_ent(irn, ent);
}
-static void ia32_set_frame_offset(const void *self, ir_node *irn, int bias)
+static void ia32_set_frame_offset(ir_node *irn, int bias)
{
- (void) self;
-
if (get_ia32_frame_ent(irn) == NULL)
return;
add_ia32_am_offs_int(irn, bias);
}
-static int ia32_get_sp_bias(const void *self, const ir_node *node)
+static int ia32_get_sp_bias(const ir_node *node)
{
- (void) self;
-
if (is_ia32_Push(node))
return 4;
*
* @return The estimated cycle count for this operation
*/
-static int ia32_get_op_estimated_cost(const void *self, const ir_node *irn)
+static int ia32_get_op_estimated_cost(const ir_node *irn)
{
int cost;
ia32_op_type_t op_tp;
- (void) self;
if (is_Proj(irn))
return 0;
* @param obstack The obstack to use for allocation of the returned nodes array
* @return The inverse operation or NULL if operation invertible
*/
-static arch_inverse_t *ia32_get_inverse(const void *self, const ir_node *irn, int i, arch_inverse_t *inverse, struct obstack *obst) {
+static arch_inverse_t *ia32_get_inverse(const ir_node *irn, int i, arch_inverse_t *inverse, struct obstack *obst) {
ir_graph *irg;
ir_mode *mode;
ir_mode *irn_mode;
ir_node *block, *noreg, *nomem;
dbg_info *dbg;
- (void) self;
/* we cannot invert non-ia32 irns */
if (! is_ia32_irn(irn))
* @param i The operands position
* @return Non-Zero if operand can be loaded
*/
-static int ia32_possible_memory_operand(const void *self, const ir_node *irn, unsigned int i) {
+static int ia32_possible_memory_operand(const ir_node *irn, unsigned int i) {
ir_node *op = get_irn_n(irn, i);
const ir_mode *mode = get_irn_mode(op);
const ir_mode *spillmode = get_spill_mode(op);
- (void) self;
if (
(i != n_ia32_binary_left && i != n_ia32_binary_right) || /* a "real" operand position must be requested */
return 1;
}
-static void ia32_perform_memory_operand(const void *self, ir_node *irn,
- ir_node *spill, unsigned int i)
+static void ia32_perform_memory_operand(ir_node *irn, ir_node *spill,
+ unsigned int i)
{
ia32_code_gen_t *cg = ia32_current_cg;
- (void) self;
- assert(ia32_possible_memory_operand(self, irn, i) && "Cannot perform memory operand change");
+ assert(ia32_possible_memory_operand(irn, i) && "Cannot perform memory operand change");
if (i == n_ia32_binary_left) {
ia32_swap_left_right(irn);
* Returns the estimated execution time of an ia32 irn.
*/
static sched_timestep_t ia32_sched_exectime(void *env, const ir_node *irn) {
- const arch_env_t *arch_env = env;
- return is_ia32_irn(irn) ? ia32_get_op_estimated_cost(arch_get_irn_ops(arch_env, irn), irn) : 1;
+ (void) env;
+ return is_ia32_irn(irn) ? ia32_get_op_estimated_cost(irn) : 1;
}
list_sched_selector_t ia32_sched_selector;
* will be asked for this information.
*/
static const
-arch_register_req_t *mips_get_irn_reg_req(const void *self,
- const ir_node *node, int pos)
+arch_register_req_t *mips_get_irn_reg_req(const ir_node *node, int pos)
{
long node_pos = pos == -1 ? 0 : pos;
ir_mode *mode = get_irn_mode(node);
- (void) self;
if (is_Block(node) || mode == mode_X || mode == mode_M) {
return arch_no_register_req;
return arch_no_register_req;
}
-static void mips_set_irn_reg(const void *self, ir_node *irn,
- const arch_register_t *reg)
+static void mips_set_irn_reg(ir_node *irn, const arch_register_t *reg)
{
int pos = 0;
- (void) self;
if (is_Proj(irn)) {
}
}
-static const arch_register_t *mips_get_irn_reg(const void *self,
- const ir_node *irn)
+static const arch_register_t *mips_get_irn_reg(const ir_node *irn)
{
int pos = 0;
const arch_register_t *reg = NULL;
- (void) self;
if (is_Proj(irn)) {
return reg;
}
-static arch_irn_class_t mips_classify(const void *self, const ir_node *irn)
+static arch_irn_class_t mips_classify(const ir_node *irn)
{
- (void) self;
irn = skip_Proj_const(irn);
if (is_cfop(irn)) {
return 0;
}
-static arch_irn_flags_t mips_get_flags(const void *self, const ir_node *irn)
+static arch_irn_flags_t mips_get_flags(const ir_node *irn)
{
- (void) self;
irn = skip_Proj_const(irn);
if (!is_mips_irn(irn))
return is_mips_sw(node) || is_mips_sh(node) || is_mips_sb(node);
}
-static ir_entity *mips_get_frame_entity(const void *self, const ir_node *node)
+static ir_entity *mips_get_frame_entity(const ir_node *node)
{
const mips_load_store_attr_t *attr;
- (void) self;
if(!is_mips_irn(node))
return NULL;
return attr->stack_entity;
}
-static void mips_set_frame_entity(const void *self, ir_node *node,
- ir_entity *entity)
+static void mips_set_frame_entity(ir_node *node, ir_entity *entity)
{
mips_load_store_attr_t *attr;
- (void) self;
if(!is_mips_irn(node)) {
panic("trying to set frame entity on non load/store node %+F\n", node);
* This function is called by the generic backend to correct offsets for
* nodes accessing the stack.
*/
-static void mips_set_frame_offset(const void *self, ir_node *node, int offset)
+static void mips_set_frame_offset(ir_node *node, int offset)
{
mips_load_store_attr_t *attr;
- (void) self;
if(!is_mips_irn(node)) {
panic("trying to set frame offset on non load/store node %+F\n", node);
}
}
-static int mips_get_sp_bias(const void *self, const ir_node *irn)
+static int mips_get_sp_bias(const ir_node *irn)
{
- (void) self;
(void) irn;
return 0;
}
// - setup first part of stackframe
sp = new_rd_mips_addu(NULL, irg, block, sp,
mips_create_Immediate(initialstackframesize));
- mips_set_irn_reg(NULL, sp, &mips_gp_regs[REG_SP]);
+ mips_set_irn_reg(sp, &mips_gp_regs[REG_SP]);
set_mips_flags(sp, arch_irn_flags_ignore);
/* TODO: where to get an edge with a0-a3
// save old framepointer
sp = new_rd_mips_addu(NULL, irg, block, sp,
mips_create_Immediate(-initialstackframesize));
- mips_set_irn_reg(NULL, sp, &mips_gp_regs[REG_SP]);
+ mips_set_irn_reg(sp, &mips_gp_regs[REG_SP]);
set_mips_flags(sp, arch_irn_flags_ignore);
reg = be_abi_reg_map_get(reg_map, &mips_gp_regs[REG_FP]);
// setup framepointer
fp = new_rd_mips_addu(NULL, irg, block, sp,
mips_create_Immediate(-initialstackframesize));
- mips_set_irn_reg(NULL, fp, &mips_gp_regs[REG_FP]);
+ mips_set_irn_reg(fp, &mips_gp_regs[REG_FP]);
set_mips_flags(fp, arch_irn_flags_ignore);
be_abi_reg_map_set(reg_map, &mips_gp_regs[REG_FP], fp);
// copy fp to sp
sp = new_rd_mips_or(NULL, irg, block, fp, mips_create_zero());
- mips_set_irn_reg(NULL, sp, &mips_gp_regs[REG_SP]);
+ mips_set_irn_reg(sp, &mips_gp_regs[REG_SP]);
set_mips_flags(sp, arch_irn_flags_ignore);
// 1. restore fp
* If the node returns a tuple (mode_T) then the proj's
* will be asked for this information.
*/
-static const
-arch_register_req_t *ppc32_get_irn_reg_req(const void *self,
- const ir_node *irn, int pos) {
+static const arch_register_req_t *ppc32_get_irn_reg_req(const ir_node *irn,
+ int pos)
+{
long node_pos = pos == -1 ? 0 : pos;
ir_mode *mode = get_irn_mode(irn);
FIRM_DBG_REGISTER(firm_dbg_module_t *mod, DEBUG_MODULE);
- (void) self;
if (is_Block(irn) || mode == mode_X || mode == mode_M) {
DBG((mod, LEVEL_1, "ignoring block, mode_X or mode_M node %+F\n", irn));
return arch_no_register_req;
}
-static void ppc32_set_irn_reg(const void *self, ir_node *irn, const arch_register_t *reg) {
+static void ppc32_set_irn_reg(ir_node *irn, const arch_register_t *reg)
+{
int pos = 0;
- (void) self;
if (is_Proj(irn)) {
}
}
-static const arch_register_t *ppc32_get_irn_reg(const void *self, const ir_node *irn) {
+static const arch_register_t *ppc32_get_irn_reg(const ir_node *irn)
+{
int pos = 0;
const arch_register_t *reg = NULL;
- (void) self;
if (is_Proj(irn)) {
return reg;
}
-static arch_irn_class_t ppc32_classify(const void *self, const ir_node *irn) {
- (void) self;
+static arch_irn_class_t ppc32_classify(const ir_node *irn)
+{
irn = skip_Proj_const(irn);
if (is_cfop(irn)) {
return 0;
}
-static arch_irn_flags_t ppc32_get_flags(const void *self, const ir_node *irn) {
- (void) self;
+static arch_irn_flags_t ppc32_get_flags(const ir_node *irn)
+{
irn = skip_Proj_const(irn);
if (is_ppc32_irn(irn)) {
return 0;
}
-static ir_entity *ppc32_get_frame_entity(const void *self, const ir_node *irn) {
- (void) self;
+static ir_entity *ppc32_get_frame_entity(const ir_node *irn)
+{
if(!is_ppc32_irn(irn)) return NULL;
if(get_ppc32_type(irn)!=ppc32_ac_FrameEntity) return NULL;
return get_ppc32_frame_entity(irn);
}
-static void ppc32_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent) {
- (void) self;
+static void ppc32_set_frame_entity(ir_node *irn, ir_entity *ent)
+{
if (! is_ppc32_irn(irn) || get_ppc32_type(irn) != ppc32_ac_FrameEntity)
return;
set_ppc32_frame_entity(irn, ent);
* This function is called by the generic backend to correct offsets for
* nodes accessing the stack.
*/
-static void ppc32_set_stack_bias(const void *self, ir_node *irn, int bias) {
- (void) self;
+static void ppc32_set_stack_bias(ir_node *irn, int bias)
+{
set_ppc32_offset(irn, bias);
}
-static int ppc32_get_sp_bias(const void *self, const ir_node *irn) {
- (void) self;
+static int ppc32_get_sp_bias(const ir_node *irn)
+{
(void) irn;
return 0;
}