From e5dc27b86d0eaa470f92cdaa9f4ed2a961338c49 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 26 Jul 2009 14:01:56 +0200 Subject: increase range of relative jumps by aligning blocks to 8-byte boundaries * libguile/objcodes.c (OBJCODE_COOKIE): Bump again, as our jump offsets are now multiplied by 8. * libguile/vm-i-system.c (BR): Interpret the 16-bit offset as a relative jump to the nearest 8-byte-aligned block -- increasing relative jump range from +/-32K to +/-240K. (mvra): Do the same for the mvra jump. * libguile/vm.c (really_make_boot_program): Align the mvra. * module/language/assembly.scm (align-block): New export, for aligning blocks. * module/language/assembly/compile-bytecode.scm (write-bytecode): Emit jumps to the nearest 8-byte-aligned block. Effectively our range is 18 bits in either direction. I would like to do this differently -- have long-br and long-br-if, and all the other br instructions go to 8 bits only. But the assembler doesn't have an appropriate representation to allow me to do this yet, so for now this is what we have. * module/language/assembly/decompile-bytecode.scm (decode-load-program): Decode the 19-bit jumps. --- libguile/objcodes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libguile/objcodes.c') diff --git a/libguile/objcodes.c b/libguile/objcodes.c index 728dd8d13..91691a70a 100644 --- a/libguile/objcodes.c +++ b/libguile/objcodes.c @@ -50,7 +50,7 @@ /* The objcode magic header. */ #define OBJCODE_COOKIE \ - "GOOF-0.8-" OBJCODE_ENDIANNESS "-" OBJCODE_WORD_SIZE "---" + "GOOF-0.9-" OBJCODE_ENDIANNESS "-" OBJCODE_WORD_SIZE "---" /* The length of the header must be a multiple of 8 bytes. */ verify (((sizeof (OBJCODE_COOKIE) - 1) & 7) == 0); -- cgit v1.2.3