summaryrefslogtreecommitdiff
path: root/lib/sail.h
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-09-04 17:46:07 +0100
committerAlasdair Armstrong2018-09-04 18:39:10 +0100
commit734e23d5f0bfc6fcd2a723bc0c692b97e515088e (patch)
tree71294056ad125a7f8ae7f9200e6884d921ee933c /lib/sail.h
parentb37cf873f5bb23ccee29fc6a0f06374fdf88b058 (diff)
C: Tweaks to RISC-V to get compiling to C
Revert a change to string_of_bits because it broke all the RISC-V tests in OCaml. string_of_int (int_of_string x) is not valid because x may not fit within an integer.
Diffstat (limited to 'lib/sail.h')
-rw-r--r--lib/sail.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sail.h b/lib/sail.h
index 8533cd21..57897957 100644
--- a/lib/sail.h
+++ b/lib/sail.h
@@ -150,6 +150,7 @@ SAIL_INT_FUNCTION(undefined_range, sail_int, const sail_int, const sail_int);
*/
SAIL_INT_FUNCTION(add_int, sail_int, const sail_int, const sail_int);
SAIL_INT_FUNCTION(sub_int, sail_int, const sail_int, const sail_int);
+SAIL_INT_FUNCTION(sub_nat, sail_int, const sail_int, const sail_int);
SAIL_INT_FUNCTION(mult_int, sail_int, const sail_int, const sail_int);
SAIL_INT_FUNCTION(tdiv_int, sail_int, const sail_int, const sail_int);
SAIL_INT_FUNCTION(tmod_int, sail_int, const sail_int, const sail_int);
@@ -162,6 +163,8 @@ SAIL_INT_FUNCTION(min_int, sail_int, const sail_int, const sail_int);
SAIL_INT_FUNCTION(neg_int, sail_int, const sail_int);
SAIL_INT_FUNCTION(abs_int, sail_int, const sail_int);
+SAIL_INT_FUNCTION(pow_int, sail_int, const sail_int, const sail_int);
+
SAIL_INT_FUNCTION(pow2, sail_int, const sail_int);
/* ***** Sail bitvectors ***** */