- 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:
- {
- bitset_t *bs = bitset_alloca(req.cls->n_regs);
- req.data.limited(irn, pos, bs);
- res = bitset_is_set(bs, arch_register_get_index(reg));
- }
- break;
- default:
- res = 0;
+
+ if(req.type == arch_register_req_type_none)
+ return 0;
+
+ if(arch_register_req_is(&req, limited)) {
+ bitset_t *bs = bitset_alloca(req.cls->n_regs);
+ req.limited(irn, pos, bs);
+ return bitset_is_set(bs, arch_register_get_index(reg));