[llvm] r215110 - Add mfasr and mtasr
Joerg Sonnenberger
joerg at bec.de
Thu Aug 7 06:35:34 PDT 2014
Author: joerg
Date: Thu Aug 7 08:35:34 2014
New Revision: 215110
URL: http://llvm.org/viewvc/llvm-project?rev=215110&view=rev
Log:
Add mfasr and mtasr
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=215110&r1=215109&r2=215110&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Thu Aug 7 08:35:34 2014
@@ -3360,6 +3360,9 @@ def : InstAlias<"subc. $rA, $rB, $rC", (
def : InstAlias<"mtmsrd $RS", (MTMSRD gprc:$RS, 0)>;
def : InstAlias<"mtmsr $RS", (MTMSR gprc:$RS, 0)>;
+def : InstAlias<"mfasr $RT", (MFSPR gprc:$RT, 280)>;
+def : InstAlias<"mtasr $RT", (MTSPR 280, gprc:$RT)>;
+
foreach SPRG = 0-3 in {
def : InstAlias<"mfsprg $RT, "#SPRG, (MFSPR gprc:$RT, !add(SPRG, 272))>;
def : InstAlias<"mfsprg"#SPRG#" $RT", (MFSPR gprc:$RT, !add(SPRG, 272))>;
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=215110&r1=215109&r2=215110&view=diff
==============================================================================
--- llvm/trunk/test/MC/PowerPC/ppc64-encoding-ext.s (original)
+++ llvm/trunk/test/MC/PowerPC/ppc64-encoding-ext.s Thu Aug 7 08:35:34 2014
@@ -3626,3 +3626,10 @@
# CHECK-BE: rfid # encoding: [0x4c,0x00,0x00,0x24]
# CHECK-LE: rfid # encoding: [0x24,0x00,0x00,0x4c]
rfid
+
+# CHECK-BE: mfspr 2, 280 # encoding: [0x7c,0x58,0x42,0xa6]
+# CHECK-LE: mfspr 2, 280 # encoding: [0xa6,0x42,0x58,0x7c]
+ mfasr 2
+# CHECK-BE: mtspr 280, 2 # encoding: [0x7c,0x58,0x43,0xa6]
+# CHECK-LE: mtspr 280, 2 # encoding: [0xa6,0x43,0x58,0x7c]
+ mtasr 2
More information about the llvm-commits
mailing list