mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
5e4f70ea56
The movw instruction is only available in ARM state for V6T2 and above. The MOVi16 instruction has requirement HasV6T2 but the InstAlias for mov rd, imm where the operand is imm0_65535_expr:$imm does not. This means that movw can incorrectly be used in ARMv4 and ARMv5 by writing mov rd, 0x1234. The simple fix is to the requirement HasV6T2 to the InstAlias. Tests added to not-armv4.s. Patch by Peter Smith. llvm-svn: 269761
14 lines
338 B
ArmAsm
14 lines
338 B
ArmAsm
@ RUN: not llvm-mc < %s -triple armv4-unknown-unknown -show-encoding 2>&1 | FileCheck %s
|
|
|
|
@ PR18524
|
|
@ CHECK: error: instruction requires: armv5t
|
|
clz r4,r9
|
|
|
|
@ CHECK: error: instruction requires: armv6t2
|
|
rbit r4,r9
|
|
|
|
@ CHECK: error: instruction requires: armv6t2
|
|
movw r4,#0x1234
|
|
@ CHECK: error: instruction requires: armv6t2
|
|
mov r4,#0x1234
|