1 |
From 156119b0223cf14d335ebda84701a69b2ba95757 Mon Sep 17 00:00:00 2001 |
2 |
From: Mark H Weaver <mhw@netris.org> |
3 |
Date: Sat, 20 Sep 2014 03:49:46 -0400 |
4 |
Subject: [PATCH] Do not assume that 64-bit integers will be 64-bit aligned. |
5 |
|
6 |
* libguile/foreign.c (raw_bytecode, objcode_cells): |
7 |
* libguile/gsubr.c (raw_bytecode, objcode_cells): Use SCM_ALIGNED to |
8 |
ensure 64-bit alignment. |
9 |
|
10 |
--- libguile/foreign.c.orig 2014-01-21 21:20:53 UTC |
11 |
+++ libguile/foreign.c |
12 |
@@ -1,4 +1,4 @@ |
13 |
-/* Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc. |
14 |
+/* Copyright (C) 2010-2014 Free Software Foundation, Inc. |
15 |
* |
16 |
* This library is free software; you can redistribute it and/or |
17 |
* modify it under the terms of the GNU Lesser General Public License |
18 |
@@ -814,7 +814,7 @@ SCM_DEFINE (scm_pointer_to_procedure, "p |
19 |
|
20 |
static const struct |
21 |
{ |
22 |
- scm_t_uint64 dummy; /* ensure 8-byte alignment; perhaps there's a better way */ |
23 |
+ SCM_ALIGNED (8) scm_t_uint64 dummy; /* alignment */ |
24 |
const scm_t_uint8 bytes[10 * (sizeof (struct scm_objcode) + 8 |
25 |
+ sizeof (struct scm_objcode) + 32)]; |
26 |
} raw_bytecode = { |
27 |
@@ -867,7 +867,7 @@ make_objcode_trampoline (unsigned int na |
28 |
|
29 |
static const struct |
30 |
{ |
31 |
- scm_t_uint64 dummy; /* alignment */ |
32 |
+ SCM_ALIGNED (8) scm_t_uint64 dummy; /* alignment */ |
33 |
scm_t_cell cells[10 * 2]; /* 10 double cells */ |
34 |
} objcode_cells = { |
35 |
0, |
36 |
--- libguile/gsubr.c.orig 2012-07-02 09:28:13 UTC |
37 |
+++ libguile/gsubr.c |
38 |
@@ -1,4 +1,5 @@ |
39 |
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. |
40 |
+/* Copyright (C) 1995-2001, 2006, 2008-2011, |
41 |
+ * 2014 Free Software Foundation, Inc. |
42 |
* |
43 |
* This library is free software; you can redistribute it and/or |
44 |
* modify it under the terms of the GNU Lesser General Public License |
45 |
@@ -213,7 +214,7 @@ |
46 |
*/ |
47 |
static const struct |
48 |
{ |
49 |
- scm_t_uint64 dummy; /* ensure 8-byte alignment; perhaps there's a better way */ |
50 |
+ SCM_ALIGNED (8) scm_t_uint64 dummy; /* alignment */ |
51 |
const scm_t_uint8 bytes[121 * (sizeof (struct scm_objcode) + 16 |
52 |
+ sizeof (struct scm_objcode) + 32)]; |
53 |
} raw_bytecode = { |
54 |
@@ -317,7 +318,7 @@ static const struct |
55 |
|
56 |
static const struct |
57 |
{ |
58 |
- scm_t_uint64 dummy; /* alignment */ |
59 |
+ SCM_ALIGNED (8) scm_t_uint64 dummy; /* alignment */ |
60 |
scm_t_cell cells[121 * 2]; /* 11*11 double cells */ |
61 |
} objcode_cells = { |
62 |
0, |