[LLVMbugs] [Bug 20347] New: 16-bit and 32-bit immediates print as 64-bits in annotated assembly (x86-64)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jul 17 15:39:15 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20347
Bug ID: 20347
Summary: 16-bit and 32-bit immediates print as 64-bits in
annotated assembly (x86-64)
Product: tools
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: llc
Assignee: unassignedbugs at nondot.org
Reporter: spatel+llvm at rotateright.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Using llc built from r213097:
$ cat imm.ll
define i8 @int8() #0 {
ret i8 -128
}
define i16 @int16() #0 {
ret i16 -32768
}
define i32 @int32() #0 {
ret i32 -2147483648
}
define i64 @int64() #0 {
ret i64 -9223372036854775808
}
---------------------------------------------------------------
$ ./llc imm.ll -o -
(irrelevant output removed)
movb $-128, %al
movw $-32768, %ax ## imm = 0xFFFFFFFFFFFF8000
movl $-2147483648, %eax ## imm = 0xFFFFFFFF80000000
movabsq $-9223372036854775808, %rax ## imm = 0x8000000000000000
---------------------------------------------------------------
It's good to show decimal immediates as hex values when reading asm, but it's
confusing to see known 16-bit and 32-bit values displayed as sign extended
64-bit hex.
Can we display immediates with the correct size? For completeness, shouldn't
the 8-bit value also be displayed in hex?
I think this is x86-specific because I don't see any attempt to print
immediates in hex when displaying ARM or PPC64 asm.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140717/d5db5af1/attachment.html>
More information about the llvm-bugs
mailing list