Commit 30244df3 by Richard Sandiford Committed by Richard Sandiford

mips.c (build_mips16_call_stub): Tidy.

gcc/
	* config/mips/mips.c (build_mips16_call_stub): Tidy.  Fix second
	GPR for DCmode on 64-bit targets.  Remove redundant fallback.

From-SVN: r128608
parent 1c50a20a
2007-09-19 Richard Sandiford <rsandifo@nildram.co.uk>
* config/mips/mips.c (build_mips16_call_stub): Tidy. Fix second
GPR for DCmode on 64-bit targets. Remove redundant fallback.
2007-09-19 Andrew Pinski <andrew_pinski@playstation.sony.com> 2007-09-19 Andrew Pinski <andrew_pinski@playstation.sony.com>
* cfgexpand.c (dump_stack_var_partition): Use the correct * cfgexpand.c (dump_stack_var_partition): Use the correct
...@@ -10045,50 +10045,30 @@ build_mips16_call_stub (rtx retval, rtx fn, rtx arg_size, int fp_code) ...@@ -10045,50 +10045,30 @@ build_mips16_call_stub (rtx retval, rtx fn, rtx arg_size, int fp_code)
fprintf (asm_out_file, "\tjal\t%s\n", fnname); fprintf (asm_out_file, "\tjal\t%s\n", fnname);
/* As above, we can't fill the delay slot. */ /* As above, we can't fill the delay slot. */
fprintf (asm_out_file, "\tnop\n"); fprintf (asm_out_file, "\tnop\n");
if (GET_MODE (retval) == SFmode) switch (GET_MODE (retval))
fprintf (asm_out_file, "\tmfc1\t%s,%s\n", {
reg_names[GP_REG_FIRST + 2], reg_names[FP_REG_FIRST + 0]); case SCmode:
else if (GET_MODE (retval) == SCmode)
{
fprintf (asm_out_file, "\tmfc1\t%s,%s\n",
reg_names[GP_REG_FIRST + 2],
reg_names[FP_REG_FIRST + 0]);
fprintf (asm_out_file, "\tmfc1\t%s,%s\n", fprintf (asm_out_file, "\tmfc1\t%s,%s\n",
reg_names[GP_REG_FIRST + 3], reg_names[GP_REG_FIRST + 3],
reg_names[FP_REG_FIRST + MAX_FPRS_PER_FMT]); reg_names[FP_REG_FIRST + MAX_FPRS_PER_FMT]);
} /* Fall though. */
else if (GET_MODE (retval) == DFmode case SFmode:
|| GET_MODE (retval) == V2SFmode) fprintf (asm_out_file, "\tmfc1\t%s,%s\n",
{ reg_names[GP_REG_FIRST + 2],
mips16_fpret_double (GP_REG_FIRST + 2, FP_REG_FIRST + 0); reg_names[FP_REG_FIRST + 0]);
} break;
else if (GET_MODE (retval) == DCmode)
{ case DCmode:
mips16_fpret_double (GP_REG_FIRST + 2, mips16_fpret_double (GP_REG_FIRST + 2 + (8 / UNITS_PER_WORD),
FP_REG_FIRST + 0);
mips16_fpret_double (GP_REG_FIRST + 4,
FP_REG_FIRST + MAX_FPRS_PER_FMT); FP_REG_FIRST + MAX_FPRS_PER_FMT);
} /* Fall though. */
else case DFmode:
{ case V2SFmode:
if (TARGET_BIG_ENDIAN) mips16_fpret_double (GP_REG_FIRST + 2, FP_REG_FIRST + 0);
{ break;
fprintf (asm_out_file, "\tmfc1\t%s,%s\n",
reg_names[GP_REG_FIRST + 2], default:
reg_names[FP_REG_FIRST + 1]); gcc_unreachable ();
fprintf (asm_out_file, "\tmfc1\t%s,%s\n",
reg_names[GP_REG_FIRST + 3],
reg_names[FP_REG_FIRST + 0]);
}
else
{
fprintf (asm_out_file, "\tmfc1\t%s,%s\n",
reg_names[GP_REG_FIRST + 2],
reg_names[FP_REG_FIRST + 0]);
fprintf (asm_out_file, "\tmfc1\t%s,%s\n",
reg_names[GP_REG_FIRST + 3],
reg_names[FP_REG_FIRST + 1]);
}
} }
fprintf (asm_out_file, "\tj\t%s\n", reg_names[GP_REG_FIRST + 18]); fprintf (asm_out_file, "\tj\t%s\n", reg_names[GP_REG_FIRST + 18]);
/* As above, we can't fill the delay slot. */ /* As above, we can't fill the delay slot. */
......
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