This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [amodra@sourceware.org: src/gas/testsuite ChangeLog gas/i386/divide.d ...]


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


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