mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 23:50:19 +02:00
Uncomment run-time objcode alignment check.
This should now work thanks to the changes in28b119ee3d
("make sure all programs are 8-byte aligned"). This commit is a follow-up toec99fe8ecb
("Add FIXMEs about misaligned objcode-metas."). * libguile/objcodes.c (scm_c_make_objcode_slice): Uncomment assertion that checks for proper alignment of PTR. * module/language/assembly/compile-bytecode.scm (write-bytecode): Update comment about META's alignment.
This commit is contained in:
parent
b3ce13b667
commit
e3c9c676ae
2 changed files with 7 additions and 7 deletions
|
@ -119,10 +119,10 @@ scm_c_make_objcode_slice (SCM parent, const scm_t_uint8 *ptr)
|
|||
scm_from_uint32 (parent_data->len),
|
||||
scm_from_uint32 (parent_data->metalen)));
|
||||
|
||||
#if 0
|
||||
/* FIXME: We currently generate bytecode where the objcode-meta isn't
|
||||
suitable aligned, which is an issue on some arches (e.g., SPARC). */
|
||||
assert ((((uintptr_t) ptr) & (__alignof__ (struct scm_objcode) - 1UL)) == 0);
|
||||
#ifdef __GNUC__ /* we need `__alignof__' */
|
||||
/* Make sure bytecode for the objcode-meta is suitable aligned. Failing to
|
||||
do so leads to SIGBUS/SIGSEGV on some arches (e.g., SPARC). */
|
||||
assert ((((scm_t_bits) ptr) & (__alignof__ (struct scm_objcode) - 1UL)) == 0);
|
||||
#endif
|
||||
|
||||
data = (struct scm_objcode*)ptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue