[amodra@sourceware.org: src/gas/testsuite ChangeLog gas/i386/divide.d ...]
Alan Modra
amodra@bigpond.net.au
Mon Nov 7 23:40:00 GMT 2005
On Mon, Nov 07, 2005 at 02:30:55PM -0500, Thomas Schwinge wrote:
> Could someone please comment on the following difference, which still
> persists:
>
> #v+
> $ cat > foo.s
> .text
> start:
> push 3/2
> #v-
>
> Natively, i686-pc-linux-gnu:
> #v+
> $ gas/as-new foo.s
> $ objdump -d a.out
> [...]
> 00000000 <start>:
> 0: ff 35 01 00 00 00 pushl 0x1
> #v-
>
> Targetted at i586-pc-gnu:
> #v+
> $ gas/as-new foo.s
> $ objdump -d a.out
> [...]
> 00000000 <start>:
> 0: ff 35 03 00 00 00 pushl 0x3
> #v-
On i586-pc-gnu, '/' anywhere on the line starts a comment. This is
because the original x86 sysv assembler used '/' to start comments.
In mid 1998, I changed this for the linux version of x86 gas, so that
'/' could be used in expressions as a divide operator. Other flavours
of x86 gas have followed suit since then.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list