summaryrefslogtreecommitdiff
path: root/language/bytecode.ott
diff options
context:
space:
mode:
authorJon French2018-12-28 15:12:00 +0000
committerJon French2018-12-28 15:12:00 +0000
commitb59fba68e535f39b6285ec7f4f693107b6e34148 (patch)
tree3135513ac4b23f96b41f3d521990f1ce91206c99 /language/bytecode.ott
parent9f6a95882e1d3d057bcb83d098ba1b63925a4d1f (diff)
parent2c887e7d01331d3165120695594eac7a2650ec03 (diff)
Merge branch 'sail2' into rmem_interpreter
Diffstat (limited to 'language/bytecode.ott')
-rw-r--r--language/bytecode.ott31
1 files changed, 17 insertions, 14 deletions
diff --git a/language/bytecode.ott b/language/bytecode.ott
index cbc60e52..d2580e8c 100644
--- a/language/bytecode.ott
+++ b/language/bytecode.ott
@@ -66,26 +66,28 @@ fragment :: 'F_' ::=
ctyp :: 'CT_' ::=
{{ com C type }}
- | mpz_t :: :: int
-% Arbitrary precision GMP integer, mpz_t in C. }}
- | bv_t ( bool ) :: :: bits
-% Variable length bitvector - flag represents direction, true - dec or false - inc }}
- | 'uint64_t' ( nat , bool ) :: :: bits64
+ | mpz_t :: :: int
+% Arbitrary precision GMP integer, mpz_t in C.
+ | bv_t ( bool ) :: :: lbits
+% Variable length bitvector - flag represents direction, true - dec or false - inc
+ | sbv_t ( bool ) :: :: sbits
+% Small variable length bitvector - less than 64 bits
+ | 'uint64_t' ( nat , bool ) :: :: fbits
% Fixed length bitvector that fits within a 64-bit word. - int
-% represents length, and flag is the same as CT_bv. }}
- | 'int64_t' :: :: int64
-% Used for (signed) integers that fit within 64-bits. }}
- | unit_t :: :: unit
+% represents length, and flag is the same as CT_bv.
+ | 'int64_t' :: :: int64
+% Used for (signed) integers that fit within 64-bits.
+ | unit_t :: :: unit
% unit is a value in sail, so we represent it as a one element type
% here too for clarity but we actually compile it to an int which is
% always 0.
- | bool_t :: :: bool
- | real_t :: :: real
- | bit_t :: :: bit
+ | bool_t :: :: bool
+ | real_t :: :: real
+ | bit_t :: :: bit
% The real type in sail. Abstract here, but implemented using either
% GMP rationals or high-precision floating point.
- | ( ctyp0 , ... , ctypn ) :: :: tup
- | string_t :: :: string
+ | ( ctyp0 , ... , ctypn ) :: :: tup
+ | string_t :: :: string
| enum id ( id0 , ... , idn ) :: :: enum
| struct id ( id0 * ctyp0 , ... , idn * ctypn ) :: :: struct
| variant id ( id0 * ctyp0 , ... , idn * ctypn ) :: :: variant
@@ -130,6 +132,7 @@ instr :: 'I_' ::=
| jump ( cval ) string :: :: jump
| clexp = bool id ( cval0 , ... , cvaln ) :: :: funcall
| clexp = cval :: :: copy
+ | alias clexp = cval :: :: alias
| clear ctyp id :: :: clear
| return cval :: :: return
| { instr0 ; ... ; instrn } :: :: block