From: Brian Gaeke Date: Thu, 8 Jul 2004 07:22:27 +0000 (+0000) Subject: Support 'ret float' X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f9a75460eee24c82a8d38e29d73ffc27cf360b05;p=oota-llvm.git Support 'ret float' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14681 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Sparc/InstSelectSimple.cpp b/lib/Target/Sparc/InstSelectSimple.cpp index 5cf9131b1ef..982ac865325 100644 --- a/lib/Target/Sparc/InstSelectSimple.cpp +++ b/lib/Target/Sparc/InstSelectSimple.cpp @@ -702,6 +702,9 @@ void V8ISel::visitReturnInst(ReturnInst &I) { // Schlep it over into i0 (where it will become o0 after restore). BuildMI (BB, V8::ORrr, 2, V8::I0).addReg(V8::G0).addReg(RetValReg); break; + case cFloat: + BuildMI (BB, V8::FMOVS, 2, V8::F0).addReg(RetValReg); + break; default: std::cerr << "Return instruction of this type not handled: " << I; abort (); diff --git a/lib/Target/Sparc/SparcV8ISelSimple.cpp b/lib/Target/Sparc/SparcV8ISelSimple.cpp index 5cf9131b1ef..982ac865325 100644 --- a/lib/Target/Sparc/SparcV8ISelSimple.cpp +++ b/lib/Target/Sparc/SparcV8ISelSimple.cpp @@ -702,6 +702,9 @@ void V8ISel::visitReturnInst(ReturnInst &I) { // Schlep it over into i0 (where it will become o0 after restore). BuildMI (BB, V8::ORrr, 2, V8::I0).addReg(V8::G0).addReg(RetValReg); break; + case cFloat: + BuildMI (BB, V8::FMOVS, 2, V8::F0).addReg(RetValReg); + break; default: std::cerr << "Return instruction of this type not handled: " << I; abort (); diff --git a/lib/Target/SparcV8/InstSelectSimple.cpp b/lib/Target/SparcV8/InstSelectSimple.cpp index 5cf9131b1ef..982ac865325 100644 --- a/lib/Target/SparcV8/InstSelectSimple.cpp +++ b/lib/Target/SparcV8/InstSelectSimple.cpp @@ -702,6 +702,9 @@ void V8ISel::visitReturnInst(ReturnInst &I) { // Schlep it over into i0 (where it will become o0 after restore). BuildMI (BB, V8::ORrr, 2, V8::I0).addReg(V8::G0).addReg(RetValReg); break; + case cFloat: + BuildMI (BB, V8::FMOVS, 2, V8::F0).addReg(RetValReg); + break; default: std::cerr << "Return instruction of this type not handled: " << I; abort (); diff --git a/lib/Target/SparcV8/SparcV8ISelSimple.cpp b/lib/Target/SparcV8/SparcV8ISelSimple.cpp index 5cf9131b1ef..982ac865325 100644 --- a/lib/Target/SparcV8/SparcV8ISelSimple.cpp +++ b/lib/Target/SparcV8/SparcV8ISelSimple.cpp @@ -702,6 +702,9 @@ void V8ISel::visitReturnInst(ReturnInst &I) { // Schlep it over into i0 (where it will become o0 after restore). BuildMI (BB, V8::ORrr, 2, V8::I0).addReg(V8::G0).addReg(RetValReg); break; + case cFloat: + BuildMI (BB, V8::FMOVS, 2, V8::F0).addReg(RetValReg); + break; default: std::cerr << "Return instruction of this type not handled: " << I; abort ();