diff options
| author | Jon French | 2019-02-25 12:10:30 +0000 |
|---|---|---|
| committer | Jon French | 2019-02-25 12:10:30 +0000 |
| commit | 915d75f9c49fa2c2a9d47d189e4224cee16582c9 (patch) | |
| tree | 77a93e682796977898af0b56e0a61d7689db112e /lib | |
| parent | a8a5308e4981b3d09fb2bf0c59d592ef6ae4417e (diff) | |
| parent | 38656b50ad24df6a29f3a84e50adfcf409131fb0 (diff) | |
Merge branch 'sail2' into rmem_interpreter
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sail.c | 14 | ||||
| -rw-r--r-- | lib/sail.h | 3 |
2 files changed, 16 insertions, 1 deletions
@@ -1460,7 +1460,8 @@ void get_time_ns(sail_int *rop, const unit u) // ARM specific optimisations -void arm_align(lbits *rop, const lbits x_bv, const sail_int y_mpz) { +void arm_align(lbits *rop, const lbits x_bv, const sail_int y_mpz) +{ uint64_t x = mpz_get_ui(*x_bv.bits); uint64_t y = mpz_get_ui(y_mpz); uint64_t z = y * (x / y); @@ -1468,3 +1469,14 @@ void arm_align(lbits *rop, const lbits x_bv, const sail_int y_mpz) { mpz_set_ui(*rop->bits, safe_rshift(UINT64_MAX, 64l - (n - 1)) & z); rop->len = n; } + +// Monomorphisation +void make_the_value(sail_int *rop, const sail_int op) +{ + mpz_set(*rop, op); +} + +void size_itself_int(sail_int *rop, const sail_int op) +{ + mpz_set(*rop, op); +} @@ -153,6 +153,9 @@ SAIL_INT_FUNCTION(pow_int, sail_int, const sail_int, const sail_int); SAIL_INT_FUNCTION(pow2, sail_int, const sail_int); +void make_the_value(sail_int *, const sail_int); +void size_itself_int(sail_int *, const sail_int); + /* ***** Sail bitvectors ***** */ typedef uint64_t fbits; |
