summaryrefslogtreecommitdiff
path: root/lib/sail.c
diff options
context:
space:
mode:
authorJon French2019-02-13 12:27:48 +0000
committerJon French2019-02-13 12:27:48 +0000
commitea39b3c674570ce5eea34067c36d5196ca201f83 (patch)
tree516e7491bc32797a4d0ac397ea47387f2b16cf1b /lib/sail.c
parentab3f3671d4dd682b2aee922d5a05e9455afd5849 (diff)
parent24fc989891ad266eae642815646294279e2485ca (diff)
Merge branch 'sail2' into rmem_interpreter
Diffstat (limited to 'lib/sail.c')
-rw-r--r--lib/sail.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/sail.c b/lib/sail.c
index 0fcb5d55..22cc5462 100644
--- a/lib/sail.c
+++ b/lib/sail.c
@@ -292,24 +292,26 @@ bool gteq(const mpz_t op1, const mpz_t op2)
return mpz_cmp(op1, op2) >= 0;
}
-inline
void shl_int(sail_int *rop, const sail_int op1, const sail_int op2)
{
mpz_mul_2exp(*rop, op1, mpz_get_ui(op2));
}
-inline
mach_int shl_mach_int(const mach_int op1, const mach_int op2)
{
return op1 << op2;
}
-inline
void shr_int(sail_int *rop, const sail_int op1, const sail_int op2)
{
mpz_fdiv_q_2exp(*rop, op1, mpz_get_ui(op2));
}
+mach_int shr_mach_int(const mach_int op1, const mach_int op2)
+{
+ return op1 >> op2;
+}
+
inline
void undefined_int(sail_int *rop, const int n)
{