From patchwork Tue Jul 6 23:26:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jack Howarth X-Patchwork-Id: 58073 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 4F3BCB6EEE for ; Wed, 7 Jul 2010 09:27:09 +1000 (EST) Received: (qmail 14952 invoked by alias); 6 Jul 2010 23:27:07 -0000 Received: (qmail 14931 invoked by uid 22791); 6 Jul 2010 23:27:06 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, TW_ZJ, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Tue, 06 Jul 2010 23:27:02 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id EDAA2B005E; Tue, 6 Jul 2010 19:26:59 -0400 (EDT) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id o66NQx7N010699; Tue, 6 Jul 2010 19:26:59 -0400 Date: Tue, 6 Jul 2010 19:26:58 -0400 From: Jack Howarth To: Kai Tietz Cc: Uros Bizjak , gcc-patches@gcc.gnu.org, Richard Henderson , Kai Tietz , mikestump@comcast.net Subject: Re: [patch i386]: Add support of "hotfix" -feature for x64 Message-ID: <20100706232658.GA10654@bromo.med.uc.edu> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) 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 On Tue, Jul 06, 2010 at 08:28:48PM +0200, Kai Tietz wrote: > 2010/7/6 Uros Bizjak : > > Hello! > > > >> Better, but honestly I'd been thinking just to bring one > >> directive per line, rather than trying to block the output > >> onto several lines.  I.e. > >> > >>   for (i = 0; i < filler_count; i += 4) > >>    fprintf (asm_out_file, ASM_LONG " 0x%x\n", filler_cc); > >> > >> > >> Ok with that change. > > > > Please also use %#x instead of 0x%x. > > > > Thanks, > > Uros. > > > > > Ok, changed it to a simple loop without formatting and I use %#x. > Committed at revision 161875 & 161876 > > Thanks, > Kai This patch breaks the bootstrap on i386-apple-darwin* and x86_64-apple-darwin* since gcc/config/darwin.h defines ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL). Simply changing... is insufficient since it results in a bootstrap failure of... /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./prev-gcc/xgcc -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./prev-gcc/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.4.0/bin/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.4.0/bin/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.4.0/lib/ -isystem /sw/lib/gcc4.6/x86_64-apple-darwin10.4.0/include -isystem /sw/lib/gcc4.6/x86_64-apple-darwin10.4.0/sys-include -c -g -O2 -gtoggle -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.6-20100706/gcc -I../../gcc-4.6-20100706/gcc/. -I../../gcc-4.6-20100706/gcc/../include -I../../gcc-4.6-20100706/gcc/../libcpp/include -I/sw/include -I/sw/include -I../../gcc-4.6-20100706/gcc/../libdecnumber -I../../gcc-4.6-20100706/gcc/../libdecnumber/dpd -I../libdecnumber -I/sw/include -I/sw/include -DCLOOG_PPL_BACKEND -I/sw/include -I. -I. -I../../gcc-4.6-20100706/gcc -I../../gcc-4.6-20100706/gcc/. -I../../gcc-4.6-20100706/gcc/../include -I../../gcc-4.6-20100706/gcc/../libcpp/include -I/sw/include -I/sw/include -I../../gcc-4.6-20100706/gcc/../libdecnumber -I../../gcc-4.6-20100706/gcc/../libdecnumber/dpd -I../libdecnumber -I/sw/include -I/sw/include -DCLOOG_PPL_BACKEND ../../gcc-4.6-20100706/gcc/config/host-darwin.c ../../gcc-4.6-20100706/gcc/config/i386/i386.c: In function 'ix86_asm_declare_function_name': ../../gcc-4.6-20100706/gcc/config/i386/i386.c:5121:3: error: variable 'xname' set but not used [-Werror=unused-but-set-variable] Also any fix will have to take in account that darwin.h is shared between powerpc-apple-darwin* and *86-apple-darwin* so the hot-fix will either have to be extended to rs6000 or the macro definition moved out of gcc/config/darwin.h and into gcc/config/rs6000/darwin.h as ASM_DECLARE_FUNCTION_NAME() and into gcc/config/i386/darwin.h as SUBTARGET_ASM_DECLARE_FUNCTION_NAME(). A mechanism to handle the use of xname in SUBTARGET_ASM_DECLARE_FUNCTION_NAME() on darwin still is required. Jack > > -- > | (\_/) This is Bunny. Copy and paste > | (='.'=) Bunny into your signature to help > | (")_(") him gain world domination Index: gcc/config/darwin.h =================================================================== --- gcc/config/darwin.h (revision 161889) +++ gcc/config/darwin.h (working copy) @@ -635,7 +635,8 @@ assemble_zeros (1); \ } while (0) -#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ +#undef SUBTARGET_ASM_DECLARE_FUNCTION_NAME +#define SUBTARGET_ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ do { \ const char *xname = NAME; \ if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \ @@ -649,7 +650,6 @@ && (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \ || DECL_INITIAL (DECL)) \ (* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \ - ASM_OUTPUT_LABEL (FILE, xname); \ } while (0) #undef TARGET_ASM_DECLARE_CONSTANT_NAME