diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp index 09d61b7b2d9..f8e52472c86 100644 --- a/lib/Target/Sparc/SparcAsmPrinter.cpp +++ b/lib/Target/Sparc/SparcAsmPrinter.cpp @@ -206,10 +206,7 @@ void V8Printer::emitConstantValueOnly(const Constant *CV) { void V8Printer::emitGlobalConstant(const Constant *CV) { const TargetData &TD = TM.getTargetData(); - if (CV->isNullValue()) { - O << "\t.zero\t " << TD.getTypeSize(CV->getType()) << "\n"; - return; - } else if (const ConstantArray *CVA = dyn_cast(CV)) { + if (const ConstantArray *CVA = dyn_cast(CV)) { if (CVA->isString()) { O << "\t.ascii\t"; printAsCString(O, CVA); @@ -240,7 +237,7 @@ void V8Printer::emitGlobalConstant(const Constant *CV) { // Insert the field padding unless it's zero bytes... if (padSize) - O << "\t.zero\t " << padSize << "\n"; + O << "\t.skip\t " << padSize << "\n"; } assert(sizeSoFar == cvsLayout->StructSize && "Layout of constant struct may be incorrect!"); diff --git a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp index 09d61b7b2d9..f8e52472c86 100644 --- a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp +++ b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp @@ -206,10 +206,7 @@ void V8Printer::emitConstantValueOnly(const Constant *CV) { void V8Printer::emitGlobalConstant(const Constant *CV) { const TargetData &TD = TM.getTargetData(); - if (CV->isNullValue()) { - O << "\t.zero\t " << TD.getTypeSize(CV->getType()) << "\n"; - return; - } else if (const ConstantArray *CVA = dyn_cast(CV)) { + if (const ConstantArray *CVA = dyn_cast(CV)) { if (CVA->isString()) { O << "\t.ascii\t"; printAsCString(O, CVA); @@ -240,7 +237,7 @@ void V8Printer::emitGlobalConstant(const Constant *CV) { // Insert the field padding unless it's zero bytes... if (padSize) - O << "\t.zero\t " << padSize << "\n"; + O << "\t.skip\t " << padSize << "\n"; } assert(sizeSoFar == cvsLayout->StructSize && "Layout of constant struct may be incorrect!");