This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Pass -mtune and -march options to assembler.
On Sat, 30 May 2009, Valdimir Volynsky wrote:
> Mark Mitchell <mark@codesourcery.com> wrote:
>
> > However you are solving this in the assembler, you can also solve it in the
> > compiler. After all, the assembler has no information which the compiler
> > does not provide to it!
> > There are two parts to that recommendation: knowing what
> > opcodes start with 0xf7, and knowing the alignment of
> > instructions. Both of those things are just as knowable in
> > the compiler as they are in the assembler.
>
> But this information are knowable to assembler already, and not available
> in current GCC version. Do you suggest to add it to GCC? In this case
> assembler not required at all.
There is nothing wrong in principle with linking the assembler into the
compiler when it becomes useful for the compiler to have information that
is much more readily available with existing assembler code, including
exact length information for inline asms. (This would of course need to
be optional while there are targets supported by GCC but not by the GNU
assembler, such as Darwin and alpha*-dec-osf*, and would need to continue
to support .s output with -save-temps.) It might be hard to implement
because so far the GNU assembler isn't designed for use as a library, but
that's another matter, and linking the assembler into the compiler could
also yield compile-time performance improvements.
--
Joseph S. Myers
joseph@codesourcery.com