Commit cab0db0c authored by Christoph Mallon's avatar Christoph Mallon
Browse files

ia32: Simply make the fpcw caller (and callee) saved, so we do not need a...

ia32: Simply make the fpcw caller (and callee) saved, so we do not need a special case when generating a call.
parent e990f30f
......@@ -77,6 +77,7 @@ static const unsigned caller_saves_gp[] = {
};
static const unsigned caller_saves_fp[] = {
REG_FPCW,
REG_ST0,
REG_ST1,
REG_ST2,
......
......@@ -5046,7 +5046,7 @@ static ir_node *gen_Call(ir_node *node)
unsigned o = pn_ia32_Call_first_result;
unsigned const n_reg_results = cconv->n_reg_results;
unsigned const n_caller_saves = rbitset_popcount(cconv->caller_saves, N_IA32_REGISTERS);
unsigned const n_out = has_fpcw + o + n_reg_results + n_caller_saves;
unsigned const n_out = o + n_reg_results + n_caller_saves;
/* Create node. */
ir_node *const call = new_bd_ia32_Call(dbgi, block, in_arity, in, in_req, n_out, cconv->sp_delta, type);
......@@ -5074,12 +5074,6 @@ static ir_node *gen_Call(ir_node *node)
ia32_request_x87_sim(irg);
}
if (has_fpcw) {
unsigned const fpcwo = o++;
arch_set_irn_register_req_out(call, fpcwo, fpcw->single_req);
arch_set_irn_register_out( call, fpcwo, fpcw);
}
/* Caller saves. */
unsigned const *const allocatable_regs = be_birg_from_irg(irg)->allocatable_regs;
for (unsigned i = 0; i < N_IA32_REGISTERS; ++i) {
......
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