From patchwork Tue Nov 29 14:02:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 128291 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 9E4D9B6F7E for ; Wed, 30 Nov 2011 01:02:57 +1100 (EST) Received: (qmail 27443 invoked by alias); 29 Nov 2011 14:02:54 -0000 Received: (qmail 27422 invoked by uid 22791); 29 Nov 2011 14:02:52 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from c2beaomr07.btconnect.com (HELO mail.btconnect.com) (213.123.26.185) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Nov 2011 14:02:26 +0000 Received: from host81-138-1-83.in-addr.btopenworld.com (EHLO thor.office) ([81.138.1.83]) by c2beaomr07.btconnect.com with ESMTP id FIS38218; Tue, 29 Nov 2011 14:02:24 +0000 (GMT) Message-Id: <8D469478-C9B0-446C-A7DA-B5C5707E738F@sandoe-acoustics.co.uk> From: Iain Sandoe To: GCC Patches Mime-Version: 1.0 (Apple Message framework v936) Subject: [Patch ppc/darwin] fix vec unwinding part 1. Date: Tue, 29 Nov 2011 14:02:24 +0000 Cc: Mike Stump X-Mirapoint-IP-Reputation: reputation=Good-1, source=Queried, refid=tid=0001.0A0B0301.4ED4E5F0.0069, actions=tag X-Junkmail-Premium-Raw: score=7/50, refid=2.7.2:2011.11.29.125122:17:7.763, ip=81.138.1.83, rules=__HAS_MSGID, __SANE_MSGID, __MSGID_APPLEMAIL, __TO_MALFORMED_2, __CT, __CTYPE_HAS_BOUNDARY, __CTYPE_MULTIPART, CTYPE_MULTIPART_NO_QUOTE, __CTYPE_MULTIPART_MIXED, __MIME_VERSION, __MIME_VERSION_APPLEMAIL, __HAS_X_MAILER, __X_MAILER_APPLEMAIL, TXT_ATTACHED, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_3000_3999, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, __USER_AGENT_APPLEMAIL, RDNS_SUSP, BODY_SIZE_7000_LESS, NO_URI_FOUND, MIME_TEXT_ONLY_MP_MIXED X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B0203.4ED4E5F0.0245, ss=1, re=0.000, fgs=0, ip=0.0.0.0, so=2011-07-25 19:15:43, dmn=2011-05-27 18:58:46, mode=multiengine X-IsSubscribed: yes 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 following fails: FAIL: g++.dg/eh/simd-3.C -std=gnu++98 execution test FAIL: g++.dg/eh/simd-3.C -std=gnu++11 execution test FAIL: g++.dg/eh/simd-4.C -std=gnu++98 execution test FAIL: g++.dg/eh/simd-4.C -std=gnu++11 execution test are the tip of an "unwinding doesn't work with vectors" iceberg ... and is caused by the unwinder having the wrong size for vec registers - which, is caused by the unwinder being built with altivec disabled - which is caused by the unwinder being built with -mmacosx-version- min=10.4 forced on. This strategy was (part of a) solution for the situation that system libraries might be installed on either G4 or G3 hardware. A (low priority) TODO is to provide an updated solution to that desideratum - low priority since it affects a vanishingly small number of potential Users. The fix for the fails (and to make unwinding with vectors work on Darwin9) is to build the unwinder 'native'. (as part of the TODO above - we also need to figure a way to get the register sizes right for Darwin 8). OK for trunk? Iain libgcc: * config/rs6000/t-darwin (DARWIN_EXTRA_CRT_BUILD_CFLAGS): Remove -mmacosx-version-min=10.4. (HOST_LIBGCC2_CFLAGS): Likewise. (LIB2ADD): Correct whitespace. (LIB2ADD_ST): Add comment. Index: libgcc/config/rs6000/t-darwin =================================================================== --- libgcc/config/rs6000/t-darwin (revision 181772) +++ libgcc/config/rs6000/t-darwin (working copy) @@ -1,23 +1,22 @@ -DARWIN_EXTRA_CRT_BUILD_CFLAGS = -mlongcall -mmacosx-version-min=10.4 +DARWIN_EXTRA_CRT_BUILD_CFLAGS = -mlongcall crt2.o: $(srcdir)/config/rs6000/darwin-crt2.c $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -c $< LIB2ADD = $(srcdir)/config/rs6000/darwin-tramp.S \ $(srcdir)/config/darwin-64.c \ - $(srcdir)/config/rs6000/darwin-fpsave.S \ - $(srcdir)/config/rs6000/darwin-gpsave.S \ + $(srcdir)/config/rs6000/darwin-fpsave.S \ + $(srcdir)/config/rs6000/darwin-gpsave.S \ $(srcdir)/config/rs6000/darwin-world.S \ $(srcdir)/config/rs6000/ppc64-fp.c +# ??? Is darwin-vecsave.S actually ever used? - not by recent FSF compilers. LIB2ADD_ST = \ $(srcdir)/config/rs6000/darwin-vecsave.S # The .S files above are designed to run on all processors, even though # they use AltiVec instructions. # -Wa is used because -force_cpusubtype_ALL doesn't work with -dynamiclib. -# -mmacosx-version-min=10.4 is used to provide compatibility for code from -# earlier OSX versions. -HOST_LIBGCC2_CFLAGS += -Wa,-force_cpusubtype_ALL -mmacosx-version-min=10.4 +HOST_LIBGCC2_CFLAGS += -Wa,-force_cpusubtype_ALL LIB2ADDEH += $(srcdir)/config/rs6000/darwin-fallback.c