[PATCH] D97418: [PowerPC] Disable more extended mne on AIX
Jinsong Ji via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 4 13:13:53 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7967221a7263: [PowerPC] Disable more extended mne on AIX (authored by jsji).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97418/new/
https://reviews.llvm.org/D97418
Files:
llvm/lib/Target/PowerPC/PPCInstr64Bit.td
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-ext.txt
Index: llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-ext.txt
===================================================================
--- llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-ext.txt
+++ llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-ext.txt
@@ -2235,16 +2235,20 @@
# CHECK: mfctr 2
0x7c 0x49 0x02 0xa6
-# CHECK: mtuamr 2
+# MODERN: mtuamr 2
+# OLD: mtspr 13, 2
0x7c 0x4d 0x03 0xa6
-# CHECK: mfuamr 2
+# MODERN: mfuamr 2
+# OLD: mfspr 2, 13
0x7c 0x4d 0x02 0xa6
-# CHECK: mtppr 2
+# MODERN: mtppr 2
+# OLD: mtspr 896, 2
0x7c 0x40 0xe3 0xa6
-# CHECK: mfppr 2
+# MODERN: mfppr 2
+# OLD: mfspr 2, 896
0x7c 0x40 0xe2 0xa6
# CHECK: nop
Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td
===================================================================
--- llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.td
@@ -4646,6 +4646,12 @@
def : InstAlias<"xnop", (XORI R0, R0, 0)>;
+def : InstAlias<"mtxer $Rx", (MTSPR 1, gprc:$Rx)>;
+def : InstAlias<"mfxer $Rx", (MFSPR gprc:$Rx, 1)>;
+
+//Disable this alias on AIX for now because as does not support them.
+let Predicates = [ModernAs] in {
+
foreach BR = 0-7 in {
def : InstAlias<"mfbr"#BR#" $Rx",
(MFDCR gprc:$Rx, !add(BR, 0x80))>,
@@ -4657,15 +4663,8 @@
def : InstAlias<"mtmsrd $RS", (MTMSRD gprc:$RS, 0)>;
def : InstAlias<"mtmsr $RS", (MTMSR gprc:$RS, 0)>;
-
-def : InstAlias<"mtxer $Rx", (MTSPR 1, gprc:$Rx)>;
-def : InstAlias<"mfxer $Rx", (MFSPR gprc:$Rx, 1)>;
-
-//Disable this alias on AIX for now because as does not support them.
-let Predicates = [ModernAs] in {
def : InstAlias<"mtudscr $Rx", (MTSPR 3, gprc:$Rx)>;
def : InstAlias<"mfudscr $Rx", (MFSPR gprc:$Rx, 3)>;
-}
def : InstAlias<"mfrtcu $Rx", (MFSPR gprc:$Rx, 4)>;
def : InstAlias<"mfrtcl $Rx", (MFSPR gprc:$Rx, 5)>;
@@ -4795,6 +4794,7 @@
def : InstAlias<"mticcr $Rx", (MTSPR 1019, gprc:$Rx)>, Requires<[IsPPC4xx]>;
def : InstAlias<"mficcr $Rx", (MFSPR gprc:$Rx, 1019)>, Requires<[IsPPC4xx]>;
+}
def : InstAlias<"tlbie $RB", (TLBIE R0, gprc:$RB)>;
Index: llvm/lib/Target/PowerPC/PPCInstr64Bit.td
===================================================================
--- llvm/lib/Target/PowerPC/PPCInstr64Bit.td
+++ llvm/lib/Target/PowerPC/PPCInstr64Bit.td
@@ -989,9 +989,9 @@
//Disable this alias on AIX for now because as does not support them.
let Predicates = [ModernAs] in {
- def : InstAlias<"mtudscr $Rx", (MTSPR8 3, g8rc:$Rx)>;
- def : InstAlias<"mfudscr $Rx", (MFSPR8 g8rc:$Rx, 3)>;
-}
+
+def : InstAlias<"mtudscr $Rx", (MTSPR8 3, g8rc:$Rx)>;
+def : InstAlias<"mfudscr $Rx", (MFSPR8 g8rc:$Rx, 3)>;
def : InstAlias<"mfrtcu $Rx", (MFSPR8 g8rc:$Rx, 4)>;
def : InstAlias<"mfrtcl $Rx", (MFSPR8 g8rc:$Rx, 5)>;
@@ -1050,6 +1050,8 @@
def : InstAlias<"mfspefscr $Rx", (MFSPR8 g8rc:$Rx, 512)>;
def : InstAlias<"mtspefscr $Rx", (MTSPR8 512, g8rc:$Rx)>;
+}
+
//===----------------------------------------------------------------------===//
// Load/Store instructions.
//
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97418.328288.patch
Type: text/x-patch
Size: 3001 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210304/703d8a35/attachment.bin>
More information about the llvm-commits
mailing list