From patchwork Sat Nov 20 22:04:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 72364 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 212AAB716F for ; Sun, 21 Nov 2010 09:05:46 +1100 (EST) Received: (qmail 12056 invoked by alias); 20 Nov 2010 22:05:44 -0000 Received: (qmail 12046 invoked by uid 22791); 20 Nov 2010 22:05:43 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 20 Nov 2010 22:05:37 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 5F522CB01DE for ; Sat, 20 Nov 2010 23:05:35 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZZO+liSXulXg for ; Sat, 20 Nov 2010 23:05:35 +0100 (CET) Received: from [192.168.1.2] (bon31-9-83-155-120-49.fbx.proxad.net [83.155.120.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 38662CB01DD for ; Sat, 20 Nov 2010 23:05:35 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [SPARC] Fix PR target/31100 Date: Sat, 20 Nov 2010 23:04:28 +0100 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Message-Id: <201011202304.28754.ebotcazou@adacore.com> 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 The filler pattern defined for the .align directive on the SPARC (0x1000000) is valid for Sun as but not for GNU as; in fact, GNU as already knows how to do the filling on its own. Bootstrapped/regtested on SPARC64/Solaris 9 and SPARC/Solaris 10, applied on the mainline and 4.5 branch. 2010-11-20 Eric Botcazou PR target/31100 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN_WITH_NOP): Move to... * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): ...here. * config/sparc/sol2-gas.h (ASM_OUTPUT_ALIGN_WITH_NOP): Undefine. 2010-11-20 Eric Botcazou * gcc.target/sparc/sparc-align-1.c: New test. Index: config/sparc/sol2-gas.h =================================================================== --- config/sparc/sol2-gas.h (revision 166973) +++ config/sparc/sol2-gas.h (working copy) @@ -23,6 +23,9 @@ a copy of the GCC Runtime Library Except see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +/* Undefine this as the filler pattern doesn't work with GNU as. */ +#undef ASM_OUTPUT_ALIGN_WITH_NOP + /* Undefine this so that BNSYM/ENSYM pairs are emitted by STABS+. */ #undef NO_DBX_BNSYM_ENSYM Index: config/sparc/sparc.h =================================================================== --- config/sparc/sparc.h (revision 166973) +++ config/sparc/sparc.h (working copy) @@ -2013,13 +2013,6 @@ do { \ if ((LOG) != 0) \ fprintf (FILE, "\t.align %d\n", (1<<(LOG))) -/* This is how to output an assembler line that says to advance - the location counter to a multiple of 2**LOG bytes using the - "nop" instruction as padding. */ -#define ASM_OUTPUT_ALIGN_WITH_NOP(FILE,LOG) \ - if ((LOG) != 0) \ - fprintf (FILE, "\t.align %d,0x1000000\n", (1<<(LOG))) - #define ASM_OUTPUT_SKIP(FILE,SIZE) \ fprintf (FILE, "\t.skip "HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE)) Index: config/sparc/sol2.h =================================================================== --- config/sparc/sol2.h (revision 166973) +++ config/sparc/sol2.h (working copy) @@ -177,6 +177,13 @@ along with GCC; see the file COPYING3. } \ while (0) +/* This is how to output an assembler line that says to advance + the location counter to a multiple of 2**LOG bytes using the + NOP instruction as padding. */ +#define ASM_OUTPUT_ALIGN_WITH_NOP(FILE,LOG) \ + if ((LOG) != 0) \ + fprintf (FILE, "\t.align %d,0x1000000\n", (1<<(LOG))) + /* Use Solaris ELF section syntax. */ #undef TARGET_ASM_NAMED_SECTION #define TARGET_ASM_NAMED_SECTION sparc_solaris_elf_asm_named_section