diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-05-13 16:44:33 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-05-13 16:44:33 +0200 |
commit | c785f245a68aab9078c37b729fa916f2feae76f0 (patch) | |
tree | 604f15e724b3cacb5b692756b541a5515a70896a /mppa_k1c/SelectOpproof.v | |
parent | 5e53b6e6447b22eb34e5be1bc45320ca4e3d82a1 (diff) | |
download | compcert-kvx-c785f245a68aab9078c37b729fa916f2feae76f0.tar.gz compcert-kvx-c785f245a68aab9078c37b729fa916f2feae76f0.zip |
32-bit modulo now uses sign extend then call to the 64-bit function
Diffstat (limited to 'mppa_k1c/SelectOpproof.v')
-rw-r--r-- | mppa_k1c/SelectOpproof.v | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/mppa_k1c/SelectOpproof.v b/mppa_k1c/SelectOpproof.v index 2730ee91..d22725d5 100644 --- a/mppa_k1c/SelectOpproof.v +++ b/mppa_k1c/SelectOpproof.v @@ -899,8 +899,24 @@ Theorem eval_modu_base: Val.modu x y = Some z -> exists v, eval_expr ge sp e m le (modu_base a b) v /\ Val.lessdef z v. Proof. - intros; unfold modu_base. - econstructor; split. eapply eval_helper_2; eauto. DeclHelper. UseHelper. auto. + intros until z. + intros Hax Hby Hmod. unfold modu_base. + pose proof (modu_is_modlu x y) as MODU. + destruct (Val.modlu (Val.longofintu x) (Val.longofintu y)) + as [ ql | ] eqn:Emod. + { TrivialExists. + { econstructor. eapply eval_helper_2; eauto. + { econstructor. econstructor. eassumption. + constructor. simpl. reflexivity. } + { econstructor. econstructor. eassumption. + constructor. simpl. reflexivity. } + { DeclHelper. } + { UseHelper. } + constructor. } + simpl. + congruence. + } + congruence. Qed. Theorem eval_shrximm: |