This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
__sdivsi3_i4i and __udivsi3_i4i called for sh2 variant.
- From: Yoshinori Sato <yo-satoh at sios dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: ysato at users dot sourceforge dot jp
- Date: Mon, 04 Mar 2013 15:55:43 +0900
- Subject: __sdivsi3_i4i and __udivsi3_i4i called for sh2 variant.
It function called to divide operator.
But libgcc.a is not include it helper functions.
This patch is included those functions.
diff -ru gcc-4.7.2.org/gcc/config.gcc gcc-4.7.2/gcc/config.gcc
--- gcc-4.7.2.org/gcc/config.gcc 2012-09-12 18:03:54.000000000 +0900
+++ gcc-4.7.2/gcc/config.gcc 2013-03-03 03:12:41.000000000 +0900
@@ -2338,7 +2338,7 @@
sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
- sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
+ sh*-*-linux*) sh_multilibs=m1,m2,m3e,m4 ;;
sh*-*-netbsd*) sh_multilibs=m3,m3e,m4 ;;
*) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
esac
diff -ru gcc-4.7.2.org/libgcc/config/sh/lib1funcs.S gcc-4.7.2/libgcc/config/sh/lib1funcs.S
--- gcc-4.7.2.org/libgcc/config/sh/lib1funcs.S 2011-11-03 00:03:19.000000000 +0900
+++ gcc-4.7.2/libgcc/config/sh/lib1funcs.S 2013-03-03 03:29:32.000000000 +0900
@@ -3255,8 +3255,8 @@
.word 17136
.word 16639
-#elif defined (__SH3__) || defined (__SH3E__) || defined (__SH4__) || defined (__SH4_SINGLE__) || defined (__SH4_SINGLE_ONLY__) || defined (__SH4_NOFPU__)
-/* This code used shld, thus is not suitable for SH1 / SH2. */
+#elif defined (__sh2__) || defined (__SH3__) || defined (__SH3E__) || defined (__SH4__) || defined (__SH4_SINGLE__) || defined (__SH4_SINGLE_ONLY__) || defined (__SH4_NOFPU__)
+/* This code used shld, thus is not suitable for SH1. */
/* Signed / unsigned division without use of FPU, optimized for SH4.
Uses a lookup table for divisors in the range -128 .. +128, and