diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-12-21 15:22:18 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-12-21 15:22:18 +0000 |
commit | 43974a1651612a8dcfde280652346ee54abffd0a (patch) | |
tree | 9ce625783f22311079da1b57b99d1893d7436d3e /common | |
parent | d4fe268a416d5b5be6d39a286e06638069390ac5 (diff) |
Integers: specialized function to compute x mod 2^N; used in "repr" to
avoid the cost of a general Zmod.
Memdata: updated accordingly.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2077 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'common')
-rw-r--r-- | common/Memdata.v | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/Memdata.v b/common/Memdata.v index 611a32b..5f06d2c 100644 --- a/common/Memdata.v +++ b/common/Memdata.v @@ -189,7 +189,8 @@ Opaque Byte.wordsize. rewrite inj_S. simpl. replace (Zsucc (Z_of_nat n) * 8) with (Z_of_nat n * 8 + 8) by omega. rewrite two_p_is_exp; try omega. - rewrite Zmod_recombine. rewrite IHn. rewrite Zplus_comm. reflexivity. + rewrite Zmod_recombine. rewrite IHn. rewrite Zplus_comm. + rewrite Byte.Z_mod_two_p_eq. reflexivity. apply two_p_gt_ZERO. omega. apply two_p_gt_ZERO. omega. Qed. |