different results on using intel syntax and at&t syntax

nix noob nixnoob1618@yahoo.com
Wed Jan 4 17:31:00 GMT 2006


Dave Korn,

thanks for replying when i posted this i had access
two as(1) one was version 2.13 (redhat) other was
2.14.... (SuseLinux-9.0 i586 last official as it
seemed no update was avl to that )

i tried searching through diffs between 2.14 and 2.16
in binutils but i could not find any refs to this
problem fixed some where 
in those diffs 

but in the mean time i asked some one with 2.16 to
test this code 
and it seems 2.16 behaves quiet correctly as would be
expected 
may be it was fixed some times between 2.14 and 2.16 

anyway thanks for replying 
after i saw your as -ahls in your reply i copy pasted
that to blah
and ran that file on those two assembler 


here is a listing on those two as version 

as -a balh -V > result
GNU assembler version 2.13.90.0.18 (i386-redhat-linux)
using BFD version 2.13.90.0.18 20030206
-bash-2.05b$ cat result | more
GAS LISTING balh                        page 1


   1                        .intel_syntax noprefix
   2 0000 3D018000          cmp eax, 0x8001
   2      00
   3                        .att_syntax
   4 0005 3D018000          cmp $0x8001, %eax
   4      00
   5                        .intel_syntax noprefix
   6                    .equ foobar, 0x8001
   7                    .set barfoo, 0x8001
   8                    quux = 0x8001
   9 000a 3D018000          cmp eax, 0x8001
   9      00
  10 000f 3B050180          cmp eax, foobar
  10      0000
  11 0015 3B050180          cmp eax, barfoo
  11      0000
  12 001b 3B050180          cmp eax, quux
  12      0000
  13 0021 3D018000          cmp eax, 0x8001
  13      00
  14                        .end
^LGAS LISTING balh                      page 2
DEFINED SYMBOLS
                balh:6      *ABS*:00008001 foobar
                balh:7      *ABS*:00008001 barfoo
                            *ABS*:00008001 quux

NO UNDEFINED SYMBOLS



 as -a blah -V > result
GNU assembler version 2.14.90.0.5 (i586-suse-linux)
using BFD version 2.14.90.0.5 20030722 (SuSE Linux)


GAS LISTING blah                        page 1


   1                    .intel_syntax noprefix
   2 0000 3D018000          cmp eax, 0x8001
   2      00
   3                        .att_syntax
   4 0005 3D018000          cmp $0x8001, %eax
   4      00
   5                        .intel_syntax noprefix
   6                    .equ foobar, 0x8001
   7                    .set barfoo, 0x8001
   8                    quux = 0x8001
   9 000a 3D018000          cmp eax, 0x8001
   9      00
  10 000f 3B050180          cmp eax, foobar
  10      0000
  11 0015 3B050180          cmp eax, barfoo
  11      0000
  12 001b 3B050180          cmp eax, quux
  12      0000
  13 0021 3D018000          cmp eax, 0x8001
 13      00
  14                        .end
^LGAS LISTING blah                      page 2


DEFINED SYMBOLS
                blah:6      *ABS*:0000000000008001
foobar
                blah:7      *ABS*:0000000000008001
barfoo
                            *ABS*:0000000000008001
quux

NO UNDEFINED SYMBOLS


see 3b050180 :) 

i couldn't find in those binutils changelog diffs 
when
this behaviour was changed 
since it seems fixed in latest version i think i have
to upgrade 
ill ask for getting it updated 
sorry for the annoyance 

thanks and regards
nix noob





		
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 




More information about the Binutils mailing list