From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16058 invoked by alias); 13 Mar 2013 15:34:42 -0000 Received: (qmail 16003 invoked by uid 22791); 13 Mar 2013 15:34:39 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from caibbdcaaaaf.dreamhost.com (HELO homiemail-a44.g.dreamhost.com) (208.113.200.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Mar 2013 15:33:57 +0000 Received: from homiemail-a44.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a44.g.dreamhost.com (Postfix) with ESMTP id 62E86118060; Wed, 13 Mar 2013 08:33:55 -0700 (PDT) Received: from redwood.eagercon.com (c-50-148-128-197.hsd1.ca.comcast.net [50.148.128.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: eager@eagerm.com) by homiemail-a44.g.dreamhost.com (Postfix) with ESMTPSA id 1D6BB118057; Wed, 13 Mar 2013 08:33:55 -0700 (PDT) Message-ID: <51409C62.50502@eagerm.com> Date: Wed, 13 Mar 2013 15:34:00 -0000 From: Michael Eager User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 MIME-Version: 1.0 To: David Holsgrove CC: "gcc-patches@gcc.gnu.org" , Edgar Iglesias , John Williams , Vinod Kathail , Vidhumouli Hunsigida , Nagaraju Mekala , Tom Shui Subject: Re: [Patch, microblaze]: Add support for TLS in MicroBlaze References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2013-03/txt/msg00465.txt.bz2 On 03/12/2013 01:47 PM, David Holsgrove wrote: > Add support for thread local storage (general dynamic and local dynamic models) in MicroBlaze. > > > gcc/Changelog > > 2013-03-13 Edgar E. Iglesias > David Holsgrove > > * config/microblaze/microblaze-protos.h: (microblaze_cannot_force_const_mem, > microblaze_tls_referenced_p, symbol_mentioned_p, > label_mentioned_p): Add prototypes. > * config/microblaze/microblaze.c (microblaze_address_type): Add ADDRESS_TLS > and tls_reloc address types. > (microblaze_address_info): Add tls_reloc. > (TARGET_HAVE_TLS): Define. > (get_tls_get_addr, microblaze_tls_symbol_p, microblaze_tls_operand_p_1, > microblaze_tls_referenced_p, microblaze_cannot_force_const_mem, > symbol_mentioned_p, label_mentioned_p, tls_mentioned_p, load_tls_operand, > microblaze_call_tls_get_addr, microblaze_legitimize_tls_address): New functions. > (microblaze_classify_unspec): Handle UNSPEC_TLS. > (get_base_reg): Use microblaze_tls_symbol_p. > (microblaze_classify_address): Handle TLS. > (microblaze_legitimate_pic_operand): Use symbol_mentioned_p, label_mentioned_p > and microblaze_tls_referenced_p. > (microblaze_legitimize_address): Handle TLS. > (microblaze_address_insns): Handle ADDRESS_TLS. > (pic_address_needs_scratch): Handle TLS. > (print_operand_address): Handle TLS. > (microblaze_expand_prologue): Check TLS_NEEDS_GOT. > (microblaze_expand_move): Handle TLS. > (microblaze_legitimate_constant_p): Check microblaze_cannot_force_const_mem > and microblaze_tls_symbol_p. > (TARGET_CANNOT_FORCE_CONST_MEM): Define. > * config/microblaze/microblaze.h (TLS_NEEDS_GOT): Define > (PIC_OFFSET_TABLE_REGNUM): Set. > * config/microblaze/linux.h (TLS_NEEDS_GOT): Define. > * config/microblaze/microblaze.md (UNSPEC_TLS): Define. > (addsi3, movsi_internal2, movdf_internal): Update constraints > * config/microblaze/predicates.md (arith_plus_operand): Define > (move_operand): Redefine as move_src_operand, check microblaze_tls_referenced_p. > > Signed-off-by: Edgar E. Iglesias > Signed-off-by: David Holsgrove Hi David -- The patch is OK except for a number of minor formatting problems to meet GNU standards. - Comments are supposed to end with ". */". - Extra spacing around parens or between "!" and "TARGET...". - && or || at start of line continuing a condition rather that at end of previous line - Some places where the indenting is incorrect Should this patch be combined with the other patch adding TLS checking to configure? -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077