[WinEH] Add llvm.eh.exceptionpointer intrinsic
[oota-llvm.git] / utils / TableGen / X86ModRMFilters.h
index 5ab1a48846bbb0cbea27f55a56384d95bad18784..d919c588c644dd5ba1cd3586ade3a36e681fa52a 100644 (file)
@@ -15,8 +15,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef X86MODRMFILTERS_H
-#define X86MODRMFILTERS_H
+#ifndef LLVM_UTILS_TABLEGEN_X86MODRMFILTERS_H
+#define LLVM_UTILS_TABLEGEN_X86MODRMFILTERS_H
 
 #include "llvm/Support/DataTypes.h"
 
@@ -50,13 +50,13 @@ public:
 ///   require a ModR/M byte or instructions where the entire ModR/M byte is used
 ///   for operands.
 class DumbFilter : public ModRMFilter {
-  virtual void anchor();
+  void anchor() override;
 public:
-  bool isDumb() const {
+  bool isDumb() const override {
     return true;
   }
-  
-  bool accepts(uint8_t modRM) const {
+
+  bool accepts(uint8_t modRM) const override {
     return true;
   }
 };
@@ -65,7 +65,7 @@ public:
 ///   Some instructions are classified based on whether they are 11 or anything
 ///   else.  This filter performs that classification.
 class ModFilter : public ModRMFilter {
-  virtual void anchor();
+  void anchor() override;
   bool R;
 public:
   /// Constructor
@@ -79,35 +79,15 @@ public:
     R(r) {
   }
 
-  bool accepts(uint8_t modRM) const {
+  bool accepts(uint8_t modRM) const override {
     return (R == ((modRM & 0xc0) == 0xc0));
   }
 };
 
-/// AddRegEscapeFilter - Some escape opcodes have one of the register operands
-///   added to the ModR/M byte, meaning that a range of eight ModR/M values
-///   maps to a single instruction.  Such instructions require the ModR/M byte
-///   to fall between 0xc0 and 0xff.
-class AddRegEscapeFilter : public ModRMFilter {
-  virtual void anchor();
-  uint8_t ModRM;
-public:
-  /// Constructor
-  ///
-  /// \param modRM The value of the ModR/M byte when the register operand
-  ///              refers to the first register in the register set.
-  AddRegEscapeFilter(uint8_t modRM) : ModRM(modRM) {
-  }
-
-  bool accepts(uint8_t modRM) const {
-    return (modRM >= ModRM && modRM < ModRM + 8);
-  }
-};
-
 /// ExtendedFilter - Extended opcodes are classified based on the value of the
 ///   mod field [bits 7-6] and the value of the nnn field [bits 5-3]. 
 class ExtendedFilter : public ModRMFilter {
-  virtual void anchor();
+  void anchor() override;
   bool R;
   uint8_t NNN;
 public:
@@ -122,7 +102,7 @@ public:
     NNN(nnn) {
   }
 
-  bool accepts(uint8_t modRM) const {
+  bool accepts(uint8_t modRM) const override {
     return (((R  && ((modRM & 0xc0) == 0xc0)) ||
              (!R && ((modRM & 0xc0) != 0xc0))) &&
             (((modRM & 0x38) >> 3) == NNN));
@@ -132,7 +112,7 @@ public:
 /// ExactFilter - The occasional extended opcode (such as VMCALL or MONITOR)
 ///   requires the ModR/M byte to have a specific value.
 class ExactFilter : public ModRMFilter {
-  virtual void anchor();
+  void anchor() override;
   uint8_t ModRM;
 public:
   /// Constructor
@@ -143,7 +123,7 @@ public:
     ModRM(modRM) {
   }
 
-  bool accepts(uint8_t modRM) const {
+  bool accepts(uint8_t modRM) const override {
     return (ModRM == modRM);
   }
 };