unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: guile-devel@gnu.org
Cc: wingo@igalia.com,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Subject: [PATCH, v2] Fix build on ia64
Date: Tue,  4 Feb 2020 14:14:43 +0100	[thread overview]
Message-ID: <20200204131442.3348684-1-glaubitz@physik.fu-berlin.de> (raw)

  * 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




             reply	other threads:[~2020-02-04 13:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 13:14 John Paul Adrian Glaubitz [this message]
2020-02-08 14:10 ` [PATCH, v2] Fix build on ia64 Ludovic Courtès
2020-02-08 15:24   ` John Paul Adrian Glaubitz
2020-02-09 13:32     ` Ludovic Courtès
2020-02-09 23:00       ` Stefan Monnier
2020-03-04 17:09       ` John Paul Adrian Glaubitz
2020-03-05 16:21         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200204131442.3348684-1-glaubitz@physik.fu-berlin.de \
    --to=glaubitz@physik.fu-berlin.de \
    --cc=guile-devel@gnu.org \
    --cc=wingo@igalia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).