summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beasm.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-06-30 08:07:07 +0200
committerMatthias Braun <matze@braunis.de>2015-07-01 07:40:03 +0200
commitc15ec9596306be5ea62c087d37024f0cac05d490 (patch)
tree7f1194ce671d1c4d68c405ab86ba2382080bac58 /ir/be/beasm.c
parent58b0168a2361d25b641eb0d5b8382ee75173b562 (diff)
bearch: rework should_be_same constraint
- Rename other_same field to should_be_same. - Remove arch_register_req_type_other_same, it's enough to see if the should_be_same field is not zero.
Diffstat (limited to 'ir/be/beasm.c')
-rw-r--r--ir/be/beasm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ir/be/beasm.c b/ir/be/beasm.c
index e8d2cb8..9f4b3fa 100644
--- a/ir/be/beasm.c
+++ b/ir/be/beasm.c
@@ -23,11 +23,10 @@ arch_register_req_t const *be_make_register_req(struct obstack *obst, be_asm_con
if (same_as >= n_outs)
panic("invalid output number in same_as constraint");
- arch_register_req_t *const req = OALLOC(obst, arch_register_req_t);
+ arch_register_req_t *const req = OALLOCZ(obst, arch_register_req_t);
arch_register_req_t const *const other = out_reqs[same_as];
- *req = *other;
- req->type |= arch_register_req_type_should_be_same;
- req->other_same = 1U << pos;
+ *req = *other;
+ req->should_be_same = 1U << pos;
/* Switch constraints. This is because in firm we have same_as
* constraints on the output constraints while in the gcc asm syntax
@@ -215,7 +214,7 @@ ir_node *be_make_asm(ir_node const *const node, ir_node **in, arch_register_req_
}
if (different != 0) {
- arch_register_req_t *const req = OALLOC(obst, arch_register_req_t);
+ arch_register_req_t *const req = OALLOCZ(obst, arch_register_req_t);
*req = *oreq;
req->type |= arch_register_req_type_must_be_different;
req->other_different = different;