This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [amodra@sourceware.org: src/gas/testsuite ChangeLog gas/i386/divide.d ...]
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Thomas Schwinge <tschwinge at gnu dot org>
- Cc: binutils at sourceware dot org, bug-hurd at gnu dot org
- Date: Tue, 8 Nov 2005 10:10:35 +1030
- Subject: Re: [amodra@sourceware.org: src/gas/testsuite ChangeLog gas/i386/divide.d ...]
- References: <20051107193055.GB5536@fencepost>
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