From 9e3d58aae1f1ffdb8fbcf46c008df42e7882454a Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Wed, 30 Jul 2014 20:44:04 +0000 Subject: [PATCH] Add BookE's tlbre, tlbwe and tlbivax instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214332 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCInstrInfo.td | 15 +++++++++++++++ .../PowerPC/ppc64-encoding-bookIII.txt | 7 +++++++ test/MC/PowerPC/ppc64-encoding-bookIII.s | 10 ++++++++++ 3 files changed, 32 insertions(+) diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index e9b0061c3bc..06b91e17912 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -3103,6 +3103,21 @@ def TLBIEL : XForm_16b<31, 274, (outs), (ins gprc:$RB), def TLBIE : XForm_26<31, 306, (outs), (ins gprc:$RS, gprc:$RB), "tlbie $RB,$RS", IIC_SprTLBIE, []>; +def TLBIVAX : I<31, (outs), (ins gprc:$RA, gprc:$RB), "tlbivax $RA, $RB", + IIC_LdStLoad>, Requires<[IsBookE]> { + bits<5> RA; + bits<5> RB; + let Inst{11-15} = RA; + let Inst{16-20} = RB; + let Inst{21-30} = 786; +} + +def TLBRE : XForm_24_eieio<31, 946, (outs), (ins), + "tlbre", IIC_LdStLoad, []>, Requires<[IsBookE]>; + +def TLBWE : XForm_24_eieio<31, 978, (outs), (ins), + "tlbwe", IIC_LdStLoad, []>, Requires<[IsBookE]>; + def RFI : XForm_0<19, 50, (outs), (ins), "rfi", IIC_BrB, []>, Requires<[IsBookE]>; def RFCI : XForm_0<19, 51, (outs), (ins), "rfci", IIC_BrB, []>, diff --git a/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt b/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt index 844a0ac46cc..f341431f9a8 100644 --- a/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt +++ b/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt @@ -116,3 +116,10 @@ 0x7c 0x00 0x01 0x46 # CHECK: wrteei 1 0x7c 0x00 0x81 0x46 + +# CHECK: tlbre +0x7c 0x00 0x07 0x64 +# CHECK: tlbwe +0x7c 0x00 0x07 0xa4 +# CHECK: tlbivax 11, 12 +0x7c 0x0b 0x66 0x24 diff --git a/test/MC/PowerPC/ppc64-encoding-bookIII.s b/test/MC/PowerPC/ppc64-encoding-bookIII.s index 65a7350ea87..2dd98a3cd84 100644 --- a/test/MC/PowerPC/ppc64-encoding-bookIII.s +++ b/test/MC/PowerPC/ppc64-encoding-bookIII.s @@ -172,3 +172,13 @@ # CHECK-BE: wrteei 1 # encoding: [0x7c,0x00,0x81,0x46] # CHECK-LE: wrteei 1 # encoding: [0x46,0x81,0x00,0x7c] wrteei 1 + +# CHECK-BE: tlbre # encoding: [0x7c,0x00,0x07,0x64] +# CHECK-LE: tlbre # encoding: [0x64,0x07,0x00,0x7c] + tlbre +# CHECK-BE: tlbwe # encoding: [0x7c,0x00,0x07,0xa4] +# CHECK-LE: tlbwe # encoding: [0xa4,0x07,0x00,0x7c] + tlbwe +# CHECK-BE: tlbivax 11, 12 # encoding: [0x7c,0x0b,0x66,0x24] +# CHECK-LE: tlbivax 11, 12 # encoding: [0x24,0x66,0x0b,0x7c] + tlbivax %r11, %r12