Somehow this important part of the patch, where I actually check the Mask,
authorJoey Gouly <joey.gouly@arm.com>
Thu, 12 Sep 2013 14:23:19 +0000 (14:23 +0000)
committerJoey Gouly <joey.gouly@arm.com>
Thu, 12 Sep 2013 14:23:19 +0000 (14:23 +0000)
got lost during my iterations of review.

Thanks to Hal for spotting it!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190604 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCInstrDesc.h
test/MC/ARM/deprecated-v8.s

index 84d6380476433fd274e991ebe0a6af6011c2b8fd..214b593f4ad6e7e1e28ec4d8a2d76afa5855a592 100644 (file)
@@ -169,7 +169,7 @@ public:
                          std::string &Info) const {
     if (ComplexDeprecationInfo)
       return ComplexDeprecationInfo(MI, STI, Info);
-    if (DeprecatedFeatureMask != 0) {
+    if ((DeprecatedFeatureMask & STI.getFeatureBits()) != 0) {
       // FIXME: it would be nice to include the subtarget feature here.
       Info = "deprecated";
       return true;
index b365cd198a54535b8be96e51ca684024c55ac412..f3939bbf7f7788f6255def378b95656e68ef5725 100644 (file)
@@ -1,5 +1,8 @@
-@ RUN: llvm-mc -triple armv8 -show-encoding < %s 2>&1 | FileCheck %s
+@ RUN: llvm-mc -triple armv8 -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=CHECK-V8
+@ RUN: llvm-mc -triple armv7 -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=CHECK-V7
 setend be
-@ CHECK: warning: deprecated
+@ CHECK-V8: warning: deprecated
+@ CHECK-V7-NOT: warning: deprecated
 mcr p8, #0, r5, c7, c5, #4
-@ CHECK: warning: deprecated on armv8
+@ CHECK-V8: warning: deprecated on armv8
+@ CHECK-V7-NOT: warning: deprecated on armv8