Properly handle the mftb instruction.
authorKit Barton <kbarton@ca.ibm.com>
Tue, 16 Jun 2015 16:01:15 +0000 (16:01 +0000)
committerKit Barton <kbarton@ca.ibm.com>
Tue, 16 Jun 2015 16:01:15 +0000 (16:01 +0000)
commit1b26bfbef1b63558ef4e41e32eb596b4164e42b6
tree4c43863234d654094481967d713407bd27df8339
parent69266c39908276c9ba636160d1ee9d985506ac98
Properly handle the mftb instruction.

The mftb instruction was incorrectly marked as deprecated in the PPC
Backend. Instead, it should not be treated as deprecated, but rather be
implemented using the mfspr instruction. A similar patch was put into GCC last
year. Details can be found at:

https://sourceware.org/ml/binutils/2014-11/msg00383.html.
This change will replace instances of the mftb instruction with the mfspr
instruction for all CPUs except 601 and pwr3. This will also be the default
behaviour.

Additional details can be found in:

https://llvm.org/bugs/show_bug.cgi?id=23680

Phabricator review: http://reviews.llvm.org/D10419

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239827 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
lib/Target/PowerPC/PPC.td
lib/Target/PowerPC/PPCInstrInfo.td
lib/Target/PowerPC/PPCSubtarget.cpp
lib/Target/PowerPC/PPCSubtarget.h
test/CodeGen/PowerPC/mftb.ll [new file with mode: 0644]
test/MC/PowerPC/deprecated-p7.s