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();
O << ".byte";
break;
case Type::UShortTyID: case Type::ShortTyID:
- O << ".word";
+ O << ".half";
break;
case Type::FloatTyID: case Type::PointerTyID:
case Type::UIntTyID: case Type::IntTyID:
- O << ".long";
+ O << ".word";
break;
case Type::DoubleTyID:
case Type::ULongTyID: case Type::LongTyID:
- O << ".quad";
+ O << ".xword";
break;
default:
assert (0 && "Can't handle printing this type of thing");
std::string CurSection;
// Print out module-level global variables here.
- for (Module::const_giterator I = M.gbegin(), E = M.gend(); I != E; ++I)
+ for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I)
if (I->hasInitializer()) { // External global require no code
O << "\n\n";
std::string name = Mang->getValueName(I);
else
SwitchSection(O, CurSection, ".data");
break;
+ case GlobalValue::GhostLinkage:
+ std::cerr << "Should not have any unmaterialized functions!\n";
+ abort();
}
O << "\t.align " << Align << "\n";