From patchwork Fri Aug 13 12:32:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Office Admin X-Patchwork-Id: 61680 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 D4742B70D2 for ; Fri, 13 Aug 2010 22:33:19 +1000 (EST) Received: (qmail 6207 invoked by alias); 13 Aug 2010 12:33:16 -0000 Received: (qmail 6186 invoked by uid 22791); 13 Aug 2010 12:33:15 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from c2beaomr09.btconnect.com (HELO c2beaomr09.btconnect.com) (213.123.26.187) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Aug 2010 12:33:04 +0000 Received: from thor.office (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by c2beaomr09.btconnect.com with ESMTP id FDV16118; Fri, 13 Aug 2010 13:32:51 +0100 (BST) X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=0001.0A0B0302.4C653B72.02A5, actions=tag Cc: GCC Patches , mrs@gcc.gnu.org Message-Id: <00F91EB0-BBBA-4674-85CA-AFB51AA49DBE@btconnect.com> From: Office Admin To: Andrew Pinski In-Reply-To: <4E7077C2-6DBB-4612-8084-29BC39681EB2@sandoe-acoustics.co.uk> Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: repost, [Patch libobjc] Fix Darwin powerpc m64 breakage. Date: Fri, 13 Aug 2010 13:32:47 +0100 References: <4E7077C2-6DBB-4612-8084-29BC39681EB2@sandoe-acoustics.co.uk> 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 Andrew, A repost after our discussion on irc, OK for trunk now? Iain On 3 Jul 2010, at 11:54, IainS wrote: > it's nice when 4 lines of code fixes 4 dozen test-suite fails .. > .. and disappointing that it's probably taken more than 4 years for > someone to have time to look .. Now that the PPC64 ABI is fixed on darwin I'd like to get this in too.... > libobjc/Changelog: > > * encoding.c: Add TARGET_ALIGN_NATURAL definition for m64 powerpc > darwin. > Add a comment as to why, update FIXME comments. > > testsuite/ChangeLog: > > * objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c: Update > XFAILs. > - ({ const char *_fields = TYPE_FIELDS (STRUCT); \ + ({ const char *_fields = TYPE_FIELDS (STRUCT); \ ((_fields != 0 \ && TYPE_MODE (strip_array_types (TREE_TYPE (_fields))) == DFmode) \ ? MAX (MAX (COMPUTED, SPECIFIED), 64) \ Index: gcc/testsuite/objc.dg/gnu-encoding/struct-layout- encoding-1_generate.c =================================================================== --- gcc/testsuite/objc.dg/gnu-encoding/struct-layout- encoding-1_generate.c (revision 163223) +++ gcc/testsuite/objc.dg/gnu-encoding/struct-layout- encoding-1_generate.c (working copy) @@ -236,7 +236,7 @@ switchfiles (int fields) || filecnt == 22) { fprintf (outfile, "\ -/* { dg-do run { xfail powerpc*-*-darwin* powerpc*-*-aix* } } */\n\ +/* { dg-do run { xfail { { \"powerpc*-*-darwin*\" && { ! lp64 } } || { \"powerpc*-*-aix*\" } } } } */\n\ /* { dg-options \"-w -I%s -fgnu-runtime\" } */\n", srcdir); } /* FIXME: these should not be xfailed but they are because Index: libobjc/encoding.c =================================================================== --- libobjc/encoding.c (revision 163223) +++ libobjc/encoding.c (working copy) @@ -105,13 +105,24 @@ static int __attribute__ ((__unused__)) not_target #undef ALTIVEC_VECTOR_MODE #define ALTIVEC_VECTOR_MODE(MODE) (0) +/* Furthermore, some (powerpc) targets also use TARGET_ALIGN_NATURAL + in their alignment macros. Currently[4.5/6], rs6000.h points this + to a static variable, initialized by target overrides. This is reset + in linux64.h but not in darwin64.h. The macro is not used by *86*. */ +#if __MACH__ && __LP64__ +# undef TARGET_ALIGN_NATURAL +# define TARGET_ALIGN_NATURAL 1 +#endif + /* FIXME: while this file has no business including tm.h, this definitely has no business defining this macro but it is only way around without really rewritting this file, - should look after the branch of 3.4 to fix this. */ + should look after the branch of 3.4 to fix this. + FIXME1: It's also out of date, darwin no longer has the same alignment + 'special' as aix - this is probably the origin of the m32 breakage. */ #define rs6000_special_round_type_align(STRUCT, COMPUTED, SPECIFIED) \