This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Pass -mtune and -march options to assembler.


Mark Mitchell <mark@codesourcery.com> wrote:
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.

There is few not very important reasons, but in total, IMHO, it's enough for not put directives in the .s file now.
.tune directive not exist in current GNU AS.
New directive will create problems with backward compatibility.
Standard reaction of assembler to unknown directive - error report
and exit. Exclusively reaction, IMHO, will not be supported by binutil
community.
Current GNU AS process command-line options before reading source file,
and it's required not so small changes in GNU AS for support .tune.
Cpu-types in GCC and GNU AS not identical. For example: How to translate from GCC "pentium-m" "k6-3" and "geode" to GNU AS? So we have to pass only
part of options.
Specs is a good way to pass optimization options, because not required to patch binutils.


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.

Optimization - using _all_ ways. Of course, we have to optimize as most as possible at GCC level. And optimize remainder at assembler, or even linker levels.


Vladimir Volynsky
---
Professional hosting for everyone - http://www.host.ru


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]