From patchwork Fri Feb 1 14:11:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Edelsohn X-Patchwork-Id: 217470 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 A626B2C0293 for ; Sat, 2 Feb 2013 01:12:18 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1360332739; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=x/BX5ZN x2mlzdqP9r/imJksOzbI=; b=oKzKKQqUuwaFZIzHZFEGi1W7Pz2hNCY9kywWFZp l6+X+F5SZhiSOnXUvoqv9U5K/3HEy27A+I/5CASUD27q3ZjGlU6B5WV8Z5FR9vhJ zXYfVy5maZay1tkgPuOE0FJdHRupHULigTWxnDnKCeh2X61gPYxpOL3c/rDpZwQk DZSg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:X-Received:Received:Date:Message-ID:Subject:From:To:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=aUoTt3jWIEumnftAQBX/b89/PTrTxVJsvnwF4/BqWXV49jYXq3FDCsuDVAuZ9A 65ssY2EA3xyYYXbstJBcWhIp33VS/y06mctkQ5ZjE37sUcV9zcuf8Dk/xpC/3DiI 3IJReVpuXDJvlxB2Kygm93dIyKS7+LMgPj2LlZgzeUPn8=; Received: (qmail 28633 invoked by alias); 1 Feb 2013 14:12:09 -0000 Received: (qmail 28619 invoked by uid 22791); 1 Feb 2013 14:12:07 -0000 X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_SPAMHAUS_DROP, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wg0-f46.google.com (HELO mail-wg0-f46.google.com) (74.125.82.46) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Feb 2013 14:11:58 +0000 Received: by mail-wg0-f46.google.com with SMTP id fg15so2851127wgb.1 for ; Fri, 01 Feb 2013 06:11:57 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.194.108.136 with SMTP id hk8mr22009740wjb.30.1359727917519; Fri, 01 Feb 2013 06:11:57 -0800 (PST) Received: by 10.194.172.227 with HTTP; Fri, 1 Feb 2013 06:11:57 -0800 (PST) Date: Fri, 1 Feb 2013 09:11:57 -0500 Message-ID: Subject: [PATCH,committed] Define ASM_OUTPUT_ALIGNED_LOCAL for AIX From: David Edelsohn To: GCC Patches 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 AIX 6.1 added an alignment argument to the .lcomm pseudo-op. This fixes many of the remaining Altivec failures on AIX where GCC was generating a zero vector in BSS, but the block was not appropriately aligned. I also took the opportunity to change ASM_OUTPUT_ALIGNED_COMMON use of exact_log2 to floor_log2. * config/rs6000/xcoff.h (ASM_OUTPUT_ALIGNED_COMMON): Use floor_log2. (ASM_OUTPUT_ALIGNED_LOCAL): New. Bootstrapped on powerpc-ibm-aix7.1.0.0. Thanks, David Index: xcoff.h =================================================================== --- xcoff.h (revision 195639) +++ xcoff.h (working copy) @@ -283,7 +283,7 @@ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ if ((ALIGN) > 32) \ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), \ - exact_log2 ((ALIGN) / BITS_PER_UNIT)); \ + floor_log2 ((ALIGN) / BITS_PER_UNIT)); \ else if ((SIZE) > 4) \ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",3\n", (SIZE)); \ else \ @@ -292,12 +292,30 @@ /* This says how to output an assembler line to define a local common symbol. - Alignment cannot be specified, but we can try to maintain + The assembler in AIX 6.1 and later supports an alignment argument. + For earlier releases of AIX, we try to maintain alignment after preceding TOC section if it was aligned for 64-bit mode. */ #define LOCAL_COMMON_ASM_OP "\t.lcomm " +#if TARGET_AIX_VERSION >= 61 +#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ + do { fputs (LOCAL_COMMON_ASM_OP, (FILE)); \ + RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ + if ((ALIGN) > 32) \ + fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s,%u\n", \ + (SIZE), xcoff_bss_section_name, \ + floor_log2 ((ALIGN) / BITS_PER_UNIT)); \ + else if ((SIZE) > 4) \ + fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s,3\n", \ + (SIZE), xcoff_bss_section_name); \ + else \ + fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%s\n", \ + (SIZE), xcoff_bss_section_name); \ + } while (0) +#endif + #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ do { fputs (LOCAL_COMMON_ASM_OP, (FILE)); \ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \