summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beasm.c
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-07-20 11:14:27 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2018-07-20 15:06:35 +0200
commit01778cceafea83955d9ad7bff19babaf7e0a0747 (patch)
treef17089c1e58d07343fba6631437abb0a79ced0f8 /ir/be/beasm.c
parentde250100df315c31fc533f940b86d0fa3a8abd26 (diff)
beasm: Write the updated output requirement for an early clobber into the correct slot.
Diffstat (limited to 'ir/be/beasm.c')
-rw-r--r--ir/be/beasm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ir/be/beasm.c b/ir/be/beasm.c
index 416c65c..a4d72c8 100644
--- a/ir/be/beasm.c
+++ b/ir/be/beasm.c
@@ -211,7 +211,8 @@ ir_node *be_make_asm(ir_node const *const node, be_asm_info_t const *const info,
for (unsigned o = 0, n = get_ASM_n_constraints(node); o != n; ++o) {
ir_asm_constraint const *const constraint = &constraints[o];
if (strchr(get_id_str(constraint->constraint), '&')) {
- arch_register_req_t const *const oreq = out_reqs[constraint->out_pos];
+ arch_register_req_t const **const oslot = &out_reqs[constraint->out_pos];
+ arch_register_req_t const *const oreq = *oslot;
unsigned different = 0;
for (unsigned i = 0; i != orig_n_ins; ++i) {
@@ -223,7 +224,7 @@ ir_node *be_make_asm(ir_node const *const node, be_asm_info_t const *const info,
arch_register_req_t *const req = OALLOCZ(obst, arch_register_req_t);
*req = *oreq;
req->must_be_different = different;
- out_reqs[o] = req;
+ *oslot = req;
}
}
}