summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bearch.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2016-03-19 17:20:46 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2016-03-21 13:33:38 +0100
commit8162ac734e468bb977246e76c7b8458f640a7271 (patch)
tree512619e3ea63027c7ae182d600e26a0cd696e75a /ir/be/bearch.c
parentafd6d427ae531cd2978843e9d7d73247e4be09b2 (diff)
be: Move 'be_create_reg_req()' from benode to bearch.
Diffstat (limited to 'ir/be/bearch.c')
-rw-r--r--ir/be/bearch.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ir/be/bearch.c b/ir/be/bearch.c
index 10d1ef4..7e8b831 100644
--- a/ir/be/bearch.c
+++ b/ir/be/bearch.c
@@ -158,6 +158,19 @@ int be_default_is_valid_clobber(char const *const clobber)
return false;
}
+arch_register_req_t const *be_create_reg_req(struct obstack *const obst, arch_register_t const *const reg, bool const ignore)
+{
+ arch_register_class_t const *const cls = reg->cls;
+ unsigned *const limited = rbitset_obstack_alloc(obst, cls->n_regs);
+ rbitset_set(limited, reg->index);
+ arch_register_req_t *const req = OALLOCZ(obst, arch_register_req_t);
+ req->cls = cls;
+ req->limited = limited;
+ req->width = 1;
+ req->ignore = ignore;
+ return req;
+}
+
BE_REGISTER_MODULE_CONSTRUCTOR(be_init_arch)
void be_init_arch(void)
{