diff options
author | Craig Topper <craig.topper@intel.com> | 2019-02-04 04:15:10 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2019-02-04 04:15:10 +0000 |
commit | 7a2944efe118e58d164c16c9d8f4d4d626a9f11d (patch) | |
tree | 3f3a5461a1142d8301fa7a153ce4266d5dca0fcf /llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp | |
parent | 145ccb0eb956702eb6aa6cb44b16a675551772d3 (diff) | |
download | bcm5719-llvm-7a2944efe118e58d164c16c9d8f4d4d626a9f11d.tar.gz bcm5719-llvm-7a2944efe118e58d164c16c9d8f4d4d626a9f11d.zip |
[X86] Print %st(0) as %st when its implicit to the instruction. Continue printing it as %st(0) when its encoded in the instruction.
This is a step back from the change I made in r352985. This appears to be more consistent with gcc and objdump behavior.
llvm-svn: 353015
Diffstat (limited to 'llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp b/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp index 0cbd2ecd99f..9015aa14768 100644 --- a/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp +++ b/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp @@ -159,3 +159,14 @@ void X86IntelInstPrinter::printU8Imm(const MCInst *MI, unsigned Op, O << formatImm(MI->getOperand(Op).getImm() & 0xff); } + +void X86IntelInstPrinter::printSTiRegOperand(const MCInst *MI, unsigned OpNo, + raw_ostream &OS) { + const MCOperand &Op = MI->getOperand(OpNo); + unsigned Reg = Op.getReg(); + // Override the default printing to print st(0) instead st. + if (Reg == X86::ST0) + OS << "st(0)"; + else + printRegName(OS, Reg); +} |