[PATCH] Fix decoding of ARM mov/movt/movw writing sp operand
Mihail Popa
mihail.popa at arm.com
Thu Apr 18 09:01:47 PDT 2013
Hello.
Please review this simple instruction decoding fix. The MC disassembler
does not decode correctly mov instructions which place an immediate into
sp. Assembly works fine:
echo "movt sp, #0xd45" | ../build/bin/llvm-mc -assemble -show-inst
-triple=armv7 -show-encoding
.text
movt sp, #3397 @ encoding:[0x45,0xdd,0x40,0xe3]
@ <MCInst #232 MOVTi16
@ <MCOperand Reg:105>
@ <MCOperand Reg:105>
@ <MCOperand Imm:3397>
@ <MCOperand Imm:14>
@ <MCOperand Reg:0>>
but disassembly fails:
echo "0x45 0xdd 0x40 0xe3" | ../build/bin/llvm-mc -disassemble
-show-inst -triple=armv7 -show-encoding
.text
<stdin>:1:1: warning: invalid instruction encoding
0x45 0xdd 0x40 0xe3
^
<stdin>:1:6: warning: invalid instruction encoding
0x45 0xdd 0x40 0xe3
^
<stdin>:1:11: warning: invalid instruction encoding
0x45 0xdd 0x40 0xe3
^
<stdin>:1:16: warning: invalid instruction encoding
0x45 0xdd 0x40 0xe3
Regards,
Mihai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130418/324d45d6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLVM-714.movspimm.patch
Type: text/x-patch
Size: 1888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130418/324d45d6/attachment.bin>
More information about the llvm-commits
mailing list