aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Sparc
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-07-08 07:22:27 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-07-08 07:22:27 +0000
commitf9a75460eee24c82a8d38e29d73ffc27cf360b05 (patch)
tree05ad690db3592180729f77b72d9d68e5383f5664 /lib/Target/Sparc
parentd85b7a48e99f0f76ddf5762111a3e0efd3615b6d (diff)
Support 'ret float'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc')
-rw-r--r--lib/Target/Sparc/InstSelectSimple.cpp3
-rw-r--r--lib/Target/Sparc/SparcV8ISelSimple.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/Sparc/InstSelectSimple.cpp b/lib/Target/Sparc/InstSelectSimple.cpp
index 5cf9131b1e..982ac86532 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 5cf9131b1e..982ac86532 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 ();