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 01:53:53PM -0700, Zack Weinberg wrote:
> "H. J. Lu" <hjl@lucon.org> writes:
>
> > On Fri, Jul 23, 2004 at 01:43:33PM -0700, Zack Weinberg wrote:
> >> "H. J. Lu" <hjl@lucon.org> writes:
> >>
> >> > On Fri, Jul 23, 2004 at 12:49:48PM -0700, Zack Weinberg wrote:
> >> >> Zack Weinberg <zack@codesourcery.com> writes:
> >> >>
> >> >> > "H. J. Lu" <hjl@lucon.org> writes:
> >> >> >
> >> >> >> It seems that gcc uses a prefix syntax which gas doesn't handle. Does
> >> >> >> gcc always use " ; " as prefix separator?
> >> >> >
> >> >> > Yes. It does that for cs/ds on branch hints, it does that for "rep"
> >> >> > on string instructions, it does that for "lock" on atomic updates.
> >> >>
> >> >> Correction - it uses either " ; " or \n\t in all the above cases.
> >> >>
> >> >
> >> > It looks like a gcc bug to me. Assembler has a way to define prefixes
> >> > for an instruction. Unfortunately, gcc uses something else. I will
> >> > close the assembler bug.
> >>
> >> Not so fast. Is the PREFIX_SEPARATOR mechanism (a) supported by GAS
> >> since time immemorial, and (b) supported by all other i386 assemblers
> >> since time immemorial? If *either* of those is not true, GCC can't
> >> change.
> >
> > It was added to gas on Jun 8, 1998.
>
> Ok, that's good enough. Now how about (b)?
>
I have no ideas how other i386 assemblers handle it. It doesn't matter
much since gcc should check this feature before using it.
H.J.