From a98e0514175868cc4c6b5c31d02f36de8b973c8d Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Sat, 6 Mar 2004 03:54:13 +0000 Subject: [PATCH] Teach getRegClassForType where to find FP registers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12180 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Sparc/SparcRegisterInfo.cpp | 5 ++--- lib/Target/SparcV8/SparcV8RegisterInfo.cpp | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/Target/Sparc/SparcRegisterInfo.cpp b/lib/Target/Sparc/SparcRegisterInfo.cpp index fda45ff3cef..6817b7ec46e 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 fda45ff3cef..6817b7ec46e 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!"); -- 2.34.1