[SystemZ] Add a definition of the IPM instruction
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Mon, 12 Aug 2013 10:05:58 +0000 (10:05 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Mon, 12 Aug 2013 10:05:58 +0000 (10:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188161 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SystemZ/SystemZInstrFP.td
lib/Target/SystemZ/SystemZInstrFormats.td
lib/Target/SystemZ/SystemZInstrInfo.td
test/MC/Disassembler/SystemZ/insns.txt
test/MC/SystemZ/insn-good.s

index b903b5197582fc13d3aa1045b23f549854af12ea..9f5279e63a287f45f6a05ab852c6814f649efb62 100644 (file)
@@ -27,9 +27,9 @@ defm CondStoreF64 : CondStores<FP64, nonvolatile_store,
 
 // Load zero.
 let neverHasSideEffects = 1, isAsCheapAsAMove = 1, isMoveImm = 1 in {
-  def LZER : InherentRRE<"lze", 0xB374, FP32,  (fpimm0)>;
-  def LZDR : InherentRRE<"lzd", 0xB375, FP64,  (fpimm0)>;
-  def LZXR : InherentRRE<"lzx", 0xB376, FP128, (fpimm0)>;
+  def LZER : InherentRRE<"lzer", 0xB374, FP32,  (fpimm0)>;
+  def LZDR : InherentRRE<"lzdr", 0xB375, FP64,  (fpimm0)>;
+  def LZXR : InherentRRE<"lzxr", 0xB376, FP128, (fpimm0)>;
 }
 
 // Moves between two floating-point registers.
index 954df112693c631e15d39c3d11a5803bc13247b1..2af8e83aed5b2867bf3754fdfba89a1ba88f79a2 100644 (file)
@@ -552,7 +552,7 @@ class InstSS<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern>
 class InherentRRE<string mnemonic, bits<16> opcode, RegisterOperand cls,
                   dag src>
   : InstRRE<opcode, (outs cls:$R1), (ins),
-            mnemonic#"r\t$R1",
+            mnemonic#"\t$R1",
             [(set cls:$R1, src)]> {
   let R2 = 0;
 }
index b318d674f3c375886b3c9551b5bbc960cf2f514c..5371e8ad4db810ce35a34ae31ba057d34702c1dc 100644 (file)
@@ -1119,6 +1119,10 @@ let Defs = [CC] in {
 // Miscellaneous Instructions.
 //===----------------------------------------------------------------------===//
 
+// Extract CC into bits 29 and 28 of a register.
+let Uses = [CC] in
+  def IPM : InherentRRE<"ipm", 0xB222, GR32, (null_frag)>;
+
 // Read a 32-bit access register into a GR32.  As with all GR32 operations,
 // the upper 32 bits of the enclosing GR64 remain unchanged, which is useful
 // when a 64-bit address is stored in a pair of access registers.
index 51860cc5d1b10aada39b8d929cef66926f2f66c4..97e41fee1216d10a58a6d6f1b8ca5fc4d8229623 100644 (file)
 # CHECK: iill %r15, 0
 0xa5 0xf3 0x00 0x00
 
+# CHECK: ipm %r0
+0xb2 0x22 0x00 0x00
+
+# CHECK: ipm %r1
+0xb2 0x22 0x00 0x10
+
+# CHECK: ipm %r15
+0xb2 0x22 0x00 0xf0
+
 # CHECK: la %r0, 0
 0x41 0x00 0x00 0x00
 
index c997271bb6a63dbd24c035050ea191f74a7c5664..c4e09e47783a11415db0f048603303c30a1d180a 100644 (file)
        iill    %r0, 0xffff
        iill    %r15, 0
 
+#CHECK: ipm    %r0                     # encoding: [0xb2,0x22,0x00,0x00]
+#CHECK: ipm    %r1                     # encoding: [0xb2,0x22,0x00,0x10]
+#CHECK: ipm    %r15                    # encoding: [0xb2,0x22,0x00,0xf0]
+
+       ipm     %r0
+       ipm     %r1
+       ipm     %r15
+
 #CHECK: l      %r0, 0                  # encoding: [0x58,0x00,0x00,0x00]
 #CHECK: l      %r0, 4095               # encoding: [0x58,0x00,0x0f,0xff]
 #CHECK: l      %r0, 0(%r1)             # encoding: [0x58,0x00,0x10,0x00]