From 43974a1651612a8dcfde280652346ee54abffd0a Mon Sep 17 00:00:00 2001 From: xleroy Date: Fri, 21 Dec 2012 15:22:18 +0000 Subject: 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 --- common/Memdata.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common') 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. -- cgit v1.2.3