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: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Fu\, Chao-Ying" <fu at mips 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, 03 Nov 2010 21:29:56 +0000
- Subject: Re: [patch] Update MIPS DSP madd, maddu, msub, msubu, mult, multu
- References: <7C6479EB2BF52547AC332FD6034646DA3017EC1B@exchdb02.mips.com> <87pquv8qay.fsf@firetop.home> <7C6479EB2BF52547AC332FD6034646DA3017F47F@exchdb02.mips.com> <7C6479EB2BF52547AC332FD6034646DA3017F895@exchdb02.mips.com> <87mxpwnj5e.fsf@firetop.home> <7C6479EB2BF52547AC332FD6034646DA301809A9@exchdb02.mips.com>
"Fu, Chao-Ying" <fu@mips.com> writes:
>> to the builtins code in mips.c. Similarly, <u>maddsidi4 and
>> <u>msubsidi4 are now named patterns (which wasn't true when
>> the DSP code was originally added), so we can do the same
>> thing for mips_madd<u> and mips_msub<u>.
>
> Due to the order of input operands is different, I still need to keep mips_madd<u>
> and mips_msub<u>. Otherwise, the prototype of __builtin_mips_madd/maddu/msub/msubu
> will not be matched.
Oh yeah, missed that. I vaguely remember you might have had
to point this out to me before. :-/
The new patch is OK, thanks. I see that the tests have things like:
> +/* { dg-final { scan-assembler "mult" } } */
> +/* { dg-final { scan-assembler "multu" } } */
which is weak: a multu will match both. But that's a problem with
the existing tests too, and should be fixed separately. It's better
to be consistent with the current code as far as this check-in is
concerned.
Richard