aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2011-06-08 11:19:08 +0000
committerJulian Brown <jules@gcc.gnu.org>2011-06-08 11:19:08 +0000
commitb1def36c41f48e3f4de7b3890d635ee083e98abe (patch)
treedf7cd2510dce64cde52d6314e894a7835b6762c8 /gcc
parent76aa78e9eb7ade737abc19cbea1bcd690170b039 (diff)
downloadgcc-b1def36c41f48e3f4de7b3890d635ee083e98abe.zip
gcc-b1def36c41f48e3f4de7b3890d635ee083e98abe.tar.gz
gcc-b1def36c41f48e3f4de7b3890d635ee083e98abe.tar.bz2
arm.c (arm_libcall_uses_aapcs_base): Use correct ABI for double-precision helper functions in hard-float mode if...
* config/arm/arm.c (arm_libcall_uses_aapcs_base): Use correct ABI for double-precision helper functions in hard-float mode if only single-precision arithmetic is supported in hardware. From-SVN: r174803
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arm/arm.c22
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 294e5d7..7ee6821 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-06-08 Julian Brown <julian@codesourcery.com>
+
+ * config/arm/arm.c (arm_libcall_uses_aapcs_base): Use correct ABI
+ for double-precision helper functions in hard-float mode if only
+ single-precision arithmetic is supported in hardware.
+
2011-06-08 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/49303
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 1037d9d..61a315e 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3345,6 +3345,28 @@ arm_libcall_uses_aapcs_base (const_rtx libcall)
convert_optab_libfunc (sfix_optab, DImode, SFmode));
add_libcall (libcall_htab,
convert_optab_libfunc (ufix_optab, DImode, SFmode));
+
+ /* Values from double-precision helper functions are returned in core
+ registers if the selected core only supports single-precision
+ arithmetic, even if we are using the hard-float ABI. The same is
+ true for single-precision helpers, but we will never be using the
+ hard-float ABI on a CPU which doesn't support single-precision
+ operations in hardware. */
+ add_libcall (libcall_htab, optab_libfunc (add_optab, DFmode));
+ add_libcall (libcall_htab, optab_libfunc (sdiv_optab, DFmode));
+ add_libcall (libcall_htab, optab_libfunc (smul_optab, DFmode));
+ add_libcall (libcall_htab, optab_libfunc (neg_optab, DFmode));
+ add_libcall (libcall_htab, optab_libfunc (sub_optab, DFmode));
+ add_libcall (libcall_htab, optab_libfunc (eq_optab, DFmode));
+ add_libcall (libcall_htab, optab_libfunc (lt_optab, DFmode));
+ add_libcall (libcall_htab, optab_libfunc (le_optab, DFmode));
+ add_libcall (libcall_htab, optab_libfunc (ge_optab, DFmode));
+ add_libcall (libcall_htab, optab_libfunc (gt_optab, DFmode));
+ add_libcall (libcall_htab, optab_libfunc (unord_optab, DFmode));
+ add_libcall (libcall_htab, convert_optab_libfunc (sext_optab, DFmode,
+ SFmode));
+ add_libcall (libcall_htab, convert_optab_libfunc (trunc_optab, SFmode,
+ DFmode));
}
return libcall && htab_find (libcall_htab, libcall) != NULL;