This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Pass -mtune and -march options to assembler.
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Valdimir Volynsky <vvv at ru dot ru>
- Cc: "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: Thu, 04 Jun 2009 10:03:36 -0700
- 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>
Valdimir Volynsky wrote:
> 2009-06-04 Vladimir Volynsky <email@example.com>
> PR target/40171
> * config/i386/linux64.h (ASM_SPEC): Pass -mtune to the GNU assembler.
> * config/i386/mingw-w64.h (ASM_SPEC): Likewise.
> * config/i386/sol2-10.h (ASM_SPEC): Likewise.
> * config/i386/x86-64.h (ASM_SPEC): Likewise.
Sorry to keep going around on this -- but why not put directives in the
.s file? You're already conditionalizing on HAVE_GNU_AS, so you know
you're using the GNU assembler.
Command-line options just make it easy for things to get weirdly out of
sync; directives in the .s file keep the information together. If we
must pass this information to the assembler, at least let's put it in
the .s file. And do it in a way that's table-driven so that adding new
cores to the machine-description doesn't require remembering to update a
separate list of cores to pass to the assembler. If the assembler
doesn't recognize a core name, it can just ignore the directive.
It's not my place to stand in front of the x86 maintainers, but I still
think this whole direction towards optimization in the assembler is
fraught with peril. We've been there, and we didn't like it.
(650) 331-3385 x713