summaryrefslogtreecommitdiffhomepage
path: root/ir/be/amd64
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2019-03-31 10:34:57 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2019-03-31 11:20:29 +0200
commitffa49b46ceac7840e4dd7ed5a3c72837d40f661d (patch)
tree7ef5b8afd624813d17379266fc0b7e220c0de04b /ir/be/amd64
parentc3edec4e6e5e0fb333c006b255c27096c861c696 (diff)
amd64: Also determine the frame offset for memory operands of be_Asm.
This fixes backend/asm_memory_access.c on amd64.
Diffstat (limited to 'ir/be/amd64')
-rw-r--r--ir/be/amd64/amd64_bearch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ir/be/amd64/amd64_bearch.c b/ir/be/amd64/amd64_bearch.c
index eeca642..00fd5be 100644
--- a/ir/be/amd64/amd64_bearch.c
+++ b/ir/be/amd64/amd64_bearch.c
@@ -547,6 +547,14 @@ static void amd64_determine_frameoffset(ir_node *node, int sp_offset)
x86_addr_t *const addr = &get_amd64_addr_attr(node)->addr;
amd64_determine_frameoffset_addr(node, 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)
+ amd64_determine_frameoffset_addr(node, &op->u.addr, sp_offset);
+ }
}
}