From 7c5b978254b78acc87b3796035cd71c72e142b2b Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Mon, 4 Aug 2014 23:49:45 +0000 Subject: [PATCH] Add PPC 603's tlbld and tlbli instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214825 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCInstrInfo.td | 5 +++++ test/MC/Disassembler/PowerPC/ppc64-encoding-6xx.txt | 6 ++++++ test/MC/PowerPC/ppc64-encoding-6xx.s | 7 +++++++ 3 files changed, 18 insertions(+) create mode 100644 test/MC/Disassembler/PowerPC/ppc64-encoding-6xx.txt diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index 7c50a3b763e..eea1fcae9f5 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -3106,6 +3106,11 @@ def TLBSYNC : XForm_0<31, 566, (outs), (ins), def TLBIEL : XForm_16b<31, 274, (outs), (ins gprc:$RB), "tlbiel $RB", IIC_SprTLBIEL, []>; +def TLBLD : XForm_16b<31, 978, (outs), (ins gprc:$RB), + "tlbld $RB", IIC_LdStLoad, []>, Requires<[IsPPC6xx]>; +def TLBLI : XForm_16b<31, 1010, (outs), (ins gprc:$RB), + "tlbli $RB", IIC_LdStLoad, []>, Requires<[IsPPC6xx]>; + def TLBIE : XForm_26<31, 306, (outs), (ins gprc:$RS, gprc:$RB), "tlbie $RB,$RS", IIC_SprTLBIE, []>; diff --git a/test/MC/Disassembler/PowerPC/ppc64-encoding-6xx.txt b/test/MC/Disassembler/PowerPC/ppc64-encoding-6xx.txt new file mode 100644 index 00000000000..7276847adc5 --- /dev/null +++ b/test/MC/Disassembler/PowerPC/ppc64-encoding-6xx.txt @@ -0,0 +1,6 @@ +# RUN: llvm-mc --disassemble %s -triple powerpc64-unknown-unknown -mcpu=pwr7 | FileCheck %s + +# CHECK: tlbld 4 +0x7c 0x00 0x27 0xa4 +# CHECK: tlbli 4 +0x7c 0x00 0x27 0xe4 diff --git a/test/MC/PowerPC/ppc64-encoding-6xx.s b/test/MC/PowerPC/ppc64-encoding-6xx.s index 699c58eb0f7..3a5e7a126b8 100644 --- a/test/MC/PowerPC/ppc64-encoding-6xx.s +++ b/test/MC/PowerPC/ppc64-encoding-6xx.s @@ -100,3 +100,10 @@ mtdbatu 3, %r12 # CHECK-BE: mtspr 543, 12 # encoding: [0x7d,0x9f,0x83,0xa6] # CHECK-LE: mtspr 543, 12 # encoding: [0xa6,0x83,0x9f,0x7d] mtdbatl 3, %r12 + +# CHECK-BE: tlbld 4 # encoding: [0x7c,0x00,0x27,0xa4] +# CHECK-LE: tlbld 4 # encoding: [0xa4,0x27,0x00,0x7c] +tlbld %r4 +# CHECK-BE: tlbli 4 # encoding: [0x7c,0x00,0x27,0xe4] +# CHECK-LE: tlbli 4 # encoding: [0xe4,0x27,0x00,0x7c] +tlbli %r4 -- 2.34.1