aboutsummaryrefslogtreecommitdiffstats
path: root/mppa_k1c/SelectOpproof.v
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-05-13 14:02:23 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-05-13 14:02:23 +0200
commit5e53b6e6447b22eb34e5be1bc45320ca4e3d82a1 (patch)
tree46cd387020eb3af3c65d8bd8d0b73af3e47feaaf /mppa_k1c/SelectOpproof.v
parentc1b36f701c8c3968bb5fad86c94dd5ccfa81e3e5 (diff)
downloadcompcert-kvx-5e53b6e6447b22eb34e5be1bc45320ca4e3d82a1.tar.gz
compcert-kvx-5e53b6e6447b22eb34e5be1bc45320ca4e3d82a1.zip
we directly call 64-bit unsigned division
Diffstat (limited to 'mppa_k1c/SelectOpproof.v')
-rw-r--r--mppa_k1c/SelectOpproof.v20
1 files changed, 18 insertions, 2 deletions
diff --git a/mppa_k1c/SelectOpproof.v b/mppa_k1c/SelectOpproof.v
index 9e2eec8b..2730ee91 100644
--- a/mppa_k1c/SelectOpproof.v
+++ b/mppa_k1c/SelectOpproof.v
@@ -872,8 +872,24 @@ Theorem eval_divu_base:
Val.divu x y = Some z ->
exists v, eval_expr ge sp e m le (divu_base a b) v /\ Val.lessdef z v.
Proof.
- intros; unfold divu_base.
- econstructor; split. eapply eval_helper_2; eauto. DeclHelper. UseHelper. auto.
+ intros until z.
+ intros Hax Hby Hdiv. unfold divu_base.
+ pose proof (divu_is_divlu x y) as DIVU.
+ destruct (Val.divlu (Val.longofintu x) (Val.longofintu y))
+ as [ ql | ] eqn:Ediv.
+ { 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_modu_base: