summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-21 20:00:36 +0000
committerChris Lattner <sabre@nondot.org>2004-08-21 20:00:36 +0000
commit98df506e712d51bf74ae526e2b6304bef9025a7e (patch)
treef98649fdc503cffd0d7c3b6ada9ed070f8d6359c /utils
parent8edcd8465361f3aa29082e1b1f2a1c88afc0836a (diff)
downloadexternal_llvm-98df506e712d51bf74ae526e2b6304bef9025a7e.zip
external_llvm-98df506e712d51bf74ae526e2b6304bef9025a7e.tar.gz
external_llvm-98df506e712d51bf74ae526e2b6304bef9025a7e.tar.bz2
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
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp3
-rw-r--r--utils/TableGen/RegisterInfoEmitter.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index 49fd772..b9c7f51 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -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();
diff --git a/utils/TableGen/RegisterInfoEmitter.cpp b/utils/TableGen/RegisterInfoEmitter.cpp
index 682404e..ef79c35 100644
--- a/utils/TableGen/RegisterInfoEmitter.cpp
+++ b/utils/TableGen/RegisterInfoEmitter.cpp
@@ -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";
}