From 7698300cfe2d3f944ce2e1d4a60a263620487718 Mon Sep 17 00:00:00 2001 From: xleroy Date: Fri, 20 Dec 2013 13:05:53 +0000 Subject: Merge of branch value-analysis. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2381 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- lib/Integers.v | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/Integers.v') diff --git a/lib/Integers.v b/lib/Integers.v index cbbf28c7..d85007b4 100644 --- a/lib/Integers.v +++ b/lib/Integers.v @@ -2454,6 +2454,19 @@ Proof. generalize wordsize_pos; generalize wordsize_max_unsigned; omega. Qed. +Theorem ror_rol_neg: + forall x y, (zwordsize | modulus) -> ror x y = rol x (neg y). +Proof. + intros. apply same_bits_eq; intros. + rewrite bits_ror by auto. rewrite bits_rol by auto. + f_equal. apply eqmod_mod_eq. omega. + apply eqmod_trans with (i - (- unsigned y)). + apply eqmod_refl2; omega. + apply eqmod_sub. apply eqmod_refl. + apply eqmod_divides with modulus. + apply eqm_unsigned_repr. auto. +Qed. + Theorem or_ror: forall x y z, ltu y iwordsize = true -> -- cgit