diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-11-08 14:29:57 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-11-08 14:29:57 +0000 |
commit | ffbba0f325f3f53bd890254f224ad85ef2db836f (patch) | |
tree | 61afee1bad4e8e4ed84611790aa7212d86acf646 | |
parent | e78ea6782bb35e0b7d975eb6b8d40a85550818e2 (diff) |
Bug fix: need to use .reserve for uninitialized data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1205 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/SparcV9/SparcV9AsmPrinter.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp index 6c7ebaa99c..3d35ecc91a 100644 --- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp +++ b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp @@ -438,7 +438,7 @@ SparcAsmPrinter::printConstant(const ConstPoolVal* CV, string valID) if (! CPP->isNullValue()) assert(0 && "Cannot yet print non-null pointer constants to assembly"); else - toAsm << (void*) NULL; + toAsm << (void*) NULL << endl; } else if (ConstPoolPointerRef* CPRef = dyn_cast<ConstPoolPointerRef>(CV)) { @@ -464,11 +464,10 @@ SparcAsmPrinter::printGlobalVariable(const GlobalVariable* GV) if (GV->hasInitializer()) printConstant(GV->getInitializer(), getID(GV)); else { - toAsm << "\t.align" << TypeToAlignment(GV->getType()->getValueType(), Target) - << getID(GV) << ":" << endl; - - toAsm << "\t.type" << "\t" << getID(GV) << ",#object" << endl; - toAsm << "\t.size" << "\t" << getID(GV) << "," + toAsm << "\t.align\t" + << TypeToAlignment(GV->getType()->getValueType(), Target) << endl; + toAsm << "\t.type\t" << getID(GV) << ",#object" << endl; + toAsm << "\t.reserve\t" << getID(GV) << "," << TypeToSize(GV->getType()->getValueType(), Target) << endl; } |