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:
parent
36b5e39407
commit
b79ba0b01e
1 changed files with 7 additions and 3 deletions
|
@ -186,7 +186,11 @@ vm_dispatch_hook (SCM vm, int hook_num)
|
||||||
struct scm_vm *vp;
|
struct scm_vm *vp;
|
||||||
SCM hook;
|
SCM hook;
|
||||||
struct scm_frame c_frame;
|
struct scm_frame c_frame;
|
||||||
scm_t_cell frame;
|
union
|
||||||
|
{
|
||||||
|
double alignment;
|
||||||
|
scm_t_cell cell;
|
||||||
|
} frame;
|
||||||
SCM args[1];
|
SCM args[1];
|
||||||
|
|
||||||
vp = SCM_VM_DATA (vm);
|
vp = SCM_VM_DATA (vm);
|
||||||
|
@ -211,8 +215,8 @@ vm_dispatch_hook (SCM vm, int hook_num)
|
||||||
c_frame.sp = vp->sp;
|
c_frame.sp = vp->sp;
|
||||||
c_frame.ip = vp->ip;
|
c_frame.ip = vp->ip;
|
||||||
c_frame.offset = 0;
|
c_frame.offset = 0;
|
||||||
frame.word_0 = SCM_PACK (scm_tc7_frame);
|
frame.cell.word_0 = SCM_PACK (scm_tc7_frame);
|
||||||
frame.word_1 = PTR2SCM (&c_frame);
|
frame.cell.word_1 = PTR2SCM (&c_frame);
|
||||||
args[0] = PTR2SCM (&frame);
|
args[0] = PTR2SCM (&frame);
|
||||||
|
|
||||||
scm_c_run_hookn (hook, args, 1);
|
scm_c_run_hookn (hook, args, 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue