mfdcr / mtdcr support
authorJoerg Sonnenberger <joerg@bec.de>
Sat, 2 Aug 2014 20:00:26 +0000 (20:00 +0000)
committerJoerg Sonnenberger <joerg@bec.de>
Sat, 2 Aug 2014 20:00:26 +0000 (20:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214639 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCInstrInfo.td
test/MC/Disassembler/PowerPC/ppc64-encoding-ext.txt
test/MC/PowerPC/ppc64-encoding-ext.s

index 0237358a1414ef6efd68e648bf98e3fdb07929db..89c7bc4c64c7f9ca168d36d148ba94758b626b0d 100644 (file)
@@ -3123,6 +3123,11 @@ def RFCI : XForm_0<19, 51, (outs), (ins), "rfci", IIC_BrB, []>,
 def RFDI : XForm_0<19, 39, (outs), (ins), "rfdi", IIC_BrB, []>;
 def RFMCI : XForm_0<19, 38, (outs), (ins), "rfmci", IIC_BrB, []>;
 
+def MFDCR : XFXForm_1<31, 323, (outs gprc:$RT), (ins i32imm:$SPR),
+                      "mfdcr $RT, $SPR", IIC_SprMFSPR>;
+def MTDCR : XFXForm_1<31, 451, (outs), (ins gprc:$RT, i32imm:$SPR),
+                      "mtdcr $SPR, $RT", IIC_SprMTSPR>;
+
 //===----------------------------------------------------------------------===//
 // PowerPC Assembler Instruction Aliases
 //
index b55ebce81a2c39a26f99f5f9d8aced8ce9db0671..6a995d8f84f4b4f118a1a4e11f28343aa1a11da5 100644 (file)
 0x7c 0x6c 0x5a 0xec
 # CHECK: dststt 12, 11, 3
 0x7e 0x6c 0x5a 0xec
+
+# CHECK: mfdcr 3, 178
+0x7c 0x72 0x2a 0x86
+# CHECK: mtdcr 178, 3
+0x7c 0x72 0x2b 0x86
index 2e9316f848f07684d417a7f8e7e69a465575807e..7288df81eea3d77e2152d6a9dc0acc49c9273bf9 100644 (file)
 # CHECK-BE: dststt 12, 11, 3                 # encoding: [0x7e,0x6c,0x5a,0xec]
 # CHECK-LE: dststt 12, 11, 3                 # encoding: [0xec,0x5a,0x6c,0x7e]
             dststt %r12, %r11, 3
+
+# PPC 403 support
+# CHECK-BE: mfdcr 3, 178                     # encoding: [0x7c,0x72,0x2a,0x86]
+# CHECK-LE: mfdcr 3, 178                     # encoding: [0x86,0x2a,0x72,0x7c]
+            mfdcr 3,178
+# CHECK-BE: mtdcr 178, 3                     # encoding: [0x7c,0x72,0x2b,0x86]
+# CHECK-LE: mtdcr 178, 3                     # encoding: [0x86,0x2b,0x72,0x7c]
+            mtdcr 178,3