From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: John Paul Adrian Glaubitz Newsgroups: gmane.lisp.guile.devel Subject: [PATCH, v2] Fix build on ia64 Date: Tue, 4 Feb 2020 14:14:43 +0100 Message-ID: <20200204131442.3348684-1-glaubitz@physik.fu-berlin.de> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="105800"; mail-complaints-to="usenet@ciao.gmane.io" Cc: wingo@igalia.com, John Paul Adrian Glaubitz To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Feb 04 14:18:29 2020 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iyy60-000RNb-NC for guile-devel@m.gmane-mx.org; Tue, 04 Feb 2020 14:18:28 +0100 Original-Received: from localhost ([::1]:58238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyy5z-0007hJ-NK for guile-devel@m.gmane-mx.org; Tue, 04 Feb 2020 08:18:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45502) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyy5O-0007dQ-Gb for guile-devel@gnu.org; Tue, 04 Feb 2020 08:17:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyy5L-0003SV-KX for guile-devel@gnu.org; Tue, 04 Feb 2020 08:17:50 -0500 Original-Received: from outpost17.zedat.fu-berlin.de ([130.133.4.110]:41123) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iyy5L-0003Hv-8c for guile-devel@gnu.org; Tue, 04 Feb 2020 08:17:47 -0500 Original-Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by outpost.zedat.fu-berlin.de (Exim 4.85) with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (envelope-from ) id <1iyy5J-000gux-3O>; Tue, 04 Feb 2020 14:17:45 +0100 Original-Received: from z6.physik.fu-berlin.de ([160.45.32.137] helo=z6) by relay1.zedat.fu-berlin.de (Exim 4.85) with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (envelope-from ) id <1iyy5J-000oMb-19>; Tue, 04 Feb 2020 14:17:45 +0100 Original-Received: from glaubitz by z6 with local (Exim 4.93) (envelope-from ) id 1iyy3r-00E3Eo-7Y; Tue, 04 Feb 2020 14:16:15 +0100 X-Mailer: git-send-email 2.25.0 X-Originating-IP: 160.45.32.137 X-ZEDAT-Hint: RV X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 130.133.4.110 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20386 Archived-At: * libguile/continuations.c (capture_auxiliary_stack): Fix logic in preprocessor code when checking for ia64 host; fix dereferencing of ctx variable. * libguile/threads.h (struct scm_thread): Add missing member SCM_STACKITEM *auxiliary_stack_base. --- libguile/continuations.c | 6 +++--- libguile/threads.h | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) v2: - Make declaration of SCM_STACKITEM *auxiliary_stack_base conditional, i.e. only for SCM_HAVE_AUXILIARY_STACK. diff --git a/libguile/continuations.c b/libguile/continuations.c index 67a47d38c..b8b6e1dca 100644 --- a/libguile/continuations.c +++ b/libguile/continuations.c @@ -143,7 +143,7 @@ static void capture_auxiliary_stack (scm_thread *thread, scm_t_contregs *continuation) { #if SCM_HAVE_AUXILIARY_STACK -# if !(defined __ia64 or defined __ia64__) +# if !defined __ia64 || !defined __ia64__ # error missing auxiliary stack implementation for architecture # endif char *top; @@ -155,9 +155,9 @@ capture_auxiliary_stack (scm_thread *thread, scm_t_contregs *continuation) #if defined __hpux __uc_get_ar_bsp (ctx, (uint64_t *) &top); #elif defined linux - top = (char *) ctx->uc_mcontext.sc_ar_bsp; + top = (char *) ctx.uc_mcontext.sc_ar_bsp; #elif defined __FreeBSD__ - top = (char *)(ctx->uc_mcontext.mc_special.bspstore + top = (char *)(ctx.uc_mcontext.mc_special.bspstore + ctx->uc_mcontext.mc_special.ndirty); #else #error missing auxiliary stack implementation for ia64 on this OS diff --git a/libguile/threads.h b/libguile/threads.h index 337dc83a9..e6a60e96b 100644 --- a/libguile/threads.h +++ b/libguile/threads.h @@ -118,6 +118,11 @@ struct scm_thread { /* Stack base. Used when checking for C stack overflow. */ SCM_STACKITEM *base; +#if SCM_HAVE_AUXILIARY_STACK + /* Auxiliary stack base. */ + SCM_STACKITEM *auxiliary_stack_base; +#endif + /* JIT state; NULL until this thread needs to JIT-compile something. */ struct scm_jit_state *jit_state; }; -- 2.25.0