From: rsandifo Date: Wed, 19 Sep 2007 22:21:57 +0000 (+0000) Subject: gcc/ X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=504d7bfe77d0a3238ec60618cbf79bd3316f9529;p=thirdparty%2Fgcc.git gcc/ * config/mips/mips.c (build_mips16_call_stub): Tidy. Fix second GPR for DCmode on 64-bit targets. Remove redundant fallback. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128608 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f336b1242272..b550aa24cd55 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-09-19 Richard Sandiford + + * 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 * cfgexpand.c (dump_stack_var_partition): Use the correct diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 6a4a1d90ff3b..7f959f41a218 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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); /* As above, we can't fill the delay slot. */ fprintf (asm_out_file, "\tnop\n"); - if (GET_MODE (retval) == SFmode) - fprintf (asm_out_file, "\tmfc1\t%s,%s\n", - reg_names[GP_REG_FIRST + 2], reg_names[FP_REG_FIRST + 0]); - 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]); + switch (GET_MODE (retval)) + { + case SCmode: fprintf (asm_out_file, "\tmfc1\t%s,%s\n", reg_names[GP_REG_FIRST + 3], reg_names[FP_REG_FIRST + MAX_FPRS_PER_FMT]); - } - else if (GET_MODE (retval) == DFmode - || GET_MODE (retval) == V2SFmode) - { - mips16_fpret_double (GP_REG_FIRST + 2, FP_REG_FIRST + 0); - } - else if (GET_MODE (retval) == DCmode) - { - mips16_fpret_double (GP_REG_FIRST + 2, - FP_REG_FIRST + 0); - mips16_fpret_double (GP_REG_FIRST + 4, + /* Fall though. */ + case SFmode: + fprintf (asm_out_file, "\tmfc1\t%s,%s\n", + reg_names[GP_REG_FIRST + 2], + reg_names[FP_REG_FIRST + 0]); + break; + + case DCmode: + mips16_fpret_double (GP_REG_FIRST + 2 + (8 / UNITS_PER_WORD), FP_REG_FIRST + MAX_FPRS_PER_FMT); - } - else - { - if (TARGET_BIG_ENDIAN) - { - fprintf (asm_out_file, "\tmfc1\t%s,%s\n", - reg_names[GP_REG_FIRST + 2], - reg_names[FP_REG_FIRST + 1]); - 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]); - } + /* Fall though. */ + case DFmode: + case V2SFmode: + mips16_fpret_double (GP_REG_FIRST + 2, FP_REG_FIRST + 0); + break; + + default: + gcc_unreachable (); } fprintf (asm_out_file, "\tj\t%s\n", reg_names[GP_REG_FIRST + 18]); /* As above, we can't fill the delay slot. */