From c97595849897fff829ec34cf37ac09760b8539dc Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 18 Jan 2014 19:03:19 +0000 Subject: [PATCH] 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 --- lib/Target/ARM/ARMInstrInfo.td | 3 ++- test/MC/ARM/not-armv4.s | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 test/MC/ARM/not-armv4.s diff --git a/lib/Target/ARM/ARMInstrInfo.td b/lib/Target/ARM/ARMInstrInfo.td index 6892717e906..6b93b945df2 100644 --- a/lib/Target/ARM/ARMInstrInfo.td +++ b/lib/Target/ARM/ARMInstrInfo.td @@ -186,7 +186,8 @@ def ARMvminnm : SDNode<"ARMISD::VMINNM", SDT_ARMVMINNM, []>; def HasV4T : Predicate<"Subtarget->hasV4TOps()">, AssemblerPredicate<"HasV4TOps", "armv4t">; def NoV4T : Predicate<"!Subtarget->hasV4TOps()">; -def HasV5T : Predicate<"Subtarget->hasV5TOps()">; +def HasV5T : Predicate<"Subtarget->hasV5TOps()">, + AssemblerPredicate<"HasV5TOps", "armv5t">; def HasV5TE : Predicate<"Subtarget->hasV5TEOps()">, AssemblerPredicate<"HasV5TEOps", "armv5te">; def HasV6 : Predicate<"Subtarget->hasV6Ops()">, diff --git a/test/MC/ARM/not-armv4.s b/test/MC/ARM/not-armv4.s new file mode 100644 index 00000000000..a1ba611a61e --- /dev/null +++ b/test/MC/ARM/not-armv4.s @@ -0,0 +1,8 @@ +@ 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 -- 2.34.1