This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Pass -mtune and -march options to assembler.
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Valdimir Volynsky <vvv at ru dot ru>, "Joseph S. Myers" <joseph at codesourcery dot com>, Dave Korn <dave dot korn dot cygwin at googlemail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 05 Jun 2009 20:03:36 +0100
- Subject: Re: [PATCH] Pass -mtune and -march options to assembler.
- References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <4A1EBF3A.email@example.com> <firstname.lastname@example.org> <4A203D91.email@example.com> <firstname.lastname@example.org> <4A2058B8.email@example.com> <firstname.lastname@example.org> <4A214E03.email@example.com> <firstname.lastname@example.org> <Pine.LNX.email@example.com> <firstname.lastname@example.org> <4A27FE68.email@example.com> <firstname.lastname@example.org> <4A293C2B.email@example.com>
Mark Mitchell <firstname.lastname@example.org> writes:
> Richard Sandiford wrote:
>> My usual answer to this is that we want gcc to be consistent when
>> used as a driver interface. So both of the following commands:
>> gcc -mtune=foo blah.c
>> gcc -mtune=foo blah.S
>> should produce code that is tuned for architecture "foo".
> That argument does not, however, argue for an assembler that uses
> different names for the cores than GCC. :-)
Sure, but the point here and...
>> A quick grep suggests that the only other gas ports to support -mtune
>> are MIPS and IA64. MIPS passes -mtune options down, so cross-platform
>> consistency is another argument in favour of the patch.
> However, ARM has the similar .march directive (apologies if that's not
> the right spelling), and GCC uses that mechanism to communicate with the
> assembler. So, cross-platform consistency in that respect argues for an
> .mtune directive.
...here is that it isn't an "either/or". Both approaches are only
useful if we do them right, and if we do do them right, they're
(And of the two, I think:
> gcc -mtune=foo blah.S
is likely to be more commom than:
> gcc -mtune=foo -S blah.c
> as -o blah.o blah.s
I just didn't want to see a specs patch rejected out-of-hand as being
the wrong way to go. It sounds like that might not have been what was
happening after all, so never mind.