From patchwork Wed Jul 3 15:11:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 256680 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 2BC322C008F for ; Thu, 4 Jul 2013 01:11:32 +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 :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=Mphzh+ZmQqZ0AkSKoEElUfZLhVhqGRBM0DMWkpbRvTm7z9 Hv7YTEGIm/X/bEDCMgXknfaRj21uaU1WewjTP9nEscDVhnvheEKz271A2t5SjJDx UkaRX75ULwNbOisnhA8t1CpO8C5tJCx0nw6kHlQQM6H+HVXoAkIXLI1EwxvGQ= 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 :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=dZtN4cmkfJD2qtaKzEIUjJB5h70=; b=jwuo/X/8nNY4OOh25z33 hlPb9NxWF6WMUuW7SdDEnQUCG3DsVE149OrJSle9P8mESWEKIeyYcZGaZDVNMRhf +7RztFAceplUAUf4vrwI0FfVuknXNdU5lEVmydQMACEm6IdYpzGNWywYL3IUDGi0 oxratRbVKGPSh6w/jEJN7sQ= Received: (qmail 3252 invoked by alias); 3 Jul 2013 15:11:26 -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 3242 invoked by uid 89); 3 Jul 2013 15:11:26 -0000 X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, SPF_PASS autolearn=ham version=3.3.1 Received: from mail-ie0-f174.google.com (HELO mail-ie0-f174.google.com) (209.85.223.174) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 03 Jul 2013 15:11:25 +0000 Received: by mail-ie0-f174.google.com with SMTP id 9so654773iec.19 for ; Wed, 03 Jul 2013 08:11:24 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.43.99.138 with SMTP id cs10mr724669icc.105.1372864284224; Wed, 03 Jul 2013 08:11:24 -0700 (PDT) Received: by 10.64.18.163 with HTTP; Wed, 3 Jul 2013 08:11:24 -0700 (PDT) Date: Wed, 3 Jul 2013 17:11:24 +0200 Message-ID: Subject: [libobjc]: Allow SjLj for x64 windows target From: Kai Tietz To: GCC Patches Hi, this patch fixes Obj-C's exception handling code for SEH x64. For it the guard for forcing SjLj was missing and therefore leads to issues, if OP wants to force SjLj. ChangeLog 2013-07-03 Kai Tietz * exception.c: Add check for SjLj to SEH blocks. Tested for x86_64-w64-mingw32, and i686-pc-cygwin. I will apply patch tomorrow, if there are no objections. Regards, Kai Index: exception.c =================================================================== --- exception.c (Revision 200643) +++ exception.c (Arbeitskopie) @@ -202,7 +202,7 @@ get_ttype_entry (struct lsda_header_info *info, _U #ifdef SJLJ_EXCEPTIONS #define PERSONALITY_FUNCTION __gnu_objc_personality_sj0 #define __builtin_eh_return_data_regno(x) x -#elif defined(__SEH__) +#elif defined(__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) #define PERSONALITY_FUNCTION __gnu_objc_personality_imp #else #define PERSONALITY_FUNCTION __gnu_objc_personality_v0 @@ -227,7 +227,7 @@ PERSONALITY_FUNCTION (_Unwind_State state, #define CONTINUE_UNWINDING return _URC_CONTINUE_UNWIND -#ifdef __SEH__ +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) static #endif _Unwind_Reason_Code @@ -524,7 +524,7 @@ objc_exception_throw (id exception) abort (); } -#ifdef __SEH__ +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) EXCEPTION_DISPOSITION __gnu_objc_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame, PCONTEXT ms_orig_context, @@ -533,4 +533,4 @@ __gnu_objc_personality_seh0 (PEXCEPTION_RECORD ms_ return _GCC_specific_handler (ms_exc, this_frame, ms_orig_context, ms_disp, __gnu_objc_personality_imp); } -#endif /* SEH */ +#endif