freebsd itanium support
authorAndy Wingo <wingo@pobox.com>
Thu, 22 Dec 2011 15:30:45 +0000 (10:30 -0500)
committerAndy Wingo <wingo@pobox.com>
Thu, 22 Dec 2011 15:30:45 +0000 (10:30 -0500)
* libguile/threads.c (scm_ia64_register_backing_store_base)
  (scm_ia64_ar_bsp): Provide implementation of these itanium helpers on
  freebsd.  Thanks to Jim Pryor.

libguile/threads.c

index 9a6e406..3d98e5e 100644 (file)
@@ -2228,6 +2228,21 @@ scm_ia64_ar_bsp (const void *opaque)
   return (void *) ctx->uc_mcontext.sc_ar_bsp;
 }
 # endif /* linux */
+# ifdef __FreeBSD__
+#  include <ucontext.h>
+void *
+scm_ia64_register_backing_store_base (void)
+{
+  return (void *)0x8000000000000000;
+}
+void *
+scm_ia64_ar_bsp (const void *opaque)
+{
+  const ucontext_t *ctx = opaque;
+  return (void *)(ctx->uc_mcontext.mc_special.bspstore
+                  + ctx->uc_mcontext.mc_special.ndirty);
+}
+# endif /* __FreeBSD__ */
 #endif /* __ia64__ */