unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Rob Browning <rlb@defaultvalue.org>
To: bug-guile@gnu.org
Cc: Thorsten Glaser <tg@mirbsd.de>,
	649718@bugs.debian.org, 649718-forwarded@bugs.debian.org
Subject: Bug#649718: Issues with alignment and m68k register naming
Date: Sat, 13 Sep 2014 13:37:42 -0500	[thread overview]
Message-ID: <87bnqjz7rd.fsf@trouble.defaultvalue.org> (raw)
In-Reply-To: <Pine.BSM.4.64L.1405121942080.21175@herc.mirbsd.org>

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

[If possible, please preserve the -forwarded address in any replies.]

This was reported to Debian a bit back, and I thought it might be
appropriate for consideration upstream.

Further details can be found here:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649718

And here's a standalone version of the patch from the debdiff there:


[-- Attachment #2: fix-alignment-and-m68k-register.diff --]
[-- Type: text/x-diff, Size: 1802 bytes --]

From schwab@linux-m68k.org Mon May 12 18:37:51 2014
From: Andreas Schwab <schwab@linux-m68k.org>
Message-ID: <87y4y7uf4y.fsf@igel.home>
To: Thorsten Glaser <t.glaser@tarent.de>
Cc: Manoj Srivastava <srivasta@debian.org>, debian-68k@lists.debian.org
Date: Mon, 12 May 2014 18:37:49 +0200
X-Original-Subject: Re: Guile language support in make
Subject: Fix alignment and registers for m68k

Fix bogus alignment assumptions (on some architectures, “natural”
alignment is not used, which means even an uint64_t is possibly
unaligned, or aligned to only a 2 byte (m68k) or 4 byte boundary).

Also, fix register name for m68k.
--

Thorsten Glaser <t.glaser@tarent.de> writes:

> and the guile-2.0 Build-Depends on m68k because guile does not
> work there (and nobody appears capable enough to debug it)?

--- a/libguile/gsubr.c
+++ b/libguile/gsubr.c
@@ -213,7 +213,7 @@
 */
 static const struct
 {
-  scm_t_uint64 dummy; /* ensure 8-byte alignment; perhaps there's a better way */
+  scm_t_uint64 dummy SCM_ALIGNED (sizeof (scm_t_uint64)); /* ensure 8-byte alignment; perhaps there's a better way */
   const scm_t_uint8 bytes[121 * (sizeof (struct scm_objcode) + 16
                                  + sizeof (struct scm_objcode) + 32)];
 } raw_bytecode = {
@@ -317,7 +317,7 @@ static const struct
 
 static const struct
 {
-  scm_t_uint64 dummy; /* alignment */
+  scm_t_uint64 dummy SCM_ALIGNED (sizeof (scm_t_uint64)); /* alignment */
   scm_t_cell cells[121 * 2]; /* 11*11 double cells */
 } objcode_cells = {
   0,
--- a/libguile/vm-engine.h
+++ b/libguile/vm-engine.h
@@ -74,7 +74,7 @@
 #define FP_REG asm("%r16")
 #endif
 #ifdef __mc68000__
-#define IP_REG asm("a5")
+#define IP_REG asm("a3")
 #define SP_REG asm("a4")
 #define FP_REG
 #endif

[-- Attachment #3: Type: text/plain, Size: 198 bytes --]


-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

       reply	other threads:[~2014-09-13 18:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <878uq9xfg8.fsf@glaurung.internal.golden-gryphon.com>
     [not found] ` <20140511104318.GA23754@bongo.bofh.it>
     [not found]   ` <87a9anwfzq.fsf@glaurung.internal.golden-gryphon.com>
     [not found]     ` <alpine.DEB.2.10.1405121314530.25316@tglase.lan.tarent.de>
     [not found]       ` <87y4y7uf4y.fsf@igel.home>
     [not found]         ` <Pine.BSM.4.64L.1405121942080.21175@herc.mirbsd.org>
2014-09-13 18:37           ` Rob Browning [this message]
2014-09-20 12:52             ` bug#18468: Issues with alignment and m68k register naming Mark H Weaver

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=87bnqjz7rd.fsf@trouble.defaultvalue.org \
    --to=rlb@defaultvalue.org \
    --cc=649718-forwarded@bugs.debian.org \
    --cc=649718@bugs.debian.org \
    --cc=bug-guile@gnu.org \
    --cc=tg@mirbsd.de \
    /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).