diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-05 06:03:21 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-05 06:03:21 +0200 |
commit | 53b6eb437c7988b44e881c7b7a9df2e735ded0ea (patch) | |
tree | ffe451f96a6942088356246e8530fd0d9160cb7e /mppa_k1c/Asmblockgenproof1.v | |
parent | b27d386185527d1ee9d0bb77ebe3bacffc2bf05a (diff) | |
download | compcert-kvx-53b6eb437c7988b44e881c7b7a9df2e735ded0ea.tar.gz compcert-kvx-53b6eb437c7988b44e881c7b7a9df2e735ded0ea.zip |
select cmpu
Diffstat (limited to 'mppa_k1c/Asmblockgenproof1.v')
-rw-r--r-- | mppa_k1c/Asmblockgenproof1.v | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/mppa_k1c/Asmblockgenproof1.v b/mppa_k1c/Asmblockgenproof1.v index 7da86de4..75f2005c 100644 --- a/mppa_k1c/Asmblockgenproof1.v +++ b/mppa_k1c/Asmblockgenproof1.v @@ -1638,10 +1638,12 @@ Opaque Int.eq. exploit transl_cond_op_correct; eauto. intros (rs' & A & B & C). exists rs'; split. eexact A. eauto with asmgen. - (* Oselect *) - destruct cond in *; simpl in *; try congruence; injection EQ3; clear EQ3; intro Hrew; rewrite <- Hrew in *; + destruct cond in *; simpl in *; try congruence; + try monadInv EQ3; + try (injection EQ3; clear EQ3; intro Hrew; rewrite <- Hrew in * ; clear Hrew); econstructor; split; - try ( eapply exec_straight_one; - simpl; reflexivity ). + try ( eapply exec_straight_one; simpl; reflexivity ). + (* Cmp *) + split. * unfold eval_select. destruct (rs x) eqn:eqX; try constructor. @@ -1651,6 +1653,24 @@ Opaque Int.eq. destruct b; simpl; rewrite Pregmap.gss; constructor. * intros. rewrite Pregmap.gso; congruence. + (* Cmpu *) + + split. + * unfold eval_select. + destruct (rs x) eqn:eqX; try constructor. + destruct (rs x0) eqn:eqX0; try constructor. + destruct c0 in *; simpl in *; inv EQ2; simpl. + ** assert (Hcmpuabs := (Val_cmpu_bool_correct m Ceq (rs x1) (Vint Int.zero))). + destruct (Val.cmpu_bool _ _); simpl; try constructor. + destruct b in *; simpl in *; [ rewrite (Hcmpuabs true) | rewrite (Hcmpuabs false)]; trivial; + rewrite Pregmap.gss; constructor. + ** assert (Hcmpuabs := (Val_cmpu_bool_correct m Cne (rs x1) (Vint Int.zero))). + destruct (Val.cmpu_bool _ _); simpl; try constructor. + destruct b in *; simpl in *; [ rewrite (Hcmpuabs true) | rewrite (Hcmpuabs false)]; trivial; + rewrite Pregmap.gss; constructor. + * intros. + rewrite Pregmap.gso; congruence. + + (* Cmpl *) + split. * unfold eval_select. destruct (rs x) eqn:eqX; try constructor. |