aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/Sparc/SparcAsmPrinter.cpp5
-rw-r--r--lib/Target/SparcV8/SparcV8AsmPrinter.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp
index 30e09ee..80fc85b 100644
--- a/lib/Target/Sparc/SparcAsmPrinter.cpp
+++ b/lib/Target/Sparc/SparcAsmPrinter.cpp
@@ -270,6 +270,11 @@ void V8Printer::emitGlobalConstant(const Constant *CV) {
unsigned size = TD.getTypeSize (CV->getType ());
O << "\t.skip\t " << size << "\n";
return;
+ } else if (isa<ConstantAggregateZero> (CV)) {
+ unsigned size = TD.getTypeSize (CV->getType ());
+ for (unsigned i = 0; i < size; ++i)
+ O << "\t.byte 0\n";
+ return;
}
const Type *type = CV->getType();
diff --git a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp
index 30e09ee..80fc85b 100644
--- a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp
+++ b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp
@@ -270,6 +270,11 @@ void V8Printer::emitGlobalConstant(const Constant *CV) {
unsigned size = TD.getTypeSize (CV->getType ());
O << "\t.skip\t " << size << "\n";
return;
+ } else if (isa<ConstantAggregateZero> (CV)) {
+ unsigned size = TD.getTypeSize (CV->getType ());
+ for (unsigned i = 0; i < size; ++i)
+ O << "\t.byte 0\n";
+ return;
}
const Type *type = CV->getType();