summaryrefslogtreecommitdiffhomepage
path: root/ir/ir
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2019-04-05 14:34:01 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2019-04-05 14:34:01 +0200
commit80146aaacf50c17449e07b8aac0000e5267aed59 (patch)
treef5fb1144e483b578a0e41790ecf86182e0bc0d38 /ir/ir
parent881e05880db5233ddaa25bd0ea0b6e07891927e6 (diff)
api: Pass ir_cons_flags to new_*_ASM(), so the pin state is set atomically.
Diffstat (limited to 'ir/ir')
-rw-r--r--ir/ir/irio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ir/ir/irio.c b/ir/ir/irio.c
index 73ed6e3..8402426 100644
--- a/ir/ir/irio.c
+++ b/ir/ir/irio.c
@@ -1996,15 +1996,16 @@ static ir_node *read_ASM(read_env_t *env)
ARR_APP1(ident*, clobbers, clobber);
}
- int pinned = read_pinned(env);
+ ir_cons_flags flags = cons_none;
+ if (!read_pinned(env))
+ flags |= cons_floats;
int n_in = read_preds(env);
ir_node **in = (ir_node**)obstack_finish(&env->preds_obst);
ir_node *newnode = new_r_ASM(block, mem, n_in, in, asm_text,
ARR_LEN(constraints), constraints,
- ARR_LEN(clobbers), clobbers);
- set_irn_pinned(newnode, pinned);
+ ARR_LEN(clobbers), clobbers, flags);
obstack_free(&env->preds_obst, in);
DEL_ARR_F(clobbers);
DEL_ARR_F(constraints);