mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-11 08:10:21 +02:00
fix a failure to sync regs in vm bytevector ops
* libguile/vm-i-scheme.c (BV_SET_WITH_ENDIANNESS, BV_FIXABLE_INT_SET) (BV_INT_SET, BV_FLOAT_SET): Sync registers before dispatching to the C function.
This commit is contained in:
parent
8099352769
commit
ad301b6d58
1 changed files with 32 additions and 22 deletions
|
@ -821,6 +821,7 @@ BV_FLOAT_REF (f64, ieee_double, double, 8)
|
|||
goto VM_LABEL (bv_##stem##_native_set); \
|
||||
{ \
|
||||
SCM bv, idx, val; POP (val); POP (idx); POP (bv); \
|
||||
SYNC_REGISTER (); \
|
||||
scm_bytevector_##fn_stem##_set_x (bv, idx, val, endianness); \
|
||||
NEXT; \
|
||||
} \
|
||||
|
@ -865,7 +866,10 @@ BV_SET_WITH_ENDIANNESS (f64, ieee_double)
|
|||
&& (j <= max))) \
|
||||
*int_ptr = (scm_t_ ## type) j; \
|
||||
else \
|
||||
{ \
|
||||
SYNC_REGISTER (); \
|
||||
scm_bytevector_ ## fn_stem ## _set_x (bv, idx, val); \
|
||||
} \
|
||||
NEXT; \
|
||||
}
|
||||
|
||||
|
@ -886,7 +890,10 @@ BV_SET_WITH_ENDIANNESS (f64, ieee_double)
|
|||
&& (ALIGNED_P (int_ptr, scm_t_ ## type)))) \
|
||||
*int_ptr = scm_to_ ## type (val); \
|
||||
else \
|
||||
{ \
|
||||
SYNC_REGISTER (); \
|
||||
scm_bytevector_ ## stem ## _native_set_x (bv, idx, val); \
|
||||
} \
|
||||
NEXT; \
|
||||
}
|
||||
|
||||
|
@ -907,7 +914,10 @@ BV_SET_WITH_ENDIANNESS (f64, ieee_double)
|
|||
&& (ALIGNED_P (float_ptr, type)))) \
|
||||
*float_ptr = scm_to_double (val); \
|
||||
else \
|
||||
{ \
|
||||
SYNC_REGISTER (); \
|
||||
scm_bytevector_ ## fn_stem ## _native_set_x (bv, idx, val); \
|
||||
} \
|
||||
NEXT; \
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue