[llvm] r214196 - Add a number of aliases for SPR access.
Joerg Sonnenberger
joerg at bec.de
Tue Jul 29 11:55:43 PDT 2014
Author: joerg
Date: Tue Jul 29 13:55:43 2014
New Revision: 214196
URL: http://llvm.org/viewvc/llvm-project?rev=214196&view=rev
Log:
Add a number of aliases for SPR access.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td
llvm/trunk/test/MC/PowerPC/ppc64-encoding-ext.s
Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?rev=214196&r1=214195&r2=214196&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Tue Jul 29 13:55:43 2014
@@ -3107,6 +3107,33 @@ def : InstAlias<"crnot $bx, $by", (CRNOR
def : InstAlias<"mtxer $Rx", (MTSPR 1, gprc:$Rx)>;
def : InstAlias<"mfxer $Rx", (MFSPR gprc:$Rx, 1)>;
+def : InstAlias<"mtdscr $Rx", (MTSPR 17, gprc:$Rx)>;
+def : InstAlias<"mfdscr $Rx", (MFSPR gprc:$Rx, 17)>;
+
+def : InstAlias<"mtdsir $Rx", (MTSPR 18, gprc:$Rx)>;
+def : InstAlias<"mfdsir $Rx", (MFSPR gprc:$Rx, 18)>;
+
+def : InstAlias<"mtdar $Rx", (MTSPR 19, gprc:$Rx)>;
+def : InstAlias<"mfdar $Rx", (MFSPR gprc:$Rx, 19)>;
+
+def : InstAlias<"mtdec $Rx", (MTSPR 22, gprc:$Rx)>;
+def : InstAlias<"mfdec $Rx", (MFSPR gprc:$Rx, 22)>;
+
+def : InstAlias<"mtsdr1 $Rx", (MTSPR 25, gprc:$Rx)>;
+def : InstAlias<"mfsdr1 $Rx", (MFSPR gprc:$Rx, 25)>;
+
+def : InstAlias<"mtsrr0 $Rx", (MTSPR 26, gprc:$Rx)>;
+def : InstAlias<"mfsrr0 $Rx", (MFSPR gprc:$Rx, 26)>;
+
+def : InstAlias<"mtsrr1 $Rx", (MTSPR 27, gprc:$Rx)>;
+def : InstAlias<"mfsrr1 $Rx", (MFSPR gprc:$Rx, 27)>;
+
+def : InstAlias<"mtcfar $Rx", (MTSPR 28, gprc:$Rx)>;
+def : InstAlias<"mfcfar $Rx", (MFSPR gprc:$Rx, 28)>;
+
+def : InstAlias<"mtamr $Rx", (MTSPR 29, gprc:$Rx)>;
+def : InstAlias<"mfamr $Rx", (MFSPR gprc:$Rx, 29)>;
+
def : InstAlias<"mftb $Rx", (MFTB gprc:$Rx, 268)>;
def : InstAlias<"mftbu $Rx", (MFTB gprc:$Rx, 269)>;
Modified: llvm/trunk/test/MC/PowerPC/ppc64-encoding-ext.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/PowerPC/ppc64-encoding-ext.s?rev=214196&r1=214195&r2=214196&view=diff
==============================================================================
--- llvm/trunk/test/MC/PowerPC/ppc64-encoding-ext.s (original)
+++ llvm/trunk/test/MC/PowerPC/ppc64-encoding-ext.s Tue Jul 29 13:55:43 2014
@@ -3419,6 +3419,60 @@
# CHECK-BE: mfspr 2, 1 # encoding: [0x7c,0x41,0x02,0xa6]
# CHECK-LE: mfspr 2, 1 # encoding: [0xa6,0x02,0x41,0x7c]
mfxer 2
+# CHECK-BE: mtspr 17, 2 # encoding: [0x7c,0x51,0x03,0xa6]
+# CHECK-LE: mtspr 17, 2 # encoding: [0xa6,0x03,0x51,0x7c]
+ mtdscr 2
+# CHECK-BE: mfspr 2, 17 # encoding: [0x7c,0x51,0x02,0xa6]
+# CHECK-LE: mfspr 2, 17 # encoding: [0xa6,0x02,0x51,0x7c]
+ mfdscr 2
+# CHECK-BE: mtspr 18, 2 # encoding: [0x7c,0x52,0x03,0xa6]
+# CHECK-LE: mtspr 18, 2 # encoding: [0xa6,0x03,0x52,0x7c]
+ mtdsir 2
+# CHECK-BE: mfspr 2, 18 # encoding: [0x7c,0x52,0x02,0xa6]
+# CHECK-LE: mfspr 2, 18 # encoding: [0xa6,0x02,0x52,0x7c]
+ mfdsir 2
+# CHECK-BE: mtspr 19, 2 # encoding: [0x7c,0x53,0x03,0xa6]
+# CHECK-LE: mtspr 19, 2 # encoding: [0xa6,0x03,0x53,0x7c]
+ mtdar 2
+# CHECK-BE: mfspr 2, 19 # encoding: [0x7c,0x53,0x02,0xa6]
+# CHECK-LE: mfspr 2, 19 # encoding: [0xa6,0x02,0x53,0x7c]
+ mfdar 2
+# CHECK-BE: mtspr 22, 2 # encoding: [0x7c,0x56,0x03,0xa6]
+# CHECK-LE: mtspr 22, 2 # encoding: [0xa6,0x03,0x56,0x7c]
+ mtdec 2
+# CHECK-BE: mfspr 2, 22 # encoding: [0x7c,0x56,0x02,0xa6]
+# CHECK-LE: mfspr 2, 22 # encoding: [0xa6,0x02,0x56,0x7c]
+ mfdec 2
+# CHECK-BE: mtspr 25, 2 # encoding: [0x7c,0x59,0x03,0xa6]
+# CHECK-LE: mtspr 25, 2 # encoding: [0xa6,0x03,0x59,0x7c]
+ mtsdr1 2
+# CHECK-BE: mfspr 2, 25 # encoding: [0x7c,0x59,0x02,0xa6]
+# CHECK-LE: mfspr 2, 25 # encoding: [0xa6,0x02,0x59,0x7c]
+ mfsdr1 2
+# CHECK-BE: mtspr 26, 2 # encoding: [0x7c,0x5a,0x03,0xa6]
+# CHECK-LE: mtspr 26, 2 # encoding: [0xa6,0x03,0x5a,0x7c]
+ mtsrr0 2
+# CHECK-BE: mfspr 2, 26 # encoding: [0x7c,0x5a,0x02,0xa6]
+# CHECK-LE: mfspr 2, 26 # encoding: [0xa6,0x02,0x5a,0x7c]
+ mfsrr0 2
+# CHECK-BE: mtspr 27, 2 # encoding: [0x7c,0x5b,0x03,0xa6]
+# CHECK-LE: mtspr 27, 2 # encoding: [0xa6,0x03,0x5b,0x7c]
+ mtsrr1 2
+# CHECK-BE: mfspr 2, 27 # encoding: [0x7c,0x5b,0x02,0xa6]
+# CHECK-LE: mfspr 2, 27 # encoding: [0xa6,0x02,0x5b,0x7c]
+ mfsrr1 2
+# CHECK-BE: mtspr 28, 2 # encoding: [0x7c,0x5c,0x03,0xa6]
+# CHECK-LE: mtspr 28, 2 # encoding: [0xa6,0x03,0x5c,0x7c]
+ mtcfar 2
+# CHECK-BE: mfspr 2, 28 # encoding: [0x7c,0x5c,0x02,0xa6]
+# CHECK-LE: mfspr 2, 28 # encoding: [0xa6,0x02,0x5c,0x7c]
+ mfcfar 2
+# CHECK-BE: mtspr 29, 2 # encoding: [0x7c,0x5d,0x03,0xa6]
+# CHECK-LE: mtspr 29, 2 # encoding: [0xa6,0x03,0x5d,0x7c]
+ mtamr 2
+# CHECK-BE: mfspr 2, 29 # encoding: [0x7c,0x5d,0x02,0xa6]
+# CHECK-LE: mfspr 2, 29 # encoding: [0xa6,0x02,0x5d,0x7c]
+ mfamr 2
# CHECK-BE: mtlr 2 # encoding: [0x7c,0x48,0x03,0xa6]
# CHECK-LE: mtlr 2 # encoding: [0xa6,0x03,0x48,0x7c]
mtlr 2
More information about the llvm-commits
mailing list