summaryrefslogtreecommitdiff
path: root/mips
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-08-14 16:48:45 +0100
committerAlasdair Armstrong2018-08-14 16:48:45 +0100
commit174be06c6d0a2615e66123bf266c73dca2017144 (patch)
treea51d4574426cede94b7fc52e55ffb646b17d1e94 /mips
parent28c720774861d038fb7bbed8e1b3bedc757119e4 (diff)
parent342cd6a5a02b0478d37f8cc25410106d2846d5b2 (diff)
Merge remote-tracking branch 'origin/sail2' into polymorphic_variants
Diffstat (limited to 'mips')
-rw-r--r--mips/mips_extras.v11
1 files changed, 10 insertions, 1 deletions
diff --git a/mips/mips_extras.v b/mips/mips_extras.v
index 6a6aed5c..626b4109 100644
--- a/mips/mips_extras.v
+++ b/mips/mips_extras.v
@@ -143,7 +143,7 @@ Definition euclid_modulo (m n : Z) `{ArithFact (n > 0)} : {z : Z & ArithFact (0
refine (existT _ (ZEuclid.modulo m n) _).
constructor.
destruct H.
-assert (Zabs n = n). { rewrite Zabs_eq; auto with zarith. }
+assert (Z.abs n = n). { rewrite Z.abs_eq; auto with zarith. }
rewrite <- H at 3.
lapply (ZEuclid.mod_always_pos m n); omega.
Qed.
@@ -160,3 +160,12 @@ Definition prerr_string (_:string) : unit := tt.
Definition putchar {T} (_:T) : unit := tt.
Require DecimalString.
Definition string_of_int z := DecimalString.NilZero.string_of_int (Z.to_int z).
+
+
+Lemma MEMr_wrapper_lemma : forall size : Z, 8 * size = 8 * (8 * size รท 8).
+intros.
+rewrite Z.mul_comm.
+rewrite Z.quot_mul; auto with zarith.
+Qed.
+Hint Resolve MEMr_wrapper_lemma : sail.
+