Fix typos found by http://github.com/lyda/misspell-check
[oota-llvm.git] / lib / Target / Hexagon / HexagonImmediates.td
index 1e3fcb862a32e796d31f3f23cd3d7b324aaf1159..18692c4dcc5ec02a4e27bc91e5375a07fa9f5a47 100644 (file)
@@ -1,4 +1,4 @@
-//=- HexagonImmediates.td - Hexagon immediate processing --*- tablegen -*-=//
+//===- HexagonImmediates.td - Hexagon immediate processing -*- tablegen -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
 // From IA64's InstrInfo file
 def s32Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s16Imm : Operand<i32> {
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s12Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s11Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s11_0Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s11_1Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s11_2Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s11_3Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s10Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
-def s8Imm : Operand<i32> {
+def s9Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
-def s9Imm : Operand<i32> {
+def s8Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s8Imm64 : Operand<i64> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s6Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s4Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s4_0Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s4_1Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s4_2Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def s4_3Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u64Imm : Operand<i64> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u32Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u16Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u16_0Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u16_1Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u16_2Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u11_3Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u10Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u9Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u8Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u7Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u6Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u6_0Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u6_1Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u6_2Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u6_3Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u5Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u4Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u3Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def u2Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
+}
+
+def u1Imm : Operand<i32> {
+  // For now, we use a generic print function for all operands.
+  let PrintMethod = "printImmOperand";
 }
 
 def n8Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
 }
 
 def m6Imm : Operand<i32> {
   // For now, we use a generic print function for all operands.
-  let PrintMethod = "printHexagonImmOperand";
+  let PrintMethod = "printImmOperand";
+}
+
+def nOneImm : Operand<i32> {
+  // For now, we use a generic print function for all operands.
+  let PrintMethod = "printNOneImmOperand";
 }
 
 //
@@ -361,7 +371,7 @@ def s4_3ImmPred  : PatLeaf<(i32 imm), [{
 def u64ImmPred  : PatLeaf<(i64 imm), [{
   // immS16 predicate - True if the immediate fits in a 16-bit sign extended
   // field.
-  // Adding "N ||" to supress gcc unused warning.
+  // Adding "N ||" to suppress gcc unused warning.
   return (N || true);
 }]>;
 
@@ -484,8 +494,15 @@ def m6ImmPred  : PatLeaf<(i32 imm), [{
 
 //InN means negative integers in [-(2^N - 1), 0]
 def n8ImmPred  : PatLeaf<(i32 imm), [{
-  // n8ImmPred predicate - True if the immediate fits in a 8-bit unsigned
+  // n8ImmPred predicate - True if the immediate fits in a 8-bit signed
   // field.
   int64_t v = (int64_t)N->getSExtValue();
   return (-255 <= v && v <= 0);
 }]>;
+
+def nOneImmPred  : PatLeaf<(i32 imm), [{
+  // nOneImmPred predicate - True if the immediate is -1.
+  int64_t v = (int64_t)N->getSExtValue();
+  return (-1 == v);
+}]>;
+