diff options
author | Eric Christopher <echristo@gmail.com> | 2016-06-09 23:27:48 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2016-06-09 23:27:48 +0000 |
commit | 7da58e63139833b59ba0e186d360a1ffe357478d (patch) | |
tree | d7cddcf54691e6b7d19ae008fddcaf3cf8802003 | |
parent | b8aff5533e1e770f2135705945f0fc41f01f872b (diff) |
Add aliases for mfvrsave/mtvrsave.
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
-rw-r--r-- | lib/Target/PowerPC/PPCInstrInfo.td | 4 | ||||
-rw-r--r-- | test/CodeGen/PowerPC/vrsave-spill.ll | 4 | ||||
-rw-r--r-- | test/MC/PowerPC/ppc64-encoding-ext.s | 6 |
3 files changed, 12 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index ad382341ed5..e78a3ba580b 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -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 diff --git a/test/CodeGen/PowerPC/vrsave-spill.ll b/test/CodeGen/PowerPC/vrsave-spill.ll index c73206d8fc8..ceb787d05c9 100644 --- a/test/CodeGen/PowerPC/vrsave-spill.ll +++ b/test/CodeGen/PowerPC/vrsave-spill.ll @@ -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 diff --git a/test/MC/PowerPC/ppc64-encoding-ext.s b/test/MC/PowerPC/ppc64-encoding-ext.s index 682a737547d..0b7bc927c63 100644 --- a/test/MC/PowerPC/ppc64-encoding-ext.s +++ b/test/MC/PowerPC/ppc64-encoding-ext.s @@ -3497,6 +3497,12 @@ # 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 |