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

Valdimir Volynsky vvv@ru.ru
Sat May 30 13:18:00 GMT 2009


  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.

Other way - call assembler twice:
1. Fist call for generaty assembler listing.
2. Parsing that listing for get information about address 
and opcodes.
3. Make optimization.
4. Call assembler again for object or executable code 
generation.

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



More information about the Gcc-patches mailing list