mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-10 18:26:02 +00:00
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:
@@ -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();
|
||||
|
@@ -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";
|
||||
}
|
||||
|
Reference in New Issue
Block a user