diff options
author | Daniel Malea <daniel.malea@intel.com> | 2013-08-01 21:18:16 +0000 |
---|---|---|
committer | Daniel Malea <daniel.malea@intel.com> | 2013-08-01 21:18:16 +0000 |
commit | a3d4245a72ac73a7b059ca8ef1bc01c25f860b6f (patch) | |
tree | ac83f96c200195aa4890788e0e66b1a18e52761c /llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp | |
parent | 83f879ddb240ef09e5dc5dd14d2918b0ba5ad55b (diff) | |
download | bcm5719-llvm-a3d4245a72ac73a7b059ca8ef1bc01c25f860b6f.tar.gz bcm5719-llvm-a3d4245a72ac73a7b059ca8ef1bc01c25f860b6f.zip |
Fixed the Intel-syntax X86 disassembler to respect the (existing) option for hexadecimal immediates, to match AT&T syntax. This also brings a new option for C-vs-MASM-style hex.
Patch by Richard Mitton
Reviewed: http://llvm-reviews.chandlerc.com/D1243
llvm-svn: 187614
Diffstat (limited to 'llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp b/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp index 2c71255b363..b9d008209e5 100644 --- a/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp +++ b/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp @@ -139,8 +139,7 @@ void X86ATTInstPrinter::printPCRelImm(const MCInst *MI, unsigned OpNo, const MCConstantExpr *BranchTarget = dyn_cast<MCConstantExpr>(Op.getExpr()); int64_t Address; if (BranchTarget && BranchTarget->EvaluateAsAbsolute(Address)) { - O << "0x"; - O.write_hex(Address); + O << formatHex((uint64_t)Address); } else { // Otherwise, just print the expression. |