From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30577 invoked by alias); 24 Jan 2013 13:56:37 -0000 Received: (qmail 30569 invoked by uid 22791); 24 Jan 2013 13:56:35 -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,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_GJ X-Spam-Check-By: sourceware.org Received: from mail-we0-f174.google.com (HELO mail-we0-f174.google.com) (74.125.82.174) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Jan 2013 13:56:25 +0000 Received: by mail-we0-f174.google.com with SMTP id r6so1492781wey.19 for ; Thu, 24 Jan 2013 05:56:23 -0800 (PST) X-Received: by 10.195.13.11 with SMTP id eu11mr3253769wjd.39.1359035783494; Thu, 24 Jan 2013 05:56:23 -0800 (PST) Received: from localhost ([2.26.205.107]) by mx.google.com with ESMTPS id ew4sm2670586wid.11.2013.01.24.05.56.21 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 24 Jan 2013 05:56:22 -0800 (PST) From: Richard Sandiford To: "Maciej W. Rozycki" Mail-Followup-To: "Maciej W. Rozycki" ,Chung-Lin Tang , "Joseph S. Myers" , , rdsandiford@googlemail.com Cc: Chung-Lin Tang , "Joseph S. Myers" , Subject: Re: [PATCH 2/2] MIPS16: MIPS16 support proper References: <5101086C.2000107@codesourcery.com> Date: Thu, 24 Jan 2013 13:56:00 -0000 In-Reply-To: (Maciej W. Rozycki's message of "Thu, 24 Jan 2013 13:13:36 +0000") Message-ID: <87wqv2n0qj.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00050.txt.bz2 "Maciej W. Rozycki" writes: > On Thu, 24 Jan 2013, Chung-Lin Tang wrote: > >> >> > -void >> >> > -__longjmp (env_arg, val_arg) >> >> > +static void __attribute__ ((nomips16)) >> >> > +____longjmp (env_arg, val_arg) >> >> > __jmp_buf env_arg; >> >> > int val_arg; >> >> > { >> >> > @@ -86,3 +86,5 @@ __longjmp (env_arg, val_arg) >> >> > /* Avoid `volatile function does return' warnings. */ >> >> > for (;;); >> >> > } >> >> > + >> >> > +strong_alias (____longjmp, __longjmp); >> > Why is the renaming / alias needed? >> > >> >> This was because the declaration of __longjmp() in setjmp.h prohibited >> us from tagging it directly with __attribute__ ((nomips16)) locally; >> there will be a declaration inconsistent with header error. > > Indeed, GCC goes through a great pain to enforce consistency between a > function's prototype and the corresponding definition as far as the mips16 > and nomips16 attributes are concerned. On the other hand it is possible > to provide a prototype with neither attribute and freely choose the > instruction encoding used for the definition with either of the -mips16 > and -mno-mips16 command line options applied when building the relevant > source file. > > I have no idea where this dichotomy comes from -- Richard, do you happen > to know? I'd be happy to get enlightened. As it happens, this very topic was raised on the GCC list recently: http://gcc.gnu.org/ml/gcc/2013-01/msg00133.html http://gcc.gnu.org/ml/gcc/2013-01/msg00229.html Richard