aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2005-08-31 09:16:31 -0700
committerRichard Henderson <rth@gcc.gnu.org>2005-08-31 09:16:31 -0700
commit5d3018cee7e9cea99b2b6c823ef3d8ee3c756474 (patch)
treeb37f9107a9259d4503a982b9eb005d2b2d0e84f7 /gcc
parentdc38a61086ce5044b9b78c48e7897179b819e06e (diff)
downloadgcc-5d3018cee7e9cea99b2b6c823ef3d8ee3c756474.zip
gcc-5d3018cee7e9cea99b2b6c823ef3d8ee3c756474.tar.gz
gcc-5d3018cee7e9cea99b2b6c823ef3d8ee3c756474.tar.bz2
i386.c (ix86_function_ok_for_sibcall): Fix test for fp return matching.
* config/i386/i386.c (ix86_function_ok_for_sibcall): Fix test for fp return matching. From-SVN: r103679
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c15
2 files changed, 13 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 40dcbe3..e16091f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-31 Richard Henderson <rth@redhat.com>
+
+ * config/i386/i386.c (ix86_function_ok_for_sibcall): Fix test for
+ fp return matching.
+
2005-08-31 Fariborz Jahanian <fjahanian@apple.com>
* expr.c (expand_expr_real_1): Compare size of address
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 1c4fc13..e3fd6e7 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -1907,7 +1907,6 @@ ix86_function_ok_for_sibcall (tree decl, tree exp)
{
tree func;
rtx a, b;
- bool one_void, one_reg;
/* If we are generating position-independent code, we cannot sibcall
optimize any indirect call, or a direct call to a global function,
@@ -1936,12 +1935,14 @@ ix86_function_ok_for_sibcall (tree decl, tree exp)
a = ix86_function_value (TREE_TYPE (exp), func, false);
b = ix86_function_value (TREE_TYPE (DECL_RESULT (cfun->decl)),
cfun->decl, false);
- one_void = (VOID_TYPE_P (TREE_TYPE (exp))
- || VOID_TYPE_P (TREE_TYPE (DECL_RESULT (cfun->decl))));
- one_reg = ((REG_P (a) && !STACK_REG_P (a))
- || (REG_P (b) && !STACK_REG_P (b)));
- if (!(one_void && one_reg)
- && !rtx_equal_p (a, b))
+ if (STACK_REG_P (a) || STACK_REG_P (b))
+ {
+ if (!rtx_equal_p (a, b))
+ return false;
+ }
+ else if (VOID_TYPE_P (TREE_TYPE (DECL_RESULT (cfun->decl))))
+ ;
+ else if (!rtx_equal_p (a, b))
return false;
/* If this call is indirect, we'll need to be able to use a call-clobbered