[llvm] r269962 - clean up; NFCI

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 10:23:40 PDT 2016


Author: spatel
Date: Wed May 18 12:23:38 2016
New Revision: 269962

URL: http://llvm.org/viewvc/llvm-project?rev=269962&view=rev
Log:
clean up; NFCI

Modified:
    llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp

Modified: llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp?rev=269962&r1=269961&r2=269962&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp Wed May 18 12:23:38 2016
@@ -166,15 +166,14 @@ void X86ATTInstPrinter::printOperand(con
     printRegName(O, Op.getReg());
   } else if (Op.isImm()) {
     // Print X86 immediates as signed values.
-    O << markup("<imm:") << '$' << formatImm((int64_t)Op.getImm())
-      << markup(">");
+    int64_t Imm = Op.getImm();
+    O << markup("<imm:") << '$' << formatImm(Imm) << markup(">");
 
     // If there are no instruction-specific comments, add a comment clarifying
     // the hex value of the immediate operand when it isn't in the range
     // [-256,255].
-    if (CommentStream && !HasCustomInstComment &&
-        (Op.getImm() > 255 || Op.getImm() < -256))
-      *CommentStream << format("imm = 0x%" PRIX64 "\n", (uint64_t)Op.getImm());
+    if (CommentStream && !HasCustomInstComment && (Imm > 255 || Imm < -256))
+      *CommentStream << format("imm = 0x%" PRIX64 "\n", (uint64_t)Imm);
 
   } else {
     assert(Op.isExpr() && "unknown operand kind in printOperand");




More information about the llvm-commits mailing list