summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2015-03-27 20:37:20 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2015-03-27 20:37:20 +0000
commitbceb2a5a1cfcefd1120c1a7f42fdc0a4763021a1 (patch)
tree8f5ac6d0e469c7f8447913b3b9ca2303177af40e /llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp
parentb46d0234a6969727567cd8c8eaddd1da65d15233 (diff)
downloadbcm5719-llvm-bceb2a5a1cfcefd1120c1a7f42fdc0a4763021a1.tar.gz
bcm5719-llvm-bceb2a5a1cfcefd1120c1a7f42fdc0a4763021a1.zip
[AArch64InstPrinter] Use the feature bits of the subtarget passed to the print
method. This enables the instprinter to print a different system register name based on the feature bits of the per-function subtarget. Differential Revision: http://reviews.llvm.org/D8668 llvm-svn: 233412
Diffstat (limited to 'llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp')
-rw-r--r--llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp b/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp
index 921c7ba98a4..6694d5f51d8 100644
--- a/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp
+++ b/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp
@@ -36,10 +36,7 @@ AArch64InstPrinter::AArch64InstPrinter(const MCAsmInfo &MAI,
const MCInstrInfo &MII,
const MCRegisterInfo &MRI,
const MCSubtargetInfo &STI)
- : MCInstPrinter(MAI, MII, MRI) {
- // Initialize the set of available features.
- setAvailableFeatures(STI.getFeatureBits());
-}
+ : MCInstPrinter(MAI, MII, MRI) {}
AArch64AppleInstPrinter::AArch64AppleInstPrinter(const MCAsmInfo &MAI,
const MCInstrInfo &MII,
@@ -1305,7 +1302,7 @@ void AArch64InstPrinter::printMRSSystemRegister(const MCInst *MI, unsigned OpNo,
unsigned Val = MI->getOperand(OpNo).getImm();
auto Mapper = AArch64SysReg::MRSMapper();
- std::string Name = Mapper.toString(Val, getAvailableFeatures());
+ std::string Name = Mapper.toString(Val, STI.getFeatureBits());
O << StringRef(Name).upper();
}
@@ -1316,7 +1313,7 @@ void AArch64InstPrinter::printMSRSystemRegister(const MCInst *MI, unsigned OpNo,
unsigned Val = MI->getOperand(OpNo).getImm();
auto Mapper = AArch64SysReg::MSRMapper();
- std::string Name = Mapper.toString(Val, getAvailableFeatures());
+ std::string Name = Mapper.toString(Val, STI.getFeatureBits());
O << StringRef(Name).upper();
}
OpenPOWER on IntegriCloud