summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h
diff options
context:
space:
mode:
authorIgor Kudrin <ikudrin@accesssoftek.com>2019-02-26 12:15:14 +0000
committerIgor Kudrin <ikudrin@accesssoftek.com>2019-02-26 12:15:14 +0000
commit2d3faad706c81814abc5e4080df38c4bccde1d48 (patch)
tree9a11b749881378558b3eabd238ac516e787b8b01 /llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h
parente42be1eae230d0ff3f650fcea7826da4842e7371 (diff)
downloadbcm5719-llvm-2d3faad706c81814abc5e4080df38c4bccde1d48.tar.gz
bcm5719-llvm-2d3faad706c81814abc5e4080df38c4bccde1d48.zip
[llvm-objdump] Implement -Mreg-names-raw/-std options.
The --disassembler-options, or -M, are used to customize the disassembler and affect its output. The two implemented options allow selecting register names on ARM: * With -Mreg-names-raw, the disassembler uses rNN for all registers. * With -Mreg-names-std it prints sp, lr and pc for r13, r14 and r15, which is the default behavior of llvm-objdump. Differential Revision: https://reviews.llvm.org/D57680 llvm-svn: 354870
Diffstat (limited to 'llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h')
-rw-r--r--llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h
index b226633b0ef..bddcb8af524 100644
--- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h
+++ b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h
@@ -13,6 +13,7 @@
#ifndef LLVM_LIB_TARGET_ARM_INSTPRINTER_ARMINSTPRINTER_H
#define LLVM_LIB_TARGET_ARM_INSTPRINTER_ARMINSTPRINTER_H
+#include "MCTargetDesc/ARMMCTargetDesc.h"
#include "llvm/MC/MCInstPrinter.h"
namespace llvm {
@@ -22,6 +23,8 @@ public:
ARMInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
const MCRegisterInfo &MRI);
+ bool applyTargetSpecificCLOption(StringRef Opt) override;
+
void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot,
const MCSubtargetInfo &STI) override;
void printRegName(raw_ostream &OS, unsigned RegNo) const override;
@@ -35,7 +38,8 @@ public:
unsigned PrintMethodIdx,
const MCSubtargetInfo &STI,
raw_ostream &O);
- static const char *getRegisterName(unsigned RegNo);
+ static const char *getRegisterName(unsigned RegNo,
+ unsigned AltIdx = ARM::NoRegAltName);
void printOperand(const MCInst *MI, unsigned OpNo, const MCSubtargetInfo &STI,
raw_ostream &O);
@@ -235,6 +239,9 @@ public:
template<int64_t Angle, int64_t Remainder>
void printComplexRotationOp(const MCInst *MI, unsigned OpNum,
const MCSubtargetInfo &STI, raw_ostream &O);
+
+private:
+ unsigned DefaultAltIdx = ARM::NoRegAltName;
};
} // end namespace llvm
OpenPOWER on IntegriCloud