aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kvx/SelectOpproof.v34
1 files changed, 33 insertions, 1 deletions
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.