[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

as bug

From: Josh Cogliati
Subject: as bug
Date: Thu, 12 Oct 2000 20:59:53 -0600
User-agent: Mutt/1.0.1i

as version: 
GNU assembler 2.10
This assembler was configured for a target of `i586-pc-linux-gnu'.
No patches were applied.
Machine: Linux 2.2.17 Debian 2.2 AMD K6
Compiled with gcc 2.95.2

input file error.s:
ONE = 1
        mov %eax, ONE
        mov %eax, 1

run as with:
as -al error.s

Got the output:
GAS LISTING error.s                     page 1

   1                    ONE = 1
   2                    .intel_syntax
   3 0000 A1010000              mov %eax, ONE
   3      00
   4 0005 B8010000              mov %eax, 1
   4      00

What I expected was that the assembler should have outputed the same 
opcodes for both instructions.  However the mov %eax, ONE has
a different opcode from mov %eax, 1

If gas is doing the correct thing than the documentation seems to be missing
how one goes about loading the value of a symbol into a register.  
Proper intel syntax would probaly be mov %eax, OFFSET ONE but that 
generates an error.

Josh Cogliati
This message created in Linux, the choice of a GNU generation.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]