From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14599 invoked by alias); 25 Jul 2015 02:37:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 14349 invoked by uid 89); 25 Jul 2015 02:37:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 25 Jul 2015 02:37:12 +0000 Received: from iceball.corp.tor1.mozilla.com (unknown [66.207.208.102]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id 52CA0C0B6 for ; Sat, 25 Jul 2015 02:37:11 +0000 (UTC) From: tbsaunde+gcc@tbsaunde.org To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/4] make TLS_COMMON_ASM_OP a hook Date: Sat, 25 Jul 2015 03:09:00 -0000 Message-Id: <1437791820-17927-3-git-send-email-tbsaunde+gcc@tbsaunde.org> In-Reply-To: <1437791820-17927-1-git-send-email-tbsaunde+gcc@tbsaunde.org> References: <1437791820-17927-1-git-send-email-tbsaunde+gcc@tbsaunde.org> X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg02144.txt.bz2 From: Trevor Saunders gcc/ChangeLog: 2015-07-24 Trevor Saunders * config/i386/sol2.h: Adjust. * defaults.h: Likewise. * doc/tm.texi: Regenerate. * doc/tm.texi.in: Remove documentation of removed TLS_COMMON_ASM_OP macro. * target.def (tls_common_asm_op): New hook. --- gcc/config/i386/sol2.h | 2 +- gcc/defaults.h | 6 +----- gcc/doc/tm.texi | 7 +++---- gcc/doc/tm.texi.in | 6 +----- gcc/target.def | 6 ++++++ 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h index 9b725ad..d8e9c86 100644 --- a/gcc/config/i386/sol2.h +++ b/gcc/config/i386/sol2.h @@ -149,7 +149,7 @@ along with GCC; see the file COPYING3. If not see #ifndef USE_GAS /* The Sun assembler uses .tcomm for TLS common sections. */ -#define TLS_COMMON_ASM_OP ".tcomm" +#define TARGET_TLS_COMMON_ASM_OP ".tcomm" /* Similar to the Sun assembler on SPARC, the native assembler requires TLS objects to be declared as @tls_obj (not @tls_object). Unlike SPARC, diff --git a/gcc/defaults.h b/gcc/defaults.h index dedf896..8684c58 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -73,15 +73,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define IFUNC_ASM_TYPE "gnu_indirect_function" #endif -#ifndef TLS_COMMON_ASM_OP -#define TLS_COMMON_ASM_OP ".tls_common" -#endif - #if defined (HAVE_AS_TLS) && !defined (ASM_OUTPUT_TLS_COMMON) #define ASM_OUTPUT_TLS_COMMON(FILE, DECL, NAME, SIZE) \ do \ { \ - fprintf ((FILE), "\t%s\t", TLS_COMMON_ASM_OP); \ + fprintf ((FILE), "\t%s\t", targetm.tls_common_asm_op); \ assemble_name ((FILE), (NAME)); \ fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \ (SIZE), DECL_ALIGN (DECL) / BITS_PER_UNIT); \ diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 4d19252..faa3017 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -6968,11 +6968,10 @@ containing the assembler operation to identify the following data as uninitialized, writable small data. @end defmac -@defmac TLS_COMMON_ASM_OP -If defined, a C expression whose value is a string containing the -assembler operation to identify the following data as thread-local +@deftypevr {Target Hook} {const char *} TARGET_TLS_COMMON_ASM_OP +The assembler operation to identify the following data as thread-local common data. The default is @code{".tls_common"}. -@end defmac +@end deftypevr @defmac TLS_SECTION_ASM_FLAG If defined, a C expression whose value is a character constant diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index e75e818..72a7f84 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -4908,11 +4908,7 @@ containing the assembler operation to identify the following data as uninitialized, writable small data. @end defmac -@defmac TLS_COMMON_ASM_OP -If defined, a C expression whose value is a string containing the -assembler operation to identify the following data as thread-local -common data. The default is @code{".tls_common"}. -@end defmac +@hook TARGET_TLS_COMMON_ASM_OP @defmac TLS_SECTION_ASM_FLAG If defined, a C expression whose value is a character constant diff --git a/gcc/target.def b/gcc/target.def index ed438de..64ae8d4 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -5752,6 +5752,12 @@ DEFHOOKPOD The default value is false.", bool, false) +DEFHOOKPOD +(tls_common_asm_op, +"The assembler operation to identify the following data as thread-local\n\ +common data. The default is @code{\".tls_common\"}.", +const char *, ".tls_common") + /* True if a small readonly data section is supported. */ DEFHOOKPOD (have_srodata_section, -- 2.4.0