]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/51835 (ARM EABI violation when passing arguments to helper floating...
authorBin Cheng <bin.cheng@arm.com>
Mon, 30 Jan 2012 17:22:04 +0000 (17:22 +0000)
committerJoey Ye <jye2@gcc.gnu.org>
Mon, 30 Jan 2012 17:22:04 +0000 (17:22 +0000)
2012-01-30  Bin Cheng  <bin.cheng@arm.com>

PR target/51835
* config/arm/arm.c (arm_libcall_uses_aapcs_base): Use correct ABI
for __aeabi_d2iz/__aeabi_d2uiz with hard-float.

testcases:
PR target/51835
* gcc.target/arm/pr51835.c: New testcase.

From-SVN: r183734

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/pr51835.c [new file with mode: 0644]

index f0dafc3b3dd7de30a2c4ef577073ea6e2f9fedb9..08602c58d8c77691bf637e73ed08b8a7e64318fe 100644 (file)
@@ -1,3 +1,12 @@
+2012-01-30  Bin Cheng  <bin.cheng@arm.com>
+
+       Backport from mainline.
+       2012-01-30  Bin Cheng  <bin.cheng@arm.com>
+
+       PR target/51835
+       * config/arm/arm.c (arm_libcall_uses_aapcs_base): Use correct ABI
+       for __aeabi_d2iz/__aeabi_d2uiz with hard-float.
+
 2012-01-30  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
 
        Backport from mainline.
index 9058c31de44dae06ad4745a7adca1914af5c22a0..54b7603f3fc08e9e35eae31452f08e4e5a2a756d 100644 (file)
@@ -3569,6 +3569,10 @@ arm_libcall_uses_aapcs_base (const_rtx libcall)
                   convert_optab_libfunc (sext_optab, SFmode, HFmode));
       add_libcall (libcall_htab,
                   convert_optab_libfunc (trunc_optab, HFmode, SFmode));
+      add_libcall (libcall_htab,
+                  convert_optab_libfunc (sfix_optab, SImode, DFmode));
+      add_libcall (libcall_htab,
+                  convert_optab_libfunc (ufix_optab, SImode, DFmode));
       add_libcall (libcall_htab,
                   convert_optab_libfunc (sfix_optab, DImode, DFmode));
       add_libcall (libcall_htab,
index 82c0a6bd110ed854afc9a0499e6a52d4d8327276..ae16f720eb7bbd7ae8d2e9a7a8b790e33c72b311 100644 (file)
@@ -1,3 +1,11 @@
+2012-01-30  Bin Cheng  <bin.cheng@arm.com>
+
+       Backport from mainline.
+       2012-01-30  Bin Cheng  <bin.cheng@arm.com>
+
+       PR target/51835
+       * gcc.target/arm/pr51835.c: New testcase.
+
 2012-01-28  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/52022
diff --git a/gcc/testsuite/gcc.target/arm/pr51835.c b/gcc/testsuite/gcc.target/arm/pr51835.c
new file mode 100644 (file)
index 0000000..858b72f
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mfloat-abi=hard -mfpu=fpv4-sp-d16" }  */
+/* { dg-require-effective-target arm_thumb2_ok } */
+
+int func1 (double d)
+{
+  return (int)d;
+}
+unsigned int func2 (double d)
+{
+  return (unsigned int)d;
+}
+
+/* { dg-final { scan-assembler-times "fmrrd\[\\t \]+r0,\[\\t \]*r1,\[\\t \]*d0" 2 } } */