From 586cfdecfa4021e725287a02b57624418e597354 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sat, 6 Jun 2009 15:45:00 +0200 Subject: new instructions: make-int64, make-uint64 * doc/ref/vm.texi (Loading Instructions): Remove references to load-integer and load-unsigned-integer -- they're still in the VM but will be removed at some point. (Data Control Instructions): Add make-int64 and make-uint64. * libguile/vm-i-loader.c (load-unsigned-integer): Allow 8-byte values. But this instruction is on its way out, yo. * libguile/vm-i-system.c (make-int64, make-uint64): New instructions. * module/language/assembly.scm (object->assembly): Write out make-int64 and make-uint64 instructions, using bytevectors to do the endianness conversion. (assembly->object): And pretty-print them back, for disassembly. * module/language/glil/compile-assembly.scm: Don't generate load-integer / load-unsigned-integer instructions. --- libguile/vm-i-loader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libguile/vm-i-loader.c') diff --git a/libguile/vm-i-loader.c b/libguile/vm-i-loader.c index 50569e01a..e5bb35e6e 100644 --- a/libguile/vm-i-loader.c +++ b/libguile/vm-i-loader.c @@ -24,13 +24,13 @@ VM_DEFINE_LOADER (59, load_unsigned_integer, "load-unsigned-integer") size_t len; FETCH_LENGTH (len); - if (SCM_LIKELY (len <= 4)) + if (SCM_LIKELY (len <= 8)) { - unsigned int val = 0; + scm_t_uint64 val = 0; while (len-- > 0) val = (val << 8U) + FETCH (); SYNC_REGISTER (); - PUSH (scm_from_uint (val)); + PUSH (scm_from_uint64 (val)); NEXT; } else -- cgit v1.2.3