aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2011-11-12 09:17:45 -0800
committerRichard Henderson <rth@gcc.gnu.org>2011-11-12 09:17:45 -0800
commitdab37c689ea85e9beb7d60fe4898deab048d00d2 (patch)
treefeaf6a54d75aaf47be89d2dae68f3ea5ad4cd2e7 /gcc
parent306133e3d42250f24023acc7f435ee2a63db0afe (diff)
downloadgcc-dab37c689ea85e9beb7d60fe4898deab048d00d2.zip
gcc-dab37c689ea85e9beb7d60fe4898deab048d00d2.tar.gz
gcc-dab37c689ea85e9beb7d60fe4898deab048d00d2.tar.bz2
sh-linux: Install __sync libfuncs.
* config/sh/linux.h (TARGET_INIT_LIBFUNCS): New. * config/sh/sh.c (sh_init_sync_libfuncs): New. From-SVN: r181322
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/config/sh/linux.h4
-rw-r--r--gcc/config/sh/sh.c8
3 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 592ea0a..4a9a5d3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2011-11-12 Richard Henderson <rth@redhat.com>
+ * config/sh/linux.h (TARGET_INIT_LIBFUNCS): New.
+ * config/sh/sh.c (sh_init_sync_libfuncs): New.
+
* config/pa/pa-linux.h (TARGET_SYNC_LIBCALL): New.
* config/pa/pa.h (TARGET_SYNC_LIBCALL): New default.
* config/pa/pa.c (pa_init_libfuncs): Use init_sync_libfuncs.
diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
index edfd99b..7a75341 100644
--- a/gcc/config/sh/linux.h
+++ b/gcc/config/sh/linux.h
@@ -131,3 +131,7 @@ along with GCC; see the file COPYING3. If not see
#define SH_DIV_STRATEGY_DEFAULT SH_DIV_CALL2
#undef SH_DIV_STR_FOR_SIZE
#define SH_DIV_STR_FOR_SIZE "call2"
+
+/* Install the __sync libcalls. */
+#undef TARGET_INIT_LIBFUNCS
+#define TARGET_INIT_LIBFUNCS sh_init_sync_libfuncs
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 03c3c48..2545a63 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -302,6 +302,8 @@ static void sh_trampoline_init (rtx, tree, rtx);
static rtx sh_trampoline_adjust_address (rtx);
static void sh_conditional_register_usage (void);
static bool sh_legitimate_constant_p (enum machine_mode, rtx);
+
+static void sh_init_sync_libfuncs (void) ATTRIBUTE_UNUSED;
static const struct attribute_spec sh_attribute_table[] =
{
@@ -12499,4 +12501,10 @@ sh_legitimate_constant_p (enum machine_mode mode, rtx x)
enum sh_divide_strategy_e sh_div_strategy = SH_DIV_STRATEGY_DEFAULT;
+static void
+sh_init_sync_libfuncs (void)
+{
+ init_sync_libfuncs (UNITS_PER_WORD);
+}
+
#include "gt-sh.h"