projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed addressmode bug
[libfirm]
/
ir
/
be
/
benode.c
diff --git
a/ir/be/benode.c
b/ir/be/benode.c
index
51d42e6
..
96bdd0b
100644
(file)
--- a/
ir/be/benode.c
+++ b/
ir/be/benode.c
@@
-335,6
+335,10
@@
ir_node *be_new_Copy(const arch_register_class_t *cls, ir_graph *irg, ir_node *b
return res;
}
return res;
}
+ir_node *be_get_Copy_op(const ir_node *cpy) {
+ return get_irn_n(cpy, be_pos_Copy_op);
+}
+
ir_node *be_new_Keep(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, int n, ir_node *in[])
{
int i;
ir_node *be_new_Keep(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, int n, ir_node *in[])
{
int i;
@@
-705,6
+709,11
@@
void be_node_set_req_type(ir_node *irn, int pos, arch_register_req_type_t type)
r->req.type = type;
}
r->req.type = type;
}
+ir_node *be_get_IncSP_pred(ir_node *irn) {
+ assert(be_is_IncSP(irn));
+ return get_irn_n(irn, 0);
+}
+
void be_set_IncSP_offset(ir_node *irn, unsigned offset)
{
be_stack_attr_t *a = get_irn_attr(irn);
void be_set_IncSP_offset(ir_node *irn, unsigned offset)
{
be_stack_attr_t *a = get_irn_attr(irn);
@@
-908,7
+917,7
@@
static void *put_out_reg_req(arch_register_req_t *req, const ir_node *irn, int o
if(be_is_Copy(irn)) {
req->type |= arch_register_req_type_should_be_same;
if(be_is_Copy(irn)) {
req->type |= arch_register_req_type_should_be_same;
- req->other_same =
get_irn_n(irn, be_pos_Copy_orig
);
+ req->other_same =
be_get_Copy_op(irn
);
}
}
else {
}
}
else {
@@
-974,11
+983,12
@@
static arch_irn_class_t be_node_classify(const void *_self, const ir_node *irn)
redir_proj((const ir_node **) &irn, -1);
switch(be_get_irn_opcode(irn)) {
redir_proj((const ir_node **) &irn, -1);
switch(be_get_irn_opcode(irn)) {
-#define XXX(a,b) case beo_ ## a: return arch_irn_class_ ## b;
- XXX(Spill, spill)
- XXX(Reload, reload)
- XXX(Perm, perm)
- XXX(Copy, copy)
+#define XXX(a,b) case beo_ ## a: return arch_irn_class_ ## b
+ XXX(Spill, spill);
+ XXX(Reload, reload);
+ XXX(Perm, perm);
+ XXX(Copy, copy);
+ XXX(Return, branch);
#undef XXX
default:
return 0;
#undef XXX
default:
return 0;