projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed emit
[libfirm]
/
ir
/
be
/
bearch.c
diff --git
a/ir/be/bearch.c
b/ir/be/bearch.c
index
198b4a5
..
9b3303c
100644
(file)
--- a/
ir/be/bearch.c
+++ b/
ir/be/bearch.c
@@
-85,8
+85,7
@@
const arch_register_req_t *arch_get_register_req(const arch_env_t *env,
return ops->impl->get_irn_reg_req(ops, req, irn, pos);
}
return ops->impl->get_irn_reg_req(ops, req, irn, pos);
}
-int arch_get_allocatable_regs(const arch_env_t *env, const ir_node *irn,
- int pos, const arch_register_class_t *cls, bitset_t *bs)
+int arch_get_allocatable_regs(const arch_env_t *env, const ir_node *irn, int pos, bitset_t *bs)
{
arch_register_req_t local_req;
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
{
arch_register_req_t local_req;
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
@@
-97,8
+96,10
@@
int arch_get_allocatable_regs(const arch_env_t *env, const ir_node *irn,
return 0;
}
return 0;
}
- if(arch_register_req_is(req, limited))
- return req->limited(irn, pos, bs);
+ if(arch_register_req_is(req, limited)) {
+ req->limited(req->limited_env, bs);
+ return bitset_popcnt(bs);
+ }
arch_register_class_put(req->cls, bs);
return req->cls->n_regs;
arch_register_class_put(req->cls, bs);
return req->cls->n_regs;
@@
-125,7
+126,7
@@
int arch_reg_is_allocatable(const arch_env_t *env, const ir_node *irn,
if(arch_register_req_is(&req, limited)) {
bitset_t *bs = bitset_alloca(req.cls->n_regs);
if(arch_register_req_is(&req, limited)) {
bitset_t *bs = bitset_alloca(req.cls->n_regs);
- req.limited(
irn, pos
, bs);
+ req.limited(
req.limited_env
, bs);
return bitset_is_set(bs, arch_register_get_index(reg));
}
return bitset_is_set(bs, arch_register_get_index(reg));
}