From patchwork Mon May 6 05:08:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 241555 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id C54DC2C00D8 for ; Mon, 6 May 2013 15:08:44 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=default; b=nOD+Wp6YmqOEN5zhh3W9qWVJoqhSzm gPgaOgATFym/2AOI2RLAl5XRjx2de7+PODHT7uZvouQ8groAGJ1jcowl+1hfaFgA QCO5ehPpzXg24xH4RT9UDXFyCiP1XQ7SzLuy4E1tbXGtHaz2WbzASy5qmA/5Py5l Tn6BuKvEaDw98= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=CPAjE/qwiCcPHyHK006g8WmVL+U=; b=JRtU 94FyAkOAPPgNRrITeadGKFnYmcpME/vGpNFxRN+V8SmHkNlqDJ94eewaELXos1zj tdQ4BEYjUu/gklsH3Pdrqo77zzNxTY/rZoK4yF0E0a9m9IeBMv6Czl/zqJsII4Ch I4QTERxC+4rFLGvGZJiEYVKZ8oeX0PD++2gyn9M= Received: (qmail 20149 invoked by alias); 6 May 2013 05:08:36 -0000 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 Received: (qmail 20136 invoked by uid 89); 6 May 2013 05:08:36 -0000 X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, SPF_PASS autolearn=no version=3.3.1 Received: from mail-da0-f43.google.com (HELO mail-da0-f43.google.com) (209.85.210.43) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 06 May 2013 05:08:35 +0000 Received: by mail-da0-f43.google.com with SMTP id u7so1658199dae.2 for ; Sun, 05 May 2013 22:08:33 -0700 (PDT) X-Received: by 10.68.129.10 with SMTP id ns10mr22683304pbb.13.1367816913778; Sun, 05 May 2013 22:08:33 -0700 (PDT) Received: from bubble.grove.modra.org ([101.166.26.37]) by mx.google.com with ESMTPSA id aj6sm22334222pbd.14.2013.05.05.22.08.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 05 May 2013 22:08:32 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 6E55BEA368E; Mon, 6 May 2013 14:38:27 +0930 (CST) Date: Mon, 6 May 2013 14:38:27 +0930 From: Alan Modra To: gcc-patches@gcc.gnu.org, Eric Botcazou , Jakub Jelinek Subject: Re: [PATCH] Fix array sizes created by Java FE (PR libgcj/57074) Message-ID: <20130506050827.GD5221@bubble.grove.modra.org> Mail-Followup-To: gcc-patches@gcc.gnu.org, Eric Botcazou , Jakub Jelinek References: <20130503171015.GD28963@tucnak.redhat.com> <16683464.Dx8Gnfmtdg@polaris> <20130504102019.GU5221@bubble.grove.modra.org> <3912336.Xx77qBFZ7M@polaris> <20130504115133.GW5221@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130504115133.GW5221@bubble.grove.modra.org> User-Agent: Mutt/1.5.21 (2010-09-15) I'd really like to see this in, so that powerpc doesn't silently generate wrong code. Bootstrapped and regression tested powerpc64-linux, with Jakub's java fixes applied. * varasm.c (output_object_block): Use .org for each item in section anchor block rather than padding. Index: gcc/varasm.c =================================================================== --- gcc/varasm.c (revision 198274) +++ gcc/varasm.c (working copy) @@ -7095,6 +7105,10 @@ HOST_WIDE_INT offset; tree decl; rtx symbol; +#if HAVE_GNU_AS + static int labelno; + char buf[30]; +#endif if (!block->objects) return; @@ -7104,6 +7118,12 @@ switch_to_section (block->sect); assemble_align (block->alignment); +#if HAVE_GNU_AS + ASM_GENERATE_INTERNAL_LABEL (buf, "LANCB", labelno); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, buf); + ++labelno; +#endif + /* Define the values of all anchors relative to the current section position. */ FOR_EACH_VEC_SAFE_ELT (block->anchors, i, symbol) @@ -7114,7 +7134,14 @@ FOR_EACH_VEC_ELT (*block->objects, i, symbol) { /* Move to the object's offset, padding with zeros if necessary. */ +#if HAVE_GNU_AS + fprintf (asm_out_file, "\t.org "); + assemble_name_raw (asm_out_file, buf); + fprintf (asm_out_file, "+" HOST_WIDE_INT_PRINT_DEC "\n", + SYMBOL_REF_BLOCK_OFFSET (symbol)); +#else assemble_zeros (SYMBOL_REF_BLOCK_OFFSET (symbol) - offset); +#endif offset = SYMBOL_REF_BLOCK_OFFSET (symbol); if (CONSTANT_POOL_ADDRESS_P (symbol)) {