]> granicus.if.org Git - llvm/commitdiff
Add aliases for mfvrsave/mtvrsave.
authorEric Christopher <echristo@gmail.com>
Thu, 9 Jun 2016 23:27:48 +0000 (23:27 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 9 Jun 2016 23:27:48 +0000 (23:27 +0000)
Update a test as we're now going to emit it for easier reading of
generated assembly as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272339 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCInstrInfo.td
test/CodeGen/PowerPC/vrsave-spill.ll
test/MC/PowerPC/ppc64-encoding-ext.s

index ad382341ed5b50dbf0213a5663552981cf55a7f2..e78a3ba580b063304b16b37e7d4ba2b338c401d7 100644 (file)
@@ -2345,6 +2345,10 @@ let isCodeGenOnly = 1 in {
                   PPC970_DGroup_First, PPC970_Unit_FXU;
 }
 
+// Aliases for mtvrsave/mfvrsave to mfspr/mtspr.
+def : InstAlias<"mtvrsave $rS", (MTVRSAVE gprc:$rS)>;
+def : InstAlias<"mfvrsave $rS", (MFVRSAVE gprc:$rS)>;
+
 // SPILL_VRSAVE - Indicate that we're dumping the VRSAVE register,
 // so we'll need to scavenge a register for it.
 let mayStore = 1 in
index c73206d8fc86c18d37d98a047c37ac9d30e3e51b..ceb787d05c9f975a5ea91248bd3e62a420be6495 100644 (file)
@@ -10,8 +10,8 @@ entry:
   br label %return
 
 ; CHECK: @foo
-; CHECK: mfspr r{{[0-9]+}}, 256
-; CHECK: mtspr 256, r{{[0-9]+}}
+; CHECK: mfvrsave r{{[0-9]+}}
+; CHECK: mtvrsave r{{[0-9]+}}
 
 return:                                           ; preds = %entry
   ret <4 x float> %d
index 682a737547d68d0cb2341d50c333427062ef1423..0b7bc927c63f7d49b56d542178c1ec7c607f83d5 100644 (file)
 # CHECK-BE: mfctr 2                         # encoding: [0x7c,0x49,0x02,0xa6]
 # CHECK-LE: mfctr 2                         # encoding: [0xa6,0x02,0x49,0x7c]
             mfctr 2
+# CHECK-BE: mfvrsave 2                      # encoding: [0x7c,0x40,0x42,0xa6]
+# CHECK-LE: mfvrsave 2                      # encoding: [0xa6,0x42,0x40,0x7c]
+            mfvrsave 2
+# CHECK-BE: mtvrsave 2                      # encoding: [0x7c,0x40,0x43,0xa6]
+# CHECK-LE: mtvrsave 2                      # encoding: [0xa6,0x43,0x40,0x7c]
+            mtvrsave 2
 
 # Miscellaneous mnemonics