From 639b04aca30429e72d060f87d114d50c64c705b8 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 llvm-svn: 12180 --- llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp b/llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp index fda45ff3cef4..6817b7ec46ea 100644 --- a/llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp +++ b/llvm/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!");