diff options
author | Andy Wingo <wingo@pobox.com> | 2009-06-06 15:45:00 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-06-07 00:53:48 +0200 |
commit | 586cfdecfa4021e725287a02b57624418e597354 (patch) | |
tree | 50ce0db4be4867481948eb3c9f5d9b5fb4581362 /libguile/vm-i-loader.c | |
parent | 4bcc952d4500d484cc43df47e2f7d64e5bc14ff3 (diff) | |
download | guile-586cfdecfa4021e725287a02b57624418e597354.tar.gz |
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.
Diffstat (limited to 'libguile/vm-i-loader.c')
-rw-r--r-- | libguile/vm-i-loader.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 |