Skip to content

Commit

Permalink
Use the full form of dccci and iccci from the early PPC 405 documents,
Browse files Browse the repository at this point in the history
since the operands are actually used on those cores. Provide aliases for
the only documented case in the newer Power ISA speec.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215282 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
jsonn committed Aug 9, 2014
1 parent e9da71f commit 26adfd1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
24 changes: 9 additions & 15 deletions lib/Target/PowerPC/PPCInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -3128,21 +3128,15 @@ 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 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]>;

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, []>;
Expand Down
18 changes: 12 additions & 6 deletions test/MC/PowerPC/ppc64-encoding-4xx.s
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 26adfd1

Please sign in to comment.