This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [patch] Update MIPS DSP madd, maddu, msub, msubu, mult, multu
- From: "Fu, Chao-Ying" <fu at mips dot com>
- To: Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "Lau, David" <davidlau at mips dot com>
- Date: Wed, 27 Oct 2010 21:26:55 +0000
- Subject: RE: [patch] Update MIPS DSP madd, maddu, msub, msubu, mult, multu
- References: <7C6479EB2BF52547AC332FD6034646DA3017EC1B@exchdb02.mips.com> <87pquv8qay.fsf@firetop.home>
Richard Sandiford wrote:
> "Fu, Chao-Ying" <fu@mips.com> writes:
> > Here is the GCC patch to move
> madd/maddu/msubu/msub/mult/multu from MIPS DSP r2 to DSP r1.
> > Note that the Binutils patch has been committed to FSF
> binutils mainline.
> > http://sourceware.org/ml/binutils/2010-10/msg00331.html
> > http://sourceware.org/ml/binutils/2010-10/msg00424.html
> >[...]
> > Any feedback?
>
> Looks good. My main concern is that the patch as-is introduces
> a dependency on bleeding-edge binutils. That's not such a problem
> for cases where the user has explicitly called a
> __builtin_*() function
> in rev1 code, because that simply didn't work before. But it
> is a problem
> for cases where the compiler is automatically using these
> instructions.
> You'll get assembler errors when compiling ordinary C code,
> which never
> looks good.
>
> I think we need to add a configure-time check to see whether the
> assembler has your patch. There are quite a few existing examples
> of this. Then we should introduce a new macro such as:
>
> ISA_HAS_DSP_MULT
>
> This macro can be defined to ISA_HAS_DSP if the assembler has your fix
> and ISA_HAS_DSPR2 otherwise.
>
I will update my patch to have a configure-time check and ues ISA_HAS_DSP_MULT.
Thanks a lot!
Regards,
Chao-ying
- References:
- [patch] Update MIPS DSP madd, maddu, msub, msubu, mult, multu
- Re: [patch] Update MIPS DSP madd, maddu, msub, msubu, mult, multu