projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
78df118
)
Bugfixes with register-req
author
Daniel Grund
<grund@cs.uni-saarland.de>
Wed, 21 Dec 2005 17:25:23 +0000
(17:25 +0000)
committer
Daniel Grund
<grund@cs.uni-saarland.de>
Wed, 21 Dec 2005 17:25:23 +0000
(17:25 +0000)
ir/be/bearch.c
patch
|
blob
|
history
diff --git
a/ir/be/bearch.c
b/ir/be/bearch.c
index
8084dc9
..
6d8f38f
100644
(file)
--- a/
ir/be/bearch.c
+++ b/
ir/be/bearch.c
@@
-91,6
+91,12
@@
int arch_get_allocatable_regs(const arch_env_t *env, const ir_node *irn,
const arch_register_req_t *req = ops->get_irn_reg_req(ops, &local_req, irn, pos);
switch(req->type) {
const arch_register_req_t *req = ops->get_irn_reg_req(ops, &local_req, irn, pos);
switch(req->type) {
+ case arch_register_req_type_none:
+ bitset_clear_all(bs);
+ return 0;
+
+ case arch_register_req_type_should_be_different:
+ case arch_register_req_type_should_be_same:
case arch_register_req_type_normal:
arch_register_class_put(req->cls, bs);
return req->cls->n_regs;
case arch_register_req_type_normal:
arch_register_class_put(req->cls, bs);
return req->cls->n_regs;
@@
-123,6
+129,8
@@
int arch_reg_is_allocatable(const arch_env_t *env, const ir_node *irn,
arch_get_register_req(env, &req, irn, pos);
switch(req.type) {
case arch_register_req_type_normal:
arch_get_register_req(env, &req, irn, pos);
switch(req.type) {
case arch_register_req_type_normal:
+ case arch_register_req_type_should_be_different:
+ case arch_register_req_type_should_be_same:
res = req.cls == reg->reg_class;
break;
case arch_register_req_type_limited:
res = req.cls == reg->reg_class;
break;
case arch_register_req_type_limited:
@@
-131,6
+139,7
@@
int arch_reg_is_allocatable(const arch_env_t *env, const ir_node *irn,
req.data.limited(irn, pos, bs);
res = bitset_is_set(bs, arch_register_get_index(reg));
}
req.data.limited(irn, pos, bs);
res = bitset_is_set(bs, arch_register_get_index(reg));
}
+ break;
default:
res = 0;
}
default:
res = 0;
}