bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/15034] MOVABS fails in intel syntax, good in att. Behavior mism


From: hjl.tools at gmail dot com
Subject: [Bug gas/15034] MOVABS fails in intel syntax, good in att. Behavior mismatch intel vs att syntax
Date: Fri, 25 Jan 2013 18:34:29 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=15034

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2013-01-25 18:34:29 
UTC ---
(In reply to comment #1)
> Also I found, that reading long (64 bit) data with intel syntax is OK 
> *(volatile long*)0xFEE00000; 
> while reading any other data types will issue an error.

It is a bug in GCC:

address@hidden tmp]$ cat l.c
long
foo2 (void)
{
  return *(volatile long*)0xFEE00000;
}
address@hidden tmp]$ gcc -c l.c -O2 -masm=intel
address@hidden tmp]$ objdump -dw l.o

l.o:     file format elf64-x86-64


Disassembly of section .text:

0000000000000000 <foo2>:
   0:    48 b8 00 00 e0 fe 00 00 00 00     movabs $0xfee00000,%rax
   a:    c3                       retq   
address@hidden tmp]$ gcc -c l.c -O2 
address@hidden tmp]$ objdump -dw l.o

l.o:     file format elf64-x86-64


Disassembly of section .text:

0000000000000000 <foo2>:
   0:    48 a1 00 00 e0 fe 00 00 00 00     movabs 0xfee00000,%rax
   a:    c3                       retq   
address@hidden tmp]$ 

movabs should only be used for loading an 64-bit immediate or
loading from an absolute address.

movabs  rax,0xfee00000

loads 0xfee00000 into RAX.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

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