mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
Just print integer constants as signed values. The actual signedness
doesn't matter as it is determined in the way the constant is used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32733 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d377350718
commit
246dd65a13
@ -392,13 +392,7 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
|
|||||||
assert(CB->getValue());
|
assert(CB->getValue());
|
||||||
O << "1";
|
O << "1";
|
||||||
} else if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
|
} else if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
|
||||||
if (CI->getType()->isSigned()) {
|
O << CI->getSExtValue();
|
||||||
if (((CI->getSExtValue() << 32) >> 32) == CI->getSExtValue())
|
|
||||||
O << CI->getSExtValue();
|
|
||||||
else
|
|
||||||
O << (uint64_t)CI->getSExtValue();
|
|
||||||
} else
|
|
||||||
O << CI->getZExtValue();
|
|
||||||
} else if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV)) {
|
} else if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV)) {
|
||||||
// This is a constant address for a global variable or function. Use the
|
// This is a constant address for a global variable or function. Use the
|
||||||
// name of the variable or function as the address value, possibly
|
// name of the variable or function as the address value, possibly
|
||||||
|
Loading…
x
Reference in New Issue
Block a user