[llvm] r214864 - Add dci/ici instructions for PPC 476 and friends.

Joerg Sonnenberger joerg at bec.de
Tue Aug 5 07:40:33 PDT 2014


Author: joerg
Date: Tue Aug  5 09:40:32 2014
New Revision: 214864

URL: http://llvm.org/viewvc/llvm-project?rev=214864&view=rev
Log:
Add dci/ici instructions for PPC 476 and friends.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td
    llvm/trunk/test/MC/Disassembler/PowerPC/ppc64-encoding-4xx.txt
    llvm/trunk/test/MC/PowerPC/ppc64-encoding-4xx.s

Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?rev=214864&r1=214863&r2=214864&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Tue Aug  5 09:40:32 2014
@@ -3090,6 +3090,22 @@ def WRTEEI: I<31, (outs), (ins i1imm:$E)
   let Inst{21-30} = 163;
 }
 
+def DCI: I<31, (outs), (ins u4imm:$CT), "dci $CT", IIC_LdStLoad>,
+              Requires<[IsPPC4xx]> {
+  bits<4> CT;
+
+  let Inst{7-10} = CT;
+  let Inst{21-30} = 454;
+}
+
+def ICI: I<31, (outs), (ins u4imm:$CT), "ici $CT", IIC_LdStLoad>,
+              Requires<[IsPPC4xx]> {
+  bits<4> CT;
+
+  let Inst{7-10} = CT;
+  let Inst{21-30} = 966;
+}
+
 def MFMSR : XForm_rs<31, 83, (outs gprc:$RT), (ins),
                   "mfmsr $RT", IIC_SprMFMSR, []>;
 

Modified: llvm/trunk/test/MC/Disassembler/PowerPC/ppc64-encoding-4xx.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/PowerPC/ppc64-encoding-4xx.txt?rev=214864&r1=214863&r2=214864&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/PowerPC/ppc64-encoding-4xx.txt (original)
+++ llvm/trunk/test/MC/Disassembler/PowerPC/ppc64-encoding-4xx.txt Tue Aug  5 09:40:32 2014
@@ -19,3 +19,8 @@
 0x7c 0x43 0x0f 0x24
 # CHECK: tlbsx. 2, 3, 1
 0x7c 0x43 0x0f 0x25
+
+# CHECK-BE: dci 14
+0x7d 0xc0 0x03 0x8c
+# CHECK-BE: ici 14
+0x7d 0xc0 0x07 0x8c

Modified: llvm/trunk/test/MC/PowerPC/ppc64-encoding-4xx.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/PowerPC/ppc64-encoding-4xx.s?rev=214864&r1=214863&r2=214864&view=diff
==============================================================================
--- llvm/trunk/test/MC/PowerPC/ppc64-encoding-4xx.s (original)
+++ llvm/trunk/test/MC/PowerPC/ppc64-encoding-4xx.s Tue Aug  5 09:40:32 2014
@@ -90,3 +90,10 @@
 # CHECK-BE: mtspr 988, 2                    # encoding: [0x7c,0x5c,0xf3,0xa6]
 # CHECK-LE: mtspr 988, 2                    # encoding: [0xa6,0xf3,0x5c,0x7c]
             mttbhi %r2
+
+# CHECK-BE: dci 14                          # encoding: [0x7d,0xc0,0x03,0x8c]
+# CHECK-LE: dci 14                          # encoding: [0x8c,0x03,0xc0,0x7d]
+            dci 14
+# CHECK-BE: ici 14                          # encoding: [0x7d,0xc0,0x07,0x8c]
+# CHECK-LE: ici 14                          # encoding: [0x8c,0x07,0xc0,0x7d]
+            ici 14





More information about the llvm-commits mailing list