This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A PREFIX_SEPARATOR bug in binutils 2.9


> Evidently gcc does not generate code of this form, or this would have
> been noticed long ago.
> 
> Note that there is another way to accomplish this:
> 	data16
> 	mov 	foo,%eax
> 
> I tried the test case
> 	data16/mov foo,%eax
> on the UnixWare assembler, and it failed there as well.  In fact, the
> reason gas uses '/' to start a comment for i386 ELF is because that is
> how the UnixWare assembler behaves.
> 
> Putting data16 on a separate line, as above, works with both gas and
> the UnixWare assembler.
> 
> I don't know if the UnixWare assembler permits you to specify a prefix
> on the same line as an instruction.  I tried a few other characters,
> but I couldn't find anything that worked.
> 
> So I'm not sure whether we need to change anything here.
> 

If we don't change, PREFIX_SEPARATOR is just a dummy for x86/ELF. If
someone writes some asm code for both ELF/a.out and use '/' as
PREFIX_SEPARATOR, the error may not be discovered at the assembly time.

Martynas Kunigelis <kunimart@pit.ktu.lt> found this while working on
16bit support in gas. Since PREFIX_SEPARATOR has never really been used
and has never worked, I suggest we change it to somethin else. Martynas
used '\\' for x86/ELF. But I don't like it. On the other hand, I haven't
found one I really like. I guess I can live with '\\'. We can just
define PREFIX_SEPARATOR as '\\' for all x86. At least, it will work
if someone really wants to use it.

Thanks.


-- 
H.J. Lu (hjl@gnu.org)