[LLVMbugs] [Bug 12102] New: x86 assembly printer fails to print "mov eax, [0xfed00010]" correctly
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Feb 27 12:08:48 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=12102
Bug #: 12102
Summary: x86 assembly printer fails to print "mov eax,
[0xfed00010]" correctly
Product: new-bugs
Version: 3.0
Platform: PC
OS/Version: All
Status: NEW
Severity: release blocker
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: benjamin.j.panning at intel.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The assembly printer for x86 fails to print certain MOVrm instructions
correctly. This can be reproduced following these steps:
*** 1. Create a basic C++ example to be compiled:
int main() {
int* x = (int*)0xfed00010; // HPET MMIO
return *x; // Read on this MMIO
}
*** 2. Run this through clang using the following command (Windows):
clang.exe -emit-llvm -S -o source.ll source.cpp
*** 3. Run this through llc using the following command (Windows):
llc.exe -filetype=asm -x86-asm-syntax=intel -print-after-all source.ll
*** 4. Examine the final assembly product (source.s):
# MMIO read shows up as this...
mov EAX, -19922928 # mov EAX, 0xfed00010
I've examined the object file produced when I change the -filetype to "obj",
and the binary appears to be correct. Decoding the binary results in the
following instruction:
mov eax, dword ptr [0xfed00010]
Looking at the "IR Dump After X86 AT&T-Style Assembly Printer" yields the
following instruction:
%EAX<def> = MOV32rm %noreg, 1, %noreg, -19922928, %noreg; mem:LD4[%0]
This looks correct, and it's only when this is printed does the error occur.
This leads me to believe the bug is isolated within the assembly printer.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list