[LLVMdev] broken LLVM-MC?

Jim Grosbach grosbach at apple.com
Fri Dec 13 10:27:15 PST 2013


Well, you’ll probably need to specify which CPU for the instructions to be recognized as valid encodings. -mcpu=knl doesn’t seem sufficient, though, so there’s probably something more going on.

Elena, do you know what’s happening here? It’s important that the disassembler work with the new instructions as well as the assembler. I looked but didn’t see any disassembler tests for avx512.

-Jim

On Dec 12, 2013, at 7:32 PM, Jun Koi <junkoi2004 at gmail.com> wrote:

> Hi,
> 
> It seems LLVM-MC is broken with Avx512?
> 
> 
> $ echo "vinserti32x4 \$1, %xmm21, %zmm5, %zmm17"|./Release+Asserts/bin/llvm-mc -assemble -arch=x86-64 -show-encoding -x86-asm-syntax=att
>     .text
>     vinserti32x4    $1, %xmm21, %zmm5, %zmm17 # encoding: [0x62,0xa3,0x55,0x48,0x38,0xcd,0x01]
> 
> $ echo "0x62,0xa3,0x55,0x48,0x38,0xcd,0x01" |./Release+Asserts/bin/llvm-mc -disassemble -arch=x86-64
> <stdin>:1:1: warning: invalid instruction encoding
> 
> 
> Similarly, 3DNow seems broken, too.
> 
> 
> $ echo "pavgusb %mm2, %mm1"|./Release+Asserts/bin/llvm-mc -assemble -arch=x86-64 -show-encoding -x86-asm-syntax=att
>     .text
>     pavgusb    %mm2, %mm1              # encoding: [0x0f,0x0f,0xca,0xbf]
> 
> $ echo "0x0f,0x0f,0xca,0xbf" |./Release+Asserts/bin/llvm-mc -disassemble -arch=x86-64
> <stdin>:1:1: warning: invalid instruction encoding
> 
> 
> 
> 
> Or I did not use LLVM-MC properly? Any idea??
> 
> Thank you,
> Jun
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list