[llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.h

Chris Lattner lattner at cs.uiuc.edu
Mon Aug 4 00:00:18 PDT 2003


Changes in directory llvm/lib/Target/X86:

X86InstrInfo.h updated: 1.24 -> 1.25

---
Log message:

Lump the base opcode in with the X86 TargetSpecific flags


---
Diffs of the changes:

Index: llvm/lib/Target/X86/X86InstrInfo.h
diff -u llvm/lib/Target/X86/X86InstrInfo.h:1.24 llvm/lib/Target/X86/X86InstrInfo.h:1.25
--- llvm/lib/Target/X86/X86InstrInfo.h:1.24	Thu Jun 26 19:00:46 2003
+++ llvm/lib/Target/X86/X86InstrInfo.h	Sun Aug  3 16:56:22 2003
@@ -134,9 +134,11 @@
     FPTypeMask = 7 << 14,
 
     // PrintImplUses - Print out implicit uses in the assembly output.
-    PrintImplUses = 1 << 17
+    PrintImplUses = 1 << 17,
 
-    // Bits 18 -> 31 are unused
+    OpcodeMask    = 0xFF << 18,
+    OpcodeShift   = 18,
+    // Bits 26 -> 31 are unused
   };
 }
 
@@ -166,8 +168,9 @@
   // getBaseOpcodeFor - This function returns the "base" X86 opcode for the
   // specified opcode number.
   //
-  unsigned char getBaseOpcodeFor(unsigned Opcode) const;
+  unsigned char getBaseOpcodeFor(unsigned Opcode) const {
+    return get(Opcode).TSFlags >> X86II::OpcodeShift;
+  }
 };
-
 
 #endif





More information about the llvm-commits mailing list