From patchwork Fri Nov 11 23:32:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 125313 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 9CF591007D8 for ; Sat, 12 Nov 2011 10:34:11 +1100 (EST) Received: (qmail 358 invoked by alias); 11 Nov 2011 23:34:00 -0000 Received: (qmail 32510 invoked by uid 22791); 11 Nov 2011 23:33:58 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, SPF_NEUTRAL X-Spam-Check-By: sourceware.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (140.186.70.92) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Nov 2011 23:33:42 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RP0bM-0002t1-Vf for gcc-patches@gcc.gnu.org; Fri, 11 Nov 2011 18:33:42 -0500 Received: from mail-iy0-f175.google.com ([209.85.210.175]:37485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RP0bM-0002ne-Kp; Fri, 11 Nov 2011 18:33:40 -0500 Received: by iahk25 with SMTP id k25so3790075iah.20 for ; Fri, 11 Nov 2011 15:33:38 -0800 (PST) Received: by 10.50.47.201 with SMTP id f9mr14765531ign.18.1321054418738; Fri, 11 Nov 2011 15:33:38 -0800 (PST) Received: from localhost.localdomain (c-98-203-235-125.hsd1.wa.comcast.net. [98.203.235.125]) by mx.google.com with ESMTPS id ew6sm9832567igc.4.2011.11.11.15.33.37 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 11 Nov 2011 15:33:38 -0800 (PST) From: Richard Henderson To: gcc-patches@gcc.gnu.org Cc: Kaz Kojima Subject: [PATCH 4/4] sh-linux: Install __sync libfuncs. Date: Fri, 11 Nov 2011 15:32:14 -0800 Message-Id: <1321054334-21865-5-git-send-email-rth@redhat.com> In-Reply-To: <1321054334-21865-1-git-send-email-rth@redhat.com> References: <1321054334-21865-1-git-send-email-rth@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.175 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Cc: Kaz Kojima --- gcc/config/sh/linux.h | 4 ++++ gcc/config/sh/sh.c | 8 ++++++++ 2 files changed, 12 insertions(+), 0 deletions(-) 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"