[llvm] r215282 - Use the full form of dccci and iccci from the early PPC 405 documents,
Joerg Sonnenberger
joerg at bec.de
Sat Aug 9 06:58:32 PDT 2014
Author: joerg
Date: Sat Aug 9 08:58:31 2014
New Revision: 215282
URL: http://llvm.org/viewvc/llvm-project?rev=215282&view=rev
Log:
Use the full form of dccci and iccci from the early PPC 405 documents,
since the operands are actually used on those cores. Provide aliases for
the only documented case in the newer Power ISA speec.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td
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=215282&r1=215281&r2=215282&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Sat Aug 9 08:58:31 2014
@@ -3128,21 +3128,15 @@ 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;
+def DCCCI : XForm_tlb<454, (outs), (ins gprc:$A, gprc:$B),
+ "dccci $A, $B", IIC_LdStLoad>, Requires<[IsPPC4xx]>;
+def ICCCI : XForm_tlb<966, (outs), (ins gprc:$A, gprc:$B),
+ "iccci $A, $B", IIC_LdStLoad>, Requires<[IsPPC4xx]>;
- 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 : InstAlias<"dci 0", (DCCCI R0, R0)>, Requires<[IsPPC4xx]>;
+def : InstAlias<"dccci", (DCCCI R0, R0)>, Requires<[IsPPC4xx]>;
+def : InstAlias<"ici 0", (ICCCI R0, R0)>, Requires<[IsPPC4xx]>;
+def : InstAlias<"iccci", (ICCCI R0, R0)>, Requires<[IsPPC4xx]>;
def MFMSR : XForm_rs<31, 83, (outs gprc:$RT), (ins),
"mfmsr $RT", IIC_SprMFMSR, []>;
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=215282&r1=215281&r2=215282&view=diff
==============================================================================
--- llvm/trunk/test/MC/PowerPC/ppc64-encoding-4xx.s (original)
+++ llvm/trunk/test/MC/PowerPC/ppc64-encoding-4xx.s Sat Aug 9 08:58:31 2014
@@ -91,12 +91,18 @@
# 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
+# CHECK-BE: dccci 5, 6 # encoding: [0x7c,0x05,0x33,0x8c]
+# CHECK-LE: dccci 5, 6 # encoding: [0x8c,0x33,0x05,0x7c]
+ dccci %r5,%r6
+# CHECK-BE: iccci 5, 6 # encoding: [0x7c,0x05,0x37,0x8c]
+# CHECK-LE: iccci 5, 6 # encoding: [0x8c,0x37,0x05,0x7c]
+ iccci %r5,%r6
+# CHECK-BE: dccci 0, 0 # encoding: [0x7c,0x00,0x03,0x8c]
+# CHECK-LE: dccci 0, 0 # encoding: [0x8c,0x03,0x00,0x7c]
+ dci %r0
+# CHECK-BE: iccci 0, 0 # encoding: [0x7c,0x00,0x07,0x8c]
+# CHECK-LE: iccci 0, 0 # encoding: [0x8c,0x07,0x00,0x7c]
+ ici 0
# CHECK-BE: mfspr 2, 990 # encoding: [0x7c,0x5e,0xf2,0xa6]
# CHECK-LE: mfspr 2, 990 # encoding: [0xa6,0xf2,0x5e,0x7c]
More information about the llvm-commits
mailing list