A PREFIX_SEPARATOR bug in binutils 2.9
Ian Lance Taylor
ian@cygnus.com
Tue Apr 21 12:39:00 GMT 1998
From: hjl@lucon.org (H.J. Lu)
Date: Tue, 21 Apr 1998 12:02:45 -0700 (PDT)
PREFIX_SEPARATOR indicates a prefix, like
data16PREFIX_SEPARATORmov foo,%eax
But '/' is also used to start a comment. So
data16/mov foo,%eax
becomes
data16
after preprocessing.
Thanks. If you include a test case with a bug report, it will save
everybody's time.
> been there since May 1993, so clearly it can work.
Apparently, noone tried to use it or reported it.
So the next question is whether we think this ought to work.
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.
Ian
More information about the Gas2
mailing list