This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Pass -mmt/-mno-mt on to the MIPS assembler
Thiemo Seufer <ths@networkno.de> writes:
> Richard Sandiford wrote:
>> Thiemo Seufer <ths@networkno.de> writes:
>> > Richard Sandiford wrote:
>> >> Thiemo Seufer <ths@networkno.de> writes:
>> >> > +%{mmt} \
>> >>
>> >> Given the -mips3d and -mdmx changes, don't you need %{mno-mt} here too?
>> >
>> > No, the driver does this automatically for -m options. The -mips* and
>> > -mdmx options are special case because they don't follow the naming
>> > convention.
>>
>> OK. I think I've tended to add the -mno-* option anyway, so that if
>> the user uses "-mno-foo" without "-mfoo", it still gets passed down
>> to the assembler. I guess the specs aren't consistent about that
>> though. A lone "-mno-sym32" does get passed down (thanks to
>> %{mno-sym32}), but a lone "-mno-dspr2" doesn't.
>>
>> Since we aren't consistent, and since I obviously missed this
>> when reviewing earlier patches, I'm happy either way.
>>
>> Replying to your later patch:
>>
>> > --mshared -mno-shared -mxgot -mno-xgot -mgp32 -mgp64 @gol
>> > --mfp32 -mfp64 -mhard-float -msoft-float @gol
>> > --msingle-float -mdouble-float -mdsp -mdspr2 -mpaired-single -mips3d @gol
>> > +-mshared -mno-shared -mxgot -mno-xgot -mgp32 -mgp64 @gol
>> > +-mfp32 -mfp64 -mhard-float -msoft-float @gol
>> > +-msingle-float -mdouble-float -mdsp -mdspr2 -mpaired-single @gol
>> > +-mdmx -mno-mdmx -mips3d -mno-mips3d -mmt @gol
>>
>> -mno-mt is missing here.
>
> I added the missing ones.
>
>> > Index: config/mips/mips.opt
>> > ===================================================================
>> > --- config/mips/mips.opt (revision 124074)
>> > +++ config/mips/mips.opt (working copy)
>> > @@ -51,6 +51,10 @@
>> > Target Report RejectNegative InverseMask(DIVIDE_BREAKS, DIVIDE_TRAPS)
>> > Use trap instructions to check for integer divide by zero
>> >
>> > +mdmx
>> > +Target Report RejectNegative Mask(MDMX)
>> > +Allow the use of MDMX instructions
>> > +
>>
>> AFAICT, there's no need to make this RejectNegative and add -mno-mdmx
>> separately. It's OK with that removed and with Mask(MDMX) turned into
>> Var(TARGET_MDMX). (It doesn't need to be a mask, and some targets are
>> short of bits.)
>
> Without RejectNegative it will accept (but ignore) -dmx and -mno-dmx,
> this could collide with future use. I changed the Mask to a Var.
Doh! Sorry, I'm an idiot. I'd somehow misread it as "-mmdmx".
I just noticed:
Richard
> +@itemx -mdmx
> +@itemx -mno-mdmx
...the first @itemx should be @item.
> +@itemx -mmt
> +@itemx -mno-mt
...same here.
Preapproved with those changes, thanks.
Richard