[llvm-dev] Bug in X86 assembler?

Jun Koi via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 17 08:10:58 PST 2016


Hi,

I find that the X86 assembler can compile code like "mov r8, 0x12345678"
without any issues.

$ echo "mov r8, 0x12345678"|./bin/llvm-mc -assemble -show-encoding
-x86-asm-syntax=intel -print-imm-hex -triple=x86_64
    .text
    movq    $0x12345678, %r8        # encoding:
[0x49,0xc7,0xc0,0x78,0x56,0x34,0x12]


However, it fails to compile "mov r8, 0x1234567800":

$ echo "mov r8, 0x1234567800"|./bin/llvm-mc -assemble -show-encoding
-x86-asm-syntax=intel -print-imm-hex -triple=x86_64
    .text
<stdin>:1:1: error: invalid operand for instruction
mov r8, 0x1234567800
^


Is this a bug?

Thank you,
Jun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160218/b288e8f1/attachment.html>


More information about the llvm-dev mailing list