From patchwork Sun Jun 24 21:37:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Bosscher X-Patchwork-Id: 166912 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 71104B6F77 for ; Mon, 25 Jun 2012 07:38:39 +1000 (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=1341178720; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:From:Date:Message-ID:Subject:To:Cc: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=iE2RZgK jZng09KZFDW7VF7mj2bM=; b=f/+Se/e2YAY2d2D1MmJejU6zUVky3k9ivuI+dAa FkoT6/3+8lSeWJ6E+qa+B6BqJ49jwYdPIhTNBfC5neo7Ft1UCySSxG60vOmt8T6E l99DjghXsbthbB5ymFk1p4HdoHUdbAJzrWfEKKEIv5jgdVHEAD4UYShFnydXoksw 7mdg= 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:Received:MIME-Version:Received:From:Date:Message-ID:Subject:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=HWGDDwLoNx3R7SlfYcmXUeVLRu/jk3W778SsYhkaYpHqs+i/lirDwVNKLH0evo qZ6essyv1K8kLxszUbq668zU38gzcCe05fk7u3qzqDhqQF9zl0AxFfPZTA2SmXiz HuHZdnaWkSmfmzp2+Bjf0/AqyaTkKnqktqSBVXbuejhvk=; Received: (qmail 19804 invoked by alias); 24 Jun 2012 21:38:35 -0000 Received: (qmail 19794 invoked by uid 22791); 24 Jun 2012 21:38:33 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_JL, TW_TJ X-Spam-Check-By: sourceware.org Received: from mail-lb0-f175.google.com (HELO mail-lb0-f175.google.com) (209.85.217.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 24 Jun 2012 21:38:21 +0000 Received: by lbol5 with SMTP id l5so5968463lbo.20 for ; Sun, 24 Jun 2012 14:38:19 -0700 (PDT) Received: by 10.112.103.130 with SMTP id fw2mr4889832lbb.107.1340573899706; Sun, 24 Jun 2012 14:38:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.4.229 with HTTP; Sun, 24 Jun 2012 14:37:59 -0700 (PDT) From: Steven Bosscher Date: Sun, 24 Jun 2012 23:37:59 +0200 Message-ID: Subject: [patch] Only define JMP_BUF_SIZE in backends that also define DONT_USE_BUILTIN_SETJMP To: GCC Patches Cc: John David Anglin , Eric Botcazou , DJ Delorie 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 Hello, For targets that define DONT_USE_BUILTIN_SETJMP, the JMP_BUF_SIZE macro can be used to set the size of the exception jump buffer. The JMP_BUF_SIZE macro is not used unless DONT_USE_BUILTIN_SETJMP is defined. See gcc/except.c and libgcc/unwind-sjlj.c. The PA and SPARC back ends do not define DONT_USE_BUILTIN_SETJMP, so they also do not have to define JMP_BUF_SIZE. So: * config/sparc/sparc.h (JMP_BUF_SIZE): Do not define. * config/pa/pa.h (JMP_BUF_SIZE): Likewise. OK for trunk? The rl78 apparently doesn't know what it wants to do: /* NOTE: defined but zero means dwarf2 debugging, but sjlj EH. */ #define DWARF2_UNWIND_INFO 0 /*#define DONT_USE_BUILTIN_SETJMP 1*/ #undef DONT_USE_BUILTIN_SETJMP #define JMP_BUF_SIZE (8*3+8) But I'll leave that to an rl78 maintainer. Ciao! Steven Index: config/pa/pa.h =================================================================== --- config/pa/pa.h (revision 188917) +++ config/pa/pa.h (working copy) @@ -1508,9 +1508,6 @@ do { \ of the return address. */ \ (GEN_INT (-4)) -/* The number of Pmode words for the setjmp buffer. */ -#define JMP_BUF_SIZE 50 - /* We need a libcall to canonicalize function pointers on TARGET_ELF32. */ #define CANONICALIZE_FUNCPTR_FOR_COMPARE_LIBCALL \ "__canonicalize_funcptr_for_compare" Index: config/sparc/sparc.h =================================================================== --- config/sparc/sparc.h (revision 188917) +++ config/sparc/sparc.h (working copy) @@ -1744,9 +1744,6 @@ extern int sparc_indent_opcode; #define AS_NIAGARA3_FLAG "d" #endif -/* The number of Pmode words for the setjmp buffer. */ -#define JMP_BUF_SIZE 12 - /* We use gcc _mcount for profiling. */ #define NO_PROFILE_COUNTERS 0