From: Joerg Sonnenberger Date: Tue, 5 Aug 2014 14:40:32 +0000 (+0000) Subject: Add dci/ici instructions for PPC 476 and friends. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=deaa09e169bbb98e23754904f731f23eeac76702;p=oota-llvm.git Add dci/ici instructions for PPC 476 and friends. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214864 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index 764f46ebc47..1b11cd87823 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -3090,6 +3090,22 @@ def WRTEEI: I<31, (outs), (ins i1imm:$E), "wrteei $E", IIC_SprMTMSR>, 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, []>; diff --git a/test/MC/Disassembler/PowerPC/ppc64-encoding-4xx.txt b/test/MC/Disassembler/PowerPC/ppc64-encoding-4xx.txt index 0c15d0395d7..d4f2e3747e7 100644 --- a/test/MC/Disassembler/PowerPC/ppc64-encoding-4xx.txt +++ b/test/MC/Disassembler/PowerPC/ppc64-encoding-4xx.txt @@ -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 diff --git a/test/MC/PowerPC/ppc64-encoding-4xx.s b/test/MC/PowerPC/ppc64-encoding-4xx.s index c30d277061e..b973b0fdeaa 100644 --- a/test/MC/PowerPC/ppc64-encoding-4xx.s +++ b/test/MC/PowerPC/ppc64-encoding-4xx.s @@ -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