[PATCH] D43125: [ARM] Don't print "Requires NEON" error message for M-profile

Andre Vieira via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 06:34:09 PST 2018


avieira created this revision.
avieira added reviewers: rengolin, t.p.northover.
Herald added subscribers: kristof.beyls, javed.absar.

Hi,

This patch makes the disassembler not print the "instruction requires:
NEON" message when compiling for M-profile as there are no NEON
extensions for M-profile.

Regards,
Andre


https://reviews.llvm.org/D43125

Files:
  lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  test/MC/ARM/vfp4.s


Index: test/MC/ARM/vfp4.s
===================================================================
--- test/MC/ARM/vfp4.s
+++ test/MC/ARM/vfp4.s
@@ -23,7 +23,7 @@
 
 @ ARM: vfma.f32 q2, q4, q0 @ encoding: [0x50,0x4c,0x08,0xf2]
 @ THUMB: vfma.f32	q2, q4, q0 @ encoding: [0x08,0xef,0x50,0x4c]
-@ THUMB_V7EM-ERRORS: error: instruction requires: NEON
+@ THUMB_V7EM-ERRORS: error: invalid instruction
 @ THUMB_V7EM-ERRORS-NEXT: vfma.f32 q2, q4, q0
 vfma.f32 q2, q4, q0
 
@@ -57,7 +57,7 @@
 
 @ ARM: vfms.f32 q2, q4, q0 @ encoding: [0x50,0x4c,0x28,0xf2]
 @ THUMB: vfms.f32	q2, q4, q0 @ encoding: [0x28,0xef,0x50,0x4c]
-@ THUMB_V7EM-ERRORS: error: instruction requires: NEON
+@ THUMB_V7EM-ERRORS: error: invalid instruction
 @ THUMB_V7EM-ERRORS-NEXT: vfms.f32 q2, q4, q0
 vfms.f32 q2, q4, q0
 
Index: lib/Target/ARM/AsmParser/ARMAsmParser.cpp
===================================================================
--- lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -10230,6 +10230,8 @@
       if (!isThumb() && (MissingFeatures & Feature_IsThumb2) &&
           (MissingFeatures & ~(Feature_IsThumb2 | Feature_IsThumb)))
         break;
+      if (isMClass() && (MissingFeatures & Feature_HasNEON))
+        break;
 
       NearMissMessage Message;
       Message.Loc = IDLoc;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43125.133574.patch
Type: text/x-patch
Size: 1306 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180209/fcdde45b/attachment.bin>


More information about the llvm-commits mailing list