[llvm] r189204 - Put some of the AVX-512 parsing stuff in a more consistent place with the existing functions.

Craig Topper craig.topper at gmail.com
Sun Aug 25 16:18:05 PDT 2013


Author: ctopper
Date: Sun Aug 25 18:18:05 2013
New Revision: 189204

URL: http://llvm.org/viewvc/llvm-project?rev=189204&view=rev
Log:
Put some of the AVX-512 parsing stuff in a more consistent place with the existing functions.

Modified:
    llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
    llvm/trunk/lib/Target/X86/X86InstrInfo.td

Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=189204&r1=189203&r2=189204&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Sun Aug 25 18:18:05 2013
@@ -814,6 +814,9 @@ struct X86Operand : public MCParsedAsmOp
   bool isMem256() const {
     return Kind == Memory && (!Mem.Size || Mem.Size == 256);
   }
+  bool isMem512() const {
+    return Kind == Memory && (!Mem.Size || Mem.Size == 512);
+  }
 
   bool isMemVX32() const {
     return Kind == Memory && (!Mem.Size || Mem.Size == 32) &&
@@ -840,10 +843,6 @@ struct X86Operand : public MCParsedAsmOp
       getMemIndexReg() >= X86::ZMM0 && getMemIndexReg() <= X86::ZMM31;
   }
 
-  bool isMem512() const {
-    return Kind == Memory && (!Mem.Size || Mem.Size == 512);
-  }
-
   bool isAbsMem() const {
     return Kind == Memory && !getMemSegReg() && !getMemBaseReg() &&
       !getMemIndexReg() && getMemScale() == 1;
@@ -907,28 +906,27 @@ struct X86Operand : public MCParsedAsmOp
   void addMem256Operands(MCInst &Inst, unsigned N) const {
     addMemOperands(Inst, N);
   }
+  void addMem512Operands(MCInst &Inst, unsigned N) const {
+    addMemOperands(Inst, N);
+  }
   void addMemVX32Operands(MCInst &Inst, unsigned N) const {
     addMemOperands(Inst, N);
   }
   void addMemVY32Operands(MCInst &Inst, unsigned N) const {
     addMemOperands(Inst, N);
   }
-  void addMemVX64Operands(MCInst &Inst, unsigned N) const {
+  void addMemVZ32Operands(MCInst &Inst, unsigned N) const {
     addMemOperands(Inst, N);
   }
-  void addMemVY64Operands(MCInst &Inst, unsigned N) const {
+  void addMemVX64Operands(MCInst &Inst, unsigned N) const {
     addMemOperands(Inst, N);
   }
-
-  void addMemVZ32Operands(MCInst &Inst, unsigned N) const {
+  void addMemVY64Operands(MCInst &Inst, unsigned N) const {
     addMemOperands(Inst, N);
   }
   void addMemVZ64Operands(MCInst &Inst, unsigned N) const {
     addMemOperands(Inst, N);
   }
-  void addMem512Operands(MCInst &Inst, unsigned N) const {
-    addMemOperands(Inst, N);
-  }
 
   void addMemOperands(MCInst &Inst, unsigned N) const {
     assert((N == 5) && "Invalid number of operands!");

Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=189204&r1=189203&r2=189204&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Sun Aug 25 18:18:05 2013
@@ -302,6 +302,9 @@ def X86Mem128AsmOperand : AsmOperandClas
 def X86Mem256AsmOperand : AsmOperandClass {
   let Name = "Mem256"; let PredicateMethod = "isMem256";
 }
+def X86Mem512AsmOperand : AsmOperandClass {
+  let Name = "Mem512"; let PredicateMethod = "isMem512";
+}
 
 // Gather mem operands
 def X86MemVX32Operand : AsmOperandClass {
@@ -310,22 +313,18 @@ def X86MemVX32Operand : AsmOperandClass
 def X86MemVY32Operand : AsmOperandClass {
   let Name = "MemVY32"; let PredicateMethod = "isMemVY32";
 }
+def X86MemVZ32Operand : AsmOperandClass {
+  let Name = "MemVZ32"; let PredicateMethod = "isMemVZ32";
+}
 def X86MemVX64Operand : AsmOperandClass {
   let Name = "MemVX64"; let PredicateMethod = "isMemVX64";
 }
 def X86MemVY64Operand : AsmOperandClass {
   let Name = "MemVY64"; let PredicateMethod = "isMemVY64";
 }
-
 def X86MemVZ64Operand : AsmOperandClass {
   let Name = "MemVZ64"; let PredicateMethod = "isMemVZ64";
 }
-def X86MemVZ32Operand : AsmOperandClass {
-  let Name = "MemVZ32"; let PredicateMethod = "isMemVZ32";
-}
-def X86Mem512AsmOperand : AsmOperandClass {
-  let Name = "Mem512"; let PredicateMethod = "isMem512";
-}
 
 def X86AbsMemAsmOperand : AsmOperandClass {
   let Name = "AbsMem";





More information about the llvm-commits mailing list