summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bearch.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2016-03-20 06:21:52 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2016-03-21 14:10:55 +0100
commit2da93aea64c0cd68c5e12dc6f9a9cf24f643f2eb (patch)
tree067ce66e8680f00b0c282d25197f7a53ee019897 /ir/be/bearch.c
parent35093541d98be38944c77818bfa2663d590e0968 (diff)
be: Factorise code to create a register requirement.
Diffstat (limited to 'ir/be/bearch.c')
-rw-r--r--ir/be/bearch.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ir/be/bearch.c b/ir/be/bearch.c
index 1e6f5e5..edba420 100644
--- a/ir/be/bearch.c
+++ b/ir/be/bearch.c
@@ -158,6 +158,15 @@ int be_default_is_valid_clobber(char const *const clobber)
return false;
}
+arch_register_req_t *be_create_cls_req(ir_graph *const irg, arch_register_class_t const *const cls, unsigned char const width)
+{
+ struct obstack *const obst = be_get_be_obst(irg);
+ arch_register_req_t *const req = OALLOCZ(obst, arch_register_req_t);
+ req->cls = cls;
+ req->width = width;
+ return req;
+}
+
arch_register_req_t const *be_create_reg_req(ir_graph *const irg, arch_register_t const *const reg, bool const ignore)
{
if (!ignore)