This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Gas can't handle prefix generated by gcc
On Fri, Jul 23, 2004 at 04:36:57PM -0700, Zack Weinberg wrote:
> "H. J. Lu" <hjl@lucon.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
> > idea.
>
> 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.
There can be up to 4 prefixes. I have no interests in working such a
hack, given that gas supports the current prefix syntax at least since
1998. If anyone is concerned about the possible problems, they should
use the proper prefix syntax supported by gas.
H.J.