From: Taylor R Campbell Date: Sun, 20 Jan 2019 00:18:55 +0000 (+0000) Subject: Fix read/write_compiled_closure_target offsets. X-Git-Tag: mit-scheme-pucked-10.1.20~11^2~66^2~53 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a16a8679c577b1a5f754fe0b18b95b5580263bb3;p=mit-scheme.git Fix read/write_compiled_closure_target offsets. --- diff --git a/src/microcode/cmpintmd/aarch64.c b/src/microcode/cmpintmd/aarch64.c index 61f267263..4ec526ede 100644 --- a/src/microcode/cmpintmd/aarch64.c +++ b/src/microcode/cmpintmd/aarch64.c @@ -125,7 +125,7 @@ start_closure_relocation (SCHEME_OBJECT * scan, reloc_ref_t * ref) insn_t * read_compiled_closure_target (insn_t * start, reloc_ref_t * ref) { - insn_t * addr = (start + CC_ENTRY_HEADER_SIZE); + insn_t * addr = (start + CC_ENTRY_PADDING_SIZE + CC_ENTRY_HEADER_SIZE); insn_t * base = (tospace_to_newspace (addr)); /* If we're relocating, find where base was in the oldspace. */ if (ref) @@ -143,7 +143,7 @@ read_compiled_closure_target (insn_t * start, reloc_ref_t * ref) void write_compiled_closure_target (insn_t * target, insn_t * start) { - insn_t * addr = (start + CC_ENTRY_HEADER_SIZE); + insn_t * addr = (start + CC_ENTRY_PADDING_SIZE + CC_ENTRY_HEADER_SIZE); (((int64_t *) addr)[-1]) = (target - ((insn_t *) (tospace_to_newspace (addr)))); }