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] Fix build on ia64 Date: Tue, 4 Feb 2020 13:41:31 +0100 Message-ID: <20200204124130.3341801-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="53409"; 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 13:43:23 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 1iyxY3-000Dmo-Ov for guile-devel@m.gmane-mx.org; Tue, 04 Feb 2020 13:43:23 +0100 Original-Received: from localhost ([::1]:57578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyxY2-0005ZM-H1 for guile-devel@m.gmane-mx.org; Tue, 04 Feb 2020 07:43:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47150) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyxXq-0005Z4-7A for guile-devel@gnu.org; Tue, 04 Feb 2020 07:43:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyxXp-0001IB-2c for guile-devel@gnu.org; Tue, 04 Feb 2020 07:43:10 -0500 Original-Received: from outpost17.zedat.fu-berlin.de ([130.133.4.110]:43363) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iyxXo-0001GJ-TD for guile-devel@gnu.org; Tue, 04 Feb 2020 07:43:09 -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 <1iyxXm-000Qz9-T5>; Tue, 04 Feb 2020 13:43:06 +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 <1iyxXm-000Xpr-Qk>; Tue, 04 Feb 2020 13:43:06 +0100 Original-Received: from glaubitz by z6 with local (Exim 4.93) (envelope-from ) id 1iyxWM-00E1NG-0k; Tue, 04 Feb 2020 13:41:38 +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:20385 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 | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) 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..a5de6c7b2 100644 --- a/libguile/threads.h +++ b/libguile/threads.h @@ -118,6 +118,9 @@ struct scm_thread { /* Stack base. Used when checking for C stack overflow. */ SCM_STACKITEM *base; + /* Auxiliary stack base. */ + SCM_STACKITEM *auxiliary_stack_base; + /* JIT state; NULL until this thread needs to JIT-compile something. */ struct scm_jit_state *jit_state; }; -- 2.25.0