mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 06:20:23 +02:00
Do not assume that 64-bit integers will be 64-bit aligned.
* libguile/foreign.c (raw_bytecode, objcode_cells): * libguile/gsubr.c (raw_bytecode, objcode_cells): Use SCM_ALIGNED to ensure 64-bit alignment.
This commit is contained in:
parent
a85c78ea13
commit
156119b022
2 changed files with 7 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
|
/* Copyright (C) 2010-2014 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
@ -814,7 +814,7 @@ SCM_DEFINE (scm_pointer_to_procedure, "pointer->procedure", 3, 0, 0,
|
||||||
|
|
||||||
static const struct
|
static const struct
|
||||||
{
|
{
|
||||||
scm_t_uint64 dummy; /* ensure 8-byte alignment; perhaps there's a better way */
|
SCM_ALIGNED (8) scm_t_uint64 dummy; /* alignment */
|
||||||
const scm_t_uint8 bytes[10 * (sizeof (struct scm_objcode) + 8
|
const scm_t_uint8 bytes[10 * (sizeof (struct scm_objcode) + 8
|
||||||
+ sizeof (struct scm_objcode) + 32)];
|
+ sizeof (struct scm_objcode) + 32)];
|
||||||
} raw_bytecode = {
|
} raw_bytecode = {
|
||||||
|
@ -867,7 +867,7 @@ make_objcode_trampoline (unsigned int nargs)
|
||||||
|
|
||||||
static const struct
|
static const struct
|
||||||
{
|
{
|
||||||
scm_t_uint64 dummy; /* alignment */
|
SCM_ALIGNED (8) scm_t_uint64 dummy; /* alignment */
|
||||||
scm_t_cell cells[10 * 2]; /* 10 double cells */
|
scm_t_cell cells[10 * 2]; /* 10 double cells */
|
||||||
} objcode_cells = {
|
} objcode_cells = {
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
/* Copyright (C) 1995-2001, 2006, 2008-2011,
|
||||||
|
* 2014 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
@ -213,7 +214,7 @@
|
||||||
*/
|
*/
|
||||||
static const struct
|
static const struct
|
||||||
{
|
{
|
||||||
scm_t_uint64 dummy; /* ensure 8-byte alignment; perhaps there's a better way */
|
SCM_ALIGNED (8) scm_t_uint64 dummy; /* alignment */
|
||||||
const scm_t_uint8 bytes[121 * (sizeof (struct scm_objcode) + 16
|
const scm_t_uint8 bytes[121 * (sizeof (struct scm_objcode) + 16
|
||||||
+ sizeof (struct scm_objcode) + 32)];
|
+ sizeof (struct scm_objcode) + 32)];
|
||||||
} raw_bytecode = {
|
} raw_bytecode = {
|
||||||
|
@ -317,7 +318,7 @@ static const struct
|
||||||
|
|
||||||
static const struct
|
static const struct
|
||||||
{
|
{
|
||||||
scm_t_uint64 dummy; /* alignment */
|
SCM_ALIGNED (8) scm_t_uint64 dummy; /* alignment */
|
||||||
scm_t_cell cells[121 * 2]; /* 11*11 double cells */
|
scm_t_cell cells[121 * 2]; /* 11*11 double cells */
|
||||||
} objcode_cells = {
|
} objcode_cells = {
|
||||||
0,
|
0,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue