[PowerPC] Support mtspr/mfspr in the asm parser
This adds support for the generic forms of mtspr/mfspr
for the asm parser. The compiler will continue to use
the specialized patters for mtlr etc. since those are
needed to correctly describe data flow.
llvm-svn: 185532
diff --git a/llvm/test/MC/PowerPC/ppc64-encoding-ext.s b/llvm/test/MC/PowerPC/ppc64-encoding-ext.s
index d2288a5..79c8fdb 100644
--- a/llvm/test/MC/PowerPC/ppc64-encoding-ext.s
+++ b/llvm/test/MC/PowerPC/ppc64-encoding-ext.s
@@ -1953,8 +1953,10 @@
# Move to/from special purpose register mnemonics
-# FIXME: mtxer 2
-# FIXME: mfxer 2
+# CHECK: mtspr 1, 2 # encoding: [0x7c,0x41,0x03,0xa6]
+ mtxer 2
+# CHECK: mfspr 2, 1 # encoding: [0x7c,0x41,0x02,0xa6]
+ mfxer 2
# CHECK: mtlr 2 # encoding: [0x7c,0x48,0x03,0xa6]
mtlr 2
# CHECK: mflr 2 # encoding: [0x7c,0x48,0x02,0xa6]
diff --git a/llvm/test/MC/PowerPC/ppc64-encoding.s b/llvm/test/MC/PowerPC/ppc64-encoding.s
index fcf2407..fbedf43 100644
--- a/llvm/test/MC/PowerPC/ppc64-encoding.s
+++ b/llvm/test/MC/PowerPC/ppc64-encoding.s
@@ -504,8 +504,10 @@
# Move to/from system register instructions
-# FIXME: mtspr 256, 2
-# FIXME: mfspr 2, 256
+# CHECK: mtspr 600, 2 # encoding: [0x7c,0x58,0x93,0xa6]
+ mtspr 600, 2
+# CHECK: mfspr 2, 600 # encoding: [0x7c,0x58,0x92,0xa6]
+ mfspr 2, 600
# CHECK: mtcrf 16, 2 # encoding: [0x7c,0x41,0x01,0x20]
mtcrf 16, 2
# CHECK: mfcr 2 # encoding: [0x7c,0x40,0x00,0x26]