Commit 32da8c18 authored by Andreas Fried's avatar Andreas Fried Committed by Christoph Mallon
Browse files

amd64: Implement store of immediate to memory.

parent 36de1849
......@@ -340,8 +340,14 @@ static void amd64_emit_am(const ir_node *const node, bool indirect_star)
emit_register_mode(reg, binop_attr->base.insn_mode);
return;
}
case AMD64_OP_ADDR_IMM:
panic("ADDR_IMM TODO");
case AMD64_OP_ADDR_IMM: {
const amd64_binop_addr_attr_t *const binop_attr
= (const amd64_binop_addr_attr_t*)attr;
amd64_emit_immediate32(true, &binop_attr->u.immediate);
be_emit_cstring(", ");
amd64_emit_addr(node, &attr->addr);
return;
}
case AMD64_OP_ADDR:
amd64_emit_addr(node, &attr->addr);
return;
......
......@@ -428,7 +428,7 @@ mov_store => {
outs => [ "M" ],
attr_type => "amd64_binop_addr_attr_t",
attr => "const amd64_binop_addr_attr_t *attr_init",
emit => "mov%M %S0, %A",
emit => "mov%M %AM",
},
jmp_switch => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment