[PATCH] D120942: [PowerPC] Add support for the canonical version of tlbie
Bill Wendling via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 16:21:53 PST 2022
void updated this revision to Diff 412863.
void added a comment.
Add comment about POWER6 and tlbie with one operand.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120942/new/
https://reviews.llvm.org/D120942
Files:
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/MC/PowerPC/ppc64-encoding-bookIII.s
Index: llvm/test/MC/PowerPC/ppc64-encoding-bookIII.s
===================================================================
--- llvm/test/MC/PowerPC/ppc64-encoding-bookIII.s
+++ llvm/test/MC/PowerPC/ppc64-encoding-bookIII.s
@@ -158,9 +158,17 @@
# CHECK-LE: tlbsync # encoding: [0x6c,0x04,0x00,0x7c]
tlbsync
-# CHECK-BE: tlbiel 4 # encoding: [0x7c,0x00,0x22,0x24]
-# CHECK-LE: tlbiel 4 # encoding: [0x24,0x22,0x00,0x7c]
- tlbiel %r4
+# CHECK-BE: tlbiel 3 # encoding: [0x7c,0x00,0x1a,0x24]
+# CHECK-LE: tlbiel 3 # encoding: [0x24,0x1a,0x00,0x7c]
+ tlbiel %r3, 0, 0, 0, 0
+
+# CHECK-BE: tlbiel 3 # encoding: [0x7c,0x00,0x1a,0x24]
+# CHECK-LE: tlbiel 3 # encoding: [0x24,0x1a,0x00,0x7c]
+ tlbiel %r3
+
+# CHECK-BE: tlbiel 3, 4, 3, 1, 1 # encoding: [0x7c,0x8f,0x1a,0x24]
+# CHECK-LE: tlbiel 3, 4, 3, 1, 1 # encoding: [0x24,0x1a,0x8f,0x7c]
+ tlbiel %r3, %r4, 3, 1, 1
# Note that the one-operand version of "tlbie" is accepted by POWER6, but seems
# to be invalid for later POWER versions.
Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td
===================================================================
--- llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.td
@@ -4615,8 +4615,9 @@
def TLBSYNC : XForm_0<31, 566, (outs), (ins),
"tlbsync", IIC_SprTLBSYNC, []>;
-def TLBIEL : XForm_16b<31, 274, (outs), (ins gprc:$RB),
- "tlbiel $RB", IIC_SprTLBIEL, []>;
+def TLBIEL : XForm_tlbie<274, (outs),
+ (ins gprc:$RS, gprc:$RB, i32imm:$RIC, i1imm:$PRS, i1imm:$R),
+ "tlbiel $RB, $RS, $RIC, $PRS, $R", IIC_SprTLBIEL, []>;
def TLBLD : XForm_16b<31, 978, (outs), (ins gprc:$RB),
"tlbld $RB", IIC_LdStLoad, []>, Requires<[IsPPC6xx]>;
@@ -4986,6 +4987,7 @@
}
def : InstAlias<"tlbie $RB, $RS", (TLBIE gprc:$RS, gprc:$RB, 0, 0, 0)>;
+def : InstAlias<"tlbiel $RB", (TLBIEL R0, gprc:$RB, 0, 0, 0)>;
def : InstAlias<"tlbrehi $RS, $A", (TLBRE2 gprc:$RS, gprc:$A, 0)>,
Requires<[IsPPC4xx]>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120942.412863.patch
Type: text/x-patch
Size: 2296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220304/6ee3bc88/attachment.bin>
More information about the llvm-commits
mailing list