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/SystemZ/MCTargetDesc/SystemZInstPrinter.cpp | |
| parent | 7cc9cf2bf09f069cb2dd947ead05d0b54301fb71 (diff) | |
Notes
Diffstat (limited to 'llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinter.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinter.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinter.cpp index 91cb35dd72f2..5893b227c08c 100644 --- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinter.cpp +++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinter.cpp @@ -41,8 +41,12 @@ void SystemZInstPrinter::printAddress(unsigned Base, int64_t Disp, void SystemZInstPrinter::printOperand(const MCOperand &MO, const MCAsmInfo *MAI, raw_ostream &O) { - if (MO.isReg()) - O << '%' << getRegisterName(MO.getReg()); + if (MO.isReg()) { + if (!MO.getReg()) + O << '0'; + else + O << '%' << getRegisterName(MO.getReg()); + } else if (MO.isImm()) O << MO.getImm(); else if (MO.isExpr()) @@ -51,10 +55,10 @@ void SystemZInstPrinter::printOperand(const MCOperand &MO, const MCAsmInfo *MAI, llvm_unreachable("Invalid operand"); } -void SystemZInstPrinter::printInst(const MCInst *MI, raw_ostream &O, - StringRef Annot, - const MCSubtargetInfo &STI) { - printInstruction(MI, O); +void SystemZInstPrinter::printInst(const MCInst *MI, uint64_t Address, + StringRef Annot, const MCSubtargetInfo &STI, + raw_ostream &O) { + printInstruction(MI, Address, O); printAnnotation(O, Annot); } |
