Make alignment be in bits, just like size is

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15969 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2004-08-21 20:00:36 +00:00
parent 8edcd84653
commit 98df506e71
2 changed files with 3 additions and 2 deletions

View File

@@ -133,7 +133,8 @@ void CodeGenTarget::ReadRegisterClasses() const {
CodeGenRegisterClass::CodeGenRegisterClass(Record *R) : TheDef(R) {
SpillSize = R->getValueAsInt("Size");
SpillAlignment = R->getValueAsInt("Alignment");
// FIXME: should convert to bits in all targets.
SpillAlignment = R->getValueAsInt("Alignment")*8;
if (CodeInit *CI = dynamic_cast<CodeInit*>(R->getValueInit("Methods")))
MethodDefinitions = CI->getValue();

View File

@@ -128,7 +128,7 @@ void RegisterInfoEmitter::run(std::ostream &OS) {
OS << " struct " << Name << "Class : public TargetRegisterClass {\n"
<< " " << Name << "Class() : TargetRegisterClass("
<< RC.SpillSize/8 << ", " << RC.SpillAlignment << ", " << Name << ", "
<< RC.SpillSize/8 << ", " << RC.SpillAlignment/8 << ", " << Name << ", "
<< Name << " + " << RC.Elements.size() << ") {}\n"
<< RC.MethodDefinitions << " } " << Name << "Instance;\n\n";
}