aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-03-06 03:54:13 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-03-06 03:54:13 +0000
commita98e0514175868cc4c6b5c31d02f36de8b973c8d (patch)
treec2def7f763f93ba38f9733393da45a1e7d1881b7
parentdeb8712b49bde50cd56e14c0f202bf86306a54b9 (diff)
Teach getRegClassForType where to find FP registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12180 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/Sparc/SparcRegisterInfo.cpp5
-rw-r--r--lib/Target/SparcV8/SparcV8RegisterInfo.cpp5
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/Target/Sparc/SparcRegisterInfo.cpp b/lib/Target/Sparc/SparcRegisterInfo.cpp
index fda45ff3ce..6817b7ec46 100644
--- a/lib/Target/Sparc/SparcRegisterInfo.cpp
+++ b/lib/Target/Sparc/SparcRegisterInfo.cpp
@@ -88,9 +88,8 @@ void SparcV8RegisterInfo::emitEpilogue(MachineFunction &MF,
const TargetRegisterClass*
SparcV8RegisterInfo::getRegClassForType(const Type* Ty) const {
switch (Ty->getPrimitiveID()) {
- case Type::FloatTyID:
- case Type::DoubleTyID:
- assert(0 && "Floating point registers not supported yet!");
+ case Type::FloatTyID: return &FPRegsInstance;
+ case Type::DoubleTyID: return &DFPRegsInstance;
case Type::LongTyID:
case Type::ULongTyID: assert(0 && "Long values can't fit in registers!");
default: assert(0 && "Invalid type to getClass!");
diff --git a/lib/Target/SparcV8/SparcV8RegisterInfo.cpp b/lib/Target/SparcV8/SparcV8RegisterInfo.cpp
index fda45ff3ce..6817b7ec46 100644
--- a/lib/Target/SparcV8/SparcV8RegisterInfo.cpp
+++ b/lib/Target/SparcV8/SparcV8RegisterInfo.cpp
@@ -88,9 +88,8 @@ void SparcV8RegisterInfo::emitEpilogue(MachineFunction &MF,
const TargetRegisterClass*
SparcV8RegisterInfo::getRegClassForType(const Type* Ty) const {
switch (Ty->getPrimitiveID()) {
- case Type::FloatTyID:
- case Type::DoubleTyID:
- assert(0 && "Floating point registers not supported yet!");
+ case Type::FloatTyID: return &FPRegsInstance;
+ case Type::DoubleTyID: return &DFPRegsInstance;
case Type::LongTyID:
case Type::ULongTyID: assert(0 && "Long values can't fit in registers!");
default: assert(0 && "Invalid type to getClass!");