summaryrefslogtreecommitdiffhomepage
path: root/ir/be
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2019-03-31 09:07:21 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2019-03-31 11:20:19 +0200
commit53b34aef48e05172b7089ccdd96f1c474d08b6cc (patch)
tree125d8f01e7e4912b86718b374ea6482f707aa0b2 /ir/be
parente44f1ce3ee468aceee41c31337bbd6a6bf8abdce (diff)
ia32: Also determine the frame offset for memory operands of be_Asm.
This fixes backend/asm_memory_access.c on ia32.
Diffstat (limited to 'ir/be')
-rw-r--r--ir/be/ia32/ia32_bearch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ir/be/ia32/ia32_bearch.c b/ir/be/ia32/ia32_bearch.c
index cd1120a..e6dc546 100644
--- a/ir/be/ia32/ia32_bearch.c
+++ b/ir/be/ia32/ia32_bearch.c
@@ -180,6 +180,14 @@ static void ia32_determine_frameoffset(ir_node *node, int sp_offset)
if (is_ia32_irn(node)) {
ia32_attr_t *const attr = get_ia32_attr(node);
ia32_determine_frameoffset_addr(node, &attr->addr, sp_offset);
+ } else if (be_is_Asm(node)) {
+ be_asm_attr_t const *const attr = get_be_asm_attr_const(node);
+ x86_asm_operand_t *const ops = (x86_asm_operand_t*)attr->operands;
+ for (size_t i = 0, n = ARR_LEN(ops); i != n; ++i) {
+ x86_asm_operand_t *const op = &ops[i];
+ if (op->op.kind == BE_ASM_OPERAND_MEMORY)
+ ia32_determine_frameoffset_addr(node, &op->u.addr, sp_offset);
+ }
}
}