Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit c975958

Browse files
committed
ARM: Let the assembler reject v5 instructions in v4 mode.
PR18524. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199559 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent ee76094 commit c975958

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

lib/Target/ARM/ARMInstrInfo.td

+2-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ def ARMvminnm : SDNode<"ARMISD::VMINNM", SDT_ARMVMINNM, []>;
186186
def HasV4T : Predicate<"Subtarget->hasV4TOps()">,
187187
AssemblerPredicate<"HasV4TOps", "armv4t">;
188188
def NoV4T : Predicate<"!Subtarget->hasV4TOps()">;
189-
def HasV5T : Predicate<"Subtarget->hasV5TOps()">;
189+
def HasV5T : Predicate<"Subtarget->hasV5TOps()">,
190+
AssemblerPredicate<"HasV5TOps", "armv5t">;
190191
def HasV5TE : Predicate<"Subtarget->hasV5TEOps()">,
191192
AssemblerPredicate<"HasV5TEOps", "armv5te">;
192193
def HasV6 : Predicate<"Subtarget->hasV6Ops()">,

test/MC/ARM/not-armv4.s

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@ RUN: not llvm-mc < %s -triple armv4-unknown-unknown -show-encoding 2>&1 | FileCheck %s
2+
3+
@ PR18524
4+
@ CHECK: error: instruction requires: armv5t
5+
clz r4,r9
6+
7+
@ CHECK: error: instruction requires: armv6t2
8+
rbit r4,r9

0 commit comments

Comments
 (0)