diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
| commit | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (patch) | |
| tree | 4adf86a776049cbf7f69a1929c4babcbbef925eb /llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp | |
| parent | 7cc9cf2bf09f069cb2dd947ead05d0b54301fb71 (diff) | |
Notes
Diffstat (limited to 'llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp index 1a16468484ad..469892213ef8 100644 --- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp +++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp @@ -56,9 +56,9 @@ void AArch64InstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const { OS << getRegisterName(RegNo); } -void AArch64InstPrinter::printInst(const MCInst *MI, raw_ostream &O, - StringRef Annot, - const MCSubtargetInfo &STI) { +void AArch64InstPrinter::printInst(const MCInst *MI, uint64_t Address, + StringRef Annot, const MCSubtargetInfo &STI, + raw_ostream &O) { // Check for special encodings and print the canonical alias instead. unsigned Opcode = MI->getOpcode(); @@ -282,6 +282,12 @@ void AArch64InstPrinter::printInst(const MCInst *MI, raw_ostream &O, return; } + if (Opcode == AArch64::SPACE) { + O << '\t' << MAI.getCommentString() << " SPACE"; + printAnnotation(O, Annot); + return; + } + // Instruction TSB is specified as a one operand instruction, but 'csync' is // not encoded, so for printing it is treated as a special case here: if (Opcode == AArch64::TSB) { @@ -290,7 +296,7 @@ void AArch64InstPrinter::printInst(const MCInst *MI, raw_ostream &O, } if (!printAliasInstr(MI, STI, O)) - printInstruction(MI, STI, O); + printInstruction(MI, Address, STI, O); printAnnotation(O, Annot); @@ -698,9 +704,10 @@ static const LdStNInstrDesc *getLdStNInstrDesc(unsigned Opcode) { return nullptr; } -void AArch64AppleInstPrinter::printInst(const MCInst *MI, raw_ostream &O, +void AArch64AppleInstPrinter::printInst(const MCInst *MI, uint64_t Address, StringRef Annot, - const MCSubtargetInfo &STI) { + const MCSubtargetInfo &STI, + raw_ostream &O) { unsigned Opcode = MI->getOpcode(); StringRef Layout; @@ -748,7 +755,7 @@ void AArch64AppleInstPrinter::printInst(const MCInst *MI, raw_ostream &O, return; } - AArch64InstPrinter::printInst(MI, O, Annot, STI); + AArch64InstPrinter::printInst(MI, Address, Annot, STI, O); } bool AArch64InstPrinter::printSysAlias(const MCInst *MI, |
