Commit 979cade5 authored by Tobias Rapp's avatar Tobias Rapp
Browse files

amd64: floating point spills

parent c686387f
......@@ -544,7 +544,7 @@ xSubs => {
arity => "variable",
attr_type => "amd64_binop_addr_attr_t",
attr => "const amd64_binop_addr_attr_t *attr_init",
emit => "subs%MX %S1, %D0",
emit => "subs%MX %AM",
},
xUcomis => {
......
......@@ -741,7 +741,7 @@ static ir_node *gen_binop_am(ir_node *node, ir_node *op1, ir_node *op2,
if (mode_is_float(mode)) {
arch_set_irn_register_req_out(new_node, 0,
&amd64_requirement_xmm_same_0);
return new_r_Proj(new_node, mode_D, pn_amd64_xAdds_res);
return new_r_Proj(new_node, mode_D, pn_amd64_xSubs_res);
} else {
arch_set_irn_register_req_out(new_node, 0,
&amd64_requirement_gp_same_0);
......@@ -2243,8 +2243,15 @@ ir_node *amd64_new_reload(ir_node *value, ir_node *spill, ir_node *before)
addr.index_input = NO_INPUT;
ir_node *in[] = { frame, spill };
ir_node *load = new_bd_amd64_Mov(NULL, block, ARRAY_SIZE(in), in,
INSN_MODE_64, AMD64_OP_ADDR, addr);
ir_node *load;
if (mode_is_float(mode)) {
load = new_bd_amd64_xMovs(NULL, block, ARRAY_SIZE(in), in,
INSN_MODE_64, AMD64_OP_ADDR, addr);
} else {
load = new_bd_amd64_Mov(NULL, block, ARRAY_SIZE(in), in,
INSN_MODE_64, AMD64_OP_ADDR, addr);
}
arch_set_irn_register_reqs_in(load, reg_mem_reqs);
arch_add_irn_flags(load, arch_irn_flag_reload);
sched_add_before(before, load);
......
......@@ -487,14 +487,15 @@ static void amd64_set_frame_entity(ir_node *node, ir_entity *entity,
{
(void)type;
assert(is_amd64_Store(node) || is_amd64_Mov(node)
|| is_amd64_Movs(node));
|| is_amd64_Movs(node) || is_amd64_xMovs(node)
|| is_amd64_xStores(node));
amd64_addr_attr_t *attr = get_amd64_addr_attr(node);
attr->addr.immediate.entity = entity;
}
static bool is_frame_load(const ir_node *node)
{
return is_amd64_Mov(node) || is_amd64_Movs(node);
return is_amd64_Mov(node) || is_amd64_Movs(node) || is_amd64_xMovs(node);
}
/**
......
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