diff --git a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp index 1c0d1c000ad..8000a014fc9 100644 --- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp +++ b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp @@ -323,7 +323,9 @@ void AsmPrinter::printSingleConstantValue(const Constant* CV) { O << ConstantExprToString(CE, TM) << "\n"; } else if (CV->getType()->isPrimitiveType()) { // Check primitive types last - if (CV->getType()->isFloatingPoint()) { + if (isa(CV)) { + O << "0\n"; + } else if (CV->getType()->isFloatingPoint()) { // FP Constants are printed as integer constants to avoid losing // precision... double Val = cast(CV)->getValue(); @@ -385,7 +387,7 @@ void AsmPrinter::printConstantValueOnly(const Constant* CV, } assert(sizeSoFar == cvsLayout->StructSize && "Layout of constant struct may be incorrect!"); - } else if (isa(CV)) { + } else if (isa(CV) || isa(CV)) { PrintZeroBytesToPad(TM.getTargetData().getTypeSize(CV->getType())); } else printSingleConstantValue(CV);