This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: how to get instruction codes in gcc passes?
On 13/06/2010 20:57, Ian Lance Taylor wrote:
> Ilya K <ilya2do@gmail.com> writes:
>
>> My main aim is to build platform-dependent optimization based on the
>> minimizing of hamming distance between the instructions.
>
> Take a look at http://code.google.com/p/mao/ .
Or in binutils, LD's relaxation infrastructure might be usable to this end.
But I think if you want something so platform dependent as to care about the
bitpatterns of opcodes, it almost certainly ought to live in the assembler or
linker rather than then compiler.
cheers,
DaveK