This is the mail archive of the
mailing list for the binutils project.
Re: Gas can't handle prefix generated by gcc
"H. J. Lu" <firstname.lastname@example.org> writes:
>> 1) Make GAS accept cs;je and do the right thing.
>> 2) Prove that cs/je, rep/stosl, etc are acceptable to all i386
>> assemblers since time immemorial.
>> 3) Write the GCC patch yourself. And I will not review it.
>> And yes, those are in order of decreasing preference.
> ';' is a line terminator for assembler. Assembler won't see the string
> of "cs;je" at all. I don't think adding such a hack for gcc is a good
My idea of the Right Thing would be to recognize an instruction
consisting only of a prefix opcode (any prefix opcode - not just
segment overrides), and save it to be combined with the next one.
That would handle "cs;je", "rep\n\tmovsl", and so on.
It's not just GCC that does this; take a look at the Linux kernel's
arch/i386 assembly files.
> I can write a patch. But who will review it?