diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/flow.sail | 3 | ||||
| -rw-r--r-- | lib/sail.c | 5 | ||||
| -rw-r--r-- | lib/sail.h | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/lib/flow.sail b/lib/flow.sail index dd917b55..a2f6ed55 100644 --- a/lib/flow.sail +++ b/lib/flow.sail @@ -63,4 +63,7 @@ overload __size = {__id} val __deref = "reg_deref" : forall ('a : Type). register('a) -> 'a effect {rreg} +/* Used to implement bitfield desugaring */ +val __bitfield_deref = "reg_deref" : forall ('a : Type). register('a) -> 'a effect pure + $endif @@ -323,6 +323,11 @@ void undefined_int(sail_int *rop, const int n) mpz_set_ui(*rop, (uint64_t) n); } +void undefined_nat(sail_int *rop, const unit u) +{ + mpz_set_ui(*rop, 0); +} + inline void undefined_range(sail_int *rop, const sail_int l, const sail_int u) { @@ -129,6 +129,7 @@ SAIL_INT_FUNCTION(shr_int, sail_int, const sail_int, const sail_int); * constraints. */ SAIL_INT_FUNCTION(undefined_int, sail_int, const int); +SAIL_INT_FUNCTION(undefined_nat, sail_int, const unit); SAIL_INT_FUNCTION(undefined_range, sail_int, const sail_int, const sail_int); /* |
