On Thu, Jun 10, 2010 at 5:23 PM, H.J. Lu <hjl.to...@gmail.com> wrote: > [snip] > x86 assembler isn't an optimizing assembler. -mtune only does > instruction selection. What you are proposing sounds like an optimizing > assembler to me. Are we going to support scheduling, macro, ...? > -- > H.J.
Just to clarify, we are not doing scheduling or macros. The assembler already supported alignment and padding using .align and friends, which can be from the compiler and from hand-written assembly. Now we are seeing more complex alignment rules that are not as simple as it used to be for the older hardware. It will be almost impossible for an assembly programmer to insert the right directives, not to mention any change might invalidate previous alignments. Assembly programmers will be out of luck (that is, unless the compiler becomes the assembler). The essence is we want to insert prefixes (as well as nops) according to certain rules known at encoding time. The mechanism implementing these rules can be abstracted (table driven?) and could be applicable to any hardware having similar features. As gcc does not currently encode and/or generate object code, we are wary of introducing such assembler functionality and want to avoid if possible, instead leveraging the existing binutils infrastructure. -- Quentin Neill (with some input from Reza Yazdani)