summaryrefslogtreecommitdiffhomepage
path: root/ir/lower
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-05-10 06:23:18 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2018-05-11 07:15:44 +0200
commit9a825064696eebf733ccfc8d72f22c1aef3ec1ff (patch)
tree491ac35c915c549bb4925e9519f282eb307acc1a /ir/lower
parentb3791a21b6ee22c0533cc513dec7f2edddf6be8c (diff)
ir: Overhaul representation of ASM constraints in the IR.
Now the constraints are a mapping from the template position to the input/output positions instead of the other way round. Also there is only one list of constraints instead of a separate one for input and output. This simplifies handling quite a bit, in particular the numbering. E.g. "=m" actually is an input (for the address) and this caused miscounting when the constraints were processed. Also processing of 64 bit operands also lead to miscounting. This fixes x86code/asm_test15.c and x86code/asm_test19.c
Diffstat (limited to 'ir/lower')
-rw-r--r--ir/lower/lower_dw.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/ir/lower/lower_dw.c b/ir/lower/lower_dw.c
index 9a0357e..25661f4 100644
--- a/ir/lower/lower_dw.c
+++ b/ir/lower/lower_dw.c
@@ -1962,18 +1962,10 @@ static void lower_Mux(ir_node *const mux)
*/
static void lower_ASM(ir_node *const asmn)
{
- foreach_irn_in_r(asmn, i, op) {
- ir_mode *op_mode = get_irn_mode(op);
- if (needs_lowering(op_mode))
- panic("lowering ASM 64bit input unimplemented");
- }
-
- ir_asm_constraint *const output_constraints = get_ASM_output_constraints(asmn);
- size_t const n_outs = get_ASM_n_output_constraints(asmn);
- for (size_t o = 0; o < n_outs; ++o) {
- const ir_asm_constraint *constraint = &output_constraints[o];
- if (needs_lowering(constraint->mode))
- panic("lowering ASM 64bit output unimplemented");
+ ir_asm_constraint const *const constraints = get_ASM_constraints(asmn);
+ for (size_t i = 0, n = get_ASM_n_constraints(asmn); i < n; ++i) {
+ if (needs_lowering(constraints[i].mode))
+ panic("lowering ASM unimplemented");
}
}