mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
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
This commit is contained in:
parent
e78ea6782b
commit
ffbba0f325
@ -438,7 +438,7 @@ SparcAsmPrinter::printConstant(const ConstPoolVal* CV, string valID)
|
|||||||
if (! CPP->isNullValue())
|
if (! CPP->isNullValue())
|
||||||
assert(0 && "Cannot yet print non-null pointer constants to assembly");
|
assert(0 && "Cannot yet print non-null pointer constants to assembly");
|
||||||
else
|
else
|
||||||
toAsm << (void*) NULL;
|
toAsm << (void*) NULL << endl;
|
||||||
}
|
}
|
||||||
else if (ConstPoolPointerRef* CPRef = dyn_cast<ConstPoolPointerRef>(CV))
|
else if (ConstPoolPointerRef* CPRef = dyn_cast<ConstPoolPointerRef>(CV))
|
||||||
{
|
{
|
||||||
@ -464,11 +464,10 @@ SparcAsmPrinter::printGlobalVariable(const GlobalVariable* GV)
|
|||||||
if (GV->hasInitializer())
|
if (GV->hasInitializer())
|
||||||
printConstant(GV->getInitializer(), getID(GV));
|
printConstant(GV->getInitializer(), getID(GV));
|
||||||
else {
|
else {
|
||||||
toAsm << "\t.align" << TypeToAlignment(GV->getType()->getValueType(), Target)
|
toAsm << "\t.align\t"
|
||||||
<< getID(GV) << ":" << endl;
|
<< TypeToAlignment(GV->getType()->getValueType(), Target) << endl;
|
||||||
|
toAsm << "\t.type\t" << getID(GV) << ",#object" << endl;
|
||||||
toAsm << "\t.type" << "\t" << getID(GV) << ",#object" << endl;
|
toAsm << "\t.reserve\t" << getID(GV) << ","
|
||||||
toAsm << "\t.size" << "\t" << getID(GV) << ","
|
|
||||||
<< TypeToSize(GV->getType()->getValueType(), Target)
|
<< TypeToSize(GV->getType()->getValueType(), Target)
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user