[llvm-commits] CVS: llvm/lib/Target/X86/Printer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Feb 22 21:30:05 PST 2004
Changes in directory llvm/lib/Target/X86:
Printer.cpp updated: 1.85 -> 1.86
---
Log message:
Work around a gas bug. Print '-9223372036854775808' as unsigned.
---
Diffs of the changes: (+4 -1)
Index: llvm/lib/Target/X86/Printer.cpp
diff -u llvm/lib/Target/X86/Printer.cpp:1.85 llvm/lib/Target/X86/Printer.cpp:1.86
--- llvm/lib/Target/X86/Printer.cpp:1.85 Tue Feb 17 01:40:44 2004
+++ llvm/lib/Target/X86/Printer.cpp Sun Feb 22 21:27:05 2004
@@ -144,7 +144,10 @@
assert(CB == ConstantBool::True);
O << "1";
} else if (const ConstantSInt *CI = dyn_cast<ConstantSInt>(CV))
- O << CI->getValue();
+ if (((CI->getValue() << 32) >> 32) == CI->getValue())
+ O << CI->getValue();
+ else
+ O << (unsigned long long)CI->getValue();
else if (const ConstantUInt *CI = dyn_cast<ConstantUInt>(CV))
O << CI->getValue();
else if (const ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(CV))
More information about the llvm-commits
mailing list