1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Attempt to guarantee 8-byte alignment of on-stack frame objects.

* libguile/vm.c (vm_dispatch_hook): Make FRAME a union with a `double'
  member.
This commit is contained in:
Ludovic Courtès 2010-05-07 15:59:50 +02:00
parent 36b5e39407
commit b79ba0b01e

View file

@ -186,7 +186,11 @@ vm_dispatch_hook (SCM vm, int hook_num)
struct scm_vm *vp;
SCM hook;
struct scm_frame c_frame;
scm_t_cell frame;
union
{
double alignment;
scm_t_cell cell;
} frame;
SCM args[1];
vp = SCM_VM_DATA (vm);
@ -211,8 +215,8 @@ vm_dispatch_hook (SCM vm, int hook_num)
c_frame.sp = vp->sp;
c_frame.ip = vp->ip;
c_frame.offset = 0;
frame.word_0 = SCM_PACK (scm_tc7_frame);
frame.word_1 = PTR2SCM (&c_frame);
frame.cell.word_0 = SCM_PACK (scm_tc7_frame);
frame.cell.word_1 = PTR2SCM (&c_frame);
args[0] = PTR2SCM (&frame);
scm_c_run_hookn (hook, args, 1);