Add norm sub-target feature to table gen for ARC
authorThomas Johnson <thomasj@synopsys.com>
Mon, 21 Jun 2021 17:41:51 +0000 (20:41 +0300)
committerDanila Malyutin <danila@synopsys.com>
Tue, 22 Jun 2021 11:39:29 +0000 (14:39 +0300)
This adds the `norm` sub-target feature (without backing implementation for now) to table gen.

Differential Revision: https://reviews.llvm.org/D104558

llvm/lib/Target/ARC/ARC.td
llvm/lib/Target/ARC/ARCSubtarget.h

index 846f1bb..142ce7f 100644 (file)
@@ -8,6 +8,18 @@
 
 include "llvm/Target/Target.td"
 
+//===----------------------------------------------------------------------===//
+// ARC Subtarget features
+//===----------------------------------------------------------------------===//
+
+def FeatureNORM
+    : SubtargetFeature<"norm", "Xnorm", "true",
+                       "Enable support for norm instruction.">;
+
+//===----------------------------------------------------------------------===//
+// Registers, calling conventions, instruction descriptions
+//===----------------------------------------------------------------------===//
+
 include "ARCRegisterInfo.td"
 include "ARCInstrInfo.td"
 include "ARCCallingConv.td"
index 1f1b27f..6a48562 100644 (file)
@@ -29,6 +29,8 @@ class StringRef;
 class TargetMachine;
 
 class ARCSubtarget : public ARCGenSubtargetInfo {
+  bool Xnorm = false;
+
   virtual void anchor();
   ARCInstrInfo InstrInfo;
   ARCFrameLowering FrameLowering;
@@ -58,6 +60,8 @@ public:
   const SelectionDAGTargetInfo *getSelectionDAGInfo() const override {
     return &TSInfo;
   }
+
+  bool hasNorm() const { return Xnorm; }
 };
 
 } // end namespace llvm