Commit bad0a621 authored by Christian Würdig's avatar Christian Würdig
Browse files

Allow any class when there is no special register requirement

parent 22021c7b
...@@ -198,7 +198,7 @@ static bitset_t *get_decisive_partner_regs(bitset_t *bs, const be_operand_t *o1, ...@@ -198,7 +198,7 @@ static bitset_t *get_decisive_partner_regs(bitset_t *bs, const be_operand_t *o1,
return bs; return bs;
} }
assert(o1->req->cls == o2->req->cls); assert(o1->req->cls == o2->req->cls || ! o1->req->cls || ! o2->req->cls);
if(bitset_contains(o1->regs, o2->regs)) if(bitset_contains(o1->regs, o2->regs))
bitset_copy(bs, o1->regs); bitset_copy(bs, o1->regs);
......
...@@ -86,21 +86,21 @@ be_insn_t *be_scan_insn(const be_insn_env_t *env, ir_node *irn) ...@@ -86,21 +86,21 @@ be_insn_t *be_scan_insn(const be_insn_env_t *env, ir_node *irn)
/* Compute the admissible registers bitsets. */ /* Compute the admissible registers bitsets. */
for (i = 0; i < insn->n_ops; ++i) { for (i = 0; i < insn->n_ops; ++i) {
be_operand_t *op = &insn->ops[i]; be_operand_t *op = &insn->ops[i];
const arch_register_req_t *req = op->req; const arch_register_req_t *req = op->req;
const arch_register_class_t *cls = req->cls;
#if 0 arch_register_req_type_t type = req->type;
// Matze: can we do without this?
if (req->cls == NULL && req->type == arch_register_req_type_none) { /* If there is no special requirement, we allow current class here */
req->cls = env->cls; if (cls == NULL && req->type == arch_register_req_type_none) {
req->type = arch_register_req_type_normal; cls = env->cls;
type = arch_register_req_type_normal;
} }
#endif
assert(req->cls == env->cls); assert(cls == env->cls);
op->regs = bitset_obstack_alloc(obst, env->cls->n_regs); op->regs = bitset_obstack_alloc(obst, env->cls->n_regs);
if (arch_register_req_is(req, limited)) { if (type & arch_register_req_type_limited) {
rbitset_copy_to_bitset(req->limited, op->regs); rbitset_copy_to_bitset(req->limited, op->regs);
} else { } else {
arch_put_non_ignore_regs(arch_env, env->cls, op->regs); arch_put_non_ignore_regs(arch_env, env->cls, op->regs);
......
Supports Markdown
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