1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-09 15:10:29 +02:00

Add FIXMEs about misaligned objcode-metas.

* libguile/objcodes.c (scm_c_make_objcode_slice): Add comment about
  misaligned `objcode-meta'.

* module/language/assembly/compile-bytecode.scm (write-bytecode):
  Likewise.
This commit is contained in:
Ludovic Courtès 2009-07-15 23:53:22 +02:00
parent 5bd047cefa
commit ec99fe8ecb
2 changed files with 9 additions and 0 deletions

View file

@ -138,6 +138,12 @@ 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);
#endif
data = (struct scm_objcode*)ptr;
if (data->base + data->len + data->metalen > parent_data->base + parent_data->len + parent_data->metalen)
abort ();