diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-11-23 21:10:49 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-11-23 21:10:49 +0000 |
commit | 4dd043f090b66b28ab621b5707c30e0641f04168 (patch) | |
tree | eebc8f5a6af2c5bd2bb8ac5ebdf0852f1dc428af /lib | |
parent | 8a0c4fd0c6a2044fbace7e176e9617c2aa89a4a0 (diff) | |
download | external_llvm-4dd043f090b66b28ab621b5707c30e0641f04168.zip external_llvm-4dd043f090b66b28ab621b5707c30e0641f04168.tar.gz external_llvm-4dd043f090b66b28ab621b5707c30e0641f04168.tar.bz2 |
Support printing ConstantAggregateZeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18172 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/Sparc/SparcAsmPrinter.cpp | 5 | ||||
-rw-r--r-- | lib/Target/SparcV8/SparcV8AsmPrinter.cpp | 5 |
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(); |