From a2c2d9e37cacd7c09401025ed5cf5e8afd7b88c0 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Mon, 27 Sep 2021 14:55:33 +0200 Subject: more cases detected --- kvx/SelectOpproof.v | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'kvx/SelectOpproof.v') diff --git a/kvx/SelectOpproof.v b/kvx/SelectOpproof.v index 392e1077..1d9f3f91 100644 --- a/kvx/SelectOpproof.v +++ b/kvx/SelectOpproof.v @@ -840,7 +840,39 @@ Proof. simpl. lia. * apply DEFAULT. - + apply DEFAULT. + + clear Risbitfield. + clear zstop. + set (zstop := (int_highest_bit nmask)). + destruct (is_bitfield _ _) eqn:Risbitfield. + ++ destruct (and_dec _ _) as [[Rmask Rnmask] | ]. + * subst y. subst x. + TrivialExists. simpl. f_equal. + rewrite Val.or_commut. + unfold insf. + rewrite Risbitfield. + rewrite Rmask. + rewrite Rnmask. + simpl. + unfold bitfield_mask. + subst zstart. + rewrite (Val.or_commut (Val.and v0 _)). + rewrite (Val.or_commut (Val.and v0 _)). + destruct v1; simpl; trivial. + unfold Int.ltu, Int.iwordsize, Int.zwordsize. + rewrite Int.unsigned_repr. + ** rewrite Int.unsigned_repr. + *** simpl. + rewrite Int.shl_zero. + reflexivity. + *** simpl. + unfold Int.max_unsigned, Int.modulus. + simpl. + lia. + ** unfold Int.max_unsigned, Int.modulus. + simpl. + lia. + * apply DEFAULT. + ++ apply DEFAULT. - apply DEFAULT. Qed. -- cgit