From 11018c3d46845722daf73883ce3959afdd6ac92f Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Tue, 2 Feb 2021 16:34:28 +0100 Subject: Cmov Tsingle --- riscV/SelectOpproof.v | 59 +++++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 33 deletions(-) (limited to 'riscV/SelectOpproof.v') diff --git a/riscV/SelectOpproof.v b/riscV/SelectOpproof.v index c313fbaf..1fe4e662 100644 --- a/riscV/SelectOpproof.v +++ b/riscV/SelectOpproof.v @@ -943,50 +943,43 @@ Proof. destruct Archi.ptr64 eqn:PTR64. 2: discriminate. destruct ty; cbn in *; try discriminate. - - inv H. TrivialExists. - + cbn. constructor. - { econstructor. - { constructor. - { econstructor. eassumption. cbn. rewrite H3. reflexivity. } - constructor. econstructor. constructor. eassumption. - constructor. cbn. reflexivity. - constructor. econstructor. constructor. eassumption. constructor. - cbn. reflexivity. constructor. - } - constructor. - } - constructor. + - (* Tint *) + inv H. TrivialExists. + + cbn. repeat econstructor; eassumption. + cbn. f_equal. rewrite ExtValues.normalize_select01. - destruct b. + rewrite H3. destruct b. * rewrite ExtValues.select01_long_true. apply normalize_low_long; assumption. * rewrite ExtValues.select01_long_false. apply normalize_low_long; assumption. - - inv H. TrivialExists. - + cbn. constructor. - { econstructor. - { constructor. - { econstructor. eassumption. cbn. rewrite H3. reflexivity. } - constructor. econstructor. constructor. eassumption. - constructor. cbn. reflexivity. - constructor. econstructor. constructor. eassumption. constructor. - cbn. reflexivity. constructor. - } - constructor. - } - constructor. + + - (* Tfloat *) + inv H. TrivialExists. + + cbn. repeat econstructor; eassumption. + cbn. f_equal. rewrite ExtValues.normalize_select01. - destruct b. + rewrite H3. destruct b. * rewrite ExtValues.select01_long_true. apply ExtValues.float_bits_normalize. * rewrite ExtValues.select01_long_false. apply ExtValues.float_bits_normalize. - - inv H. TrivialExists. - + cbn. constructor. - { econstructor. eassumption. cbn. rewrite H3. cbn. reflexivity. } - constructor. eassumption. constructor. eassumption. constructor. + + - (* Tlong *) + inv H. TrivialExists. + + cbn. repeat econstructor; eassumption. + cbn. f_equal. rewrite ExtValues.normalize_select01. - destruct b. + rewrite H3. destruct b. * rewrite ExtValues.select01_long_true. reflexivity. * rewrite ExtValues.select01_long_false. reflexivity. + + - (* Tsingle *) + inv H. TrivialExists. + + cbn. repeat econstructor; eassumption. + + cbn. f_equal. rewrite ExtValues.normalize_select01. + rewrite H3. destruct b. + * rewrite ExtValues.select01_long_true. + rewrite normalize_low_long by assumption. + apply ExtValues.single_bits_normalize. + * rewrite ExtValues.select01_long_false. + rewrite normalize_low_long by assumption. + apply ExtValues.single_bits_normalize. Qed. Theorem eval_addressing: -- cgit