.zero doesn't work in the Solaris assembler.
authorBrian Gaeke <gaeke@uiuc.edu>
Fri, 18 Jun 2004 08:59:16 +0000 (08:59 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Fri, 18 Jun 2004 08:59:16 +0000 (08:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14231 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/SparcAsmPrinter.cpp
lib/Target/SparcV8/SparcV8AsmPrinter.cpp

index 09d61b7b2d9951b5c6b2a86fa4fe5b38c2049c03..f8e52472c8637330673384990b17ec7841ae6a00 100644 (file)
@@ -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<ConstantArray>(CV)) {
+  if (const ConstantArray *CVA = dyn_cast<ConstantArray>(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!");
index 09d61b7b2d9951b5c6b2a86fa4fe5b38c2049c03..f8e52472c8637330673384990b17ec7841ae6a00 100644 (file)
@@ -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<ConstantArray>(CV)) {
+  if (const ConstantArray *CVA = dyn_cast<ConstantArray>(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!");