summaryrefslogtreecommitdiff
path: root/libguile/vm.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-10-24 21:12:19 +0200
committerAndy Wingo <wingo@pobox.com>2017-10-24 21:12:19 +0200
commita7f9c32816f3569a60b088171a9a4313ed0dee70 (patch)
treecc044d866d36ef38b1ef5c0291f702dba5ed831c /libguile/vm.h
parent808000034e8be08e7fe34dbe5e35e56cf9ed4727 (diff)
downloadguile-a7f9c32816f3569a60b088171a9a4313ed0dee70.tar.gz
Add new-style test and branch instructions
* libguile/vm-engine.c (UNPACK_16_16): New definition. (u64=?, u64<?, s64=?, s64<?, f64=?, f64<?, =?, <?, arguments<?) (positional-arguments<=?, immediate-tag=?, heap-tag=?, eq?): New comparison instructions. (j, jl, je, jnl, jne, jge, jnge): New branch instructions.
Diffstat (limited to 'libguile/vm.h')
-rw-r--r--libguile/vm.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libguile/vm.h b/libguile/vm.h
index a1cac391f..d9e54309f 100644
--- a/libguile/vm.h
+++ b/libguile/vm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2017 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -35,10 +35,18 @@ enum {
#define SCM_VM_DEBUG_ENGINE 1
#define SCM_VM_NUM_ENGINES 2
+enum scm_compare {
+ SCM_F_COMPARE_NONE = 0x0,
+ SCM_F_COMPARE_EQUAL = 0x1,
+ SCM_F_COMPARE_LESS_THAN = 0x2,
+ SCM_F_COMPARE_INVALID = 0x3
+};
+
struct scm_vm {
scm_t_uint32 *ip; /* instruction pointer */
union scm_vm_stack_element *sp; /* stack pointer */
union scm_vm_stack_element *fp; /* frame pointer */
+ scm_t_uint8 compare_result; /* flags register: a value from scm_compare */
union scm_vm_stack_element *stack_limit; /* stack limit address */
int trace_level; /* traces enabled if trace_level > 0 */
union scm_vm_stack_element *sp_min_since_gc; /* deepest sp since last gc */