diff options
Diffstat (limited to 'cfrontend')
-rw-r--r-- | cfrontend/Cminorgenproof.v | 6 | ||||
-rw-r--r-- | cfrontend/Cshmgen.v | 2 | ||||
-rw-r--r-- | cfrontend/Cshmgenproof.v | 9 |
3 files changed, 13 insertions, 4 deletions
diff --git a/cfrontend/Cminorgenproof.v b/cfrontend/Cminorgenproof.v index 9d3d2550..2df8b932 100644 --- a/cfrontend/Cminorgenproof.v +++ b/cfrontend/Cminorgenproof.v @@ -1612,9 +1612,11 @@ Proof. (* cmpf *) inv H; inv H0; inv H1; TrivialExists. apply val_inject_val_of_optbool. (* cmpl *) - inv H; inv H0; inv H1; TrivialExists. apply val_inject_val_of_optbool. + unfold Val.cmpl in *. inv H0; inv H1; simpl in H; inv H. + econstructor; split. simpl; eauto. apply val_inject_val_of_bool. (* cmplu *) - inv H; inv H0; inv H1; TrivialExists. apply val_inject_val_of_optbool. + unfold Val.cmplu in *. inv H0; inv H1; simpl in H; inv H. + econstructor; split. simpl; eauto. apply val_inject_val_of_bool. Qed. (** * Correctness of Cminor construction functions *) diff --git a/cfrontend/Cshmgen.v b/cfrontend/Cshmgen.v index 3ab286e4..c45e0946 100644 --- a/cfrontend/Cshmgen.v +++ b/cfrontend/Cshmgen.v @@ -92,6 +92,8 @@ Definition make_cmp_ne_zero (e: expr) := | Ebinop (Ocmp c) e1 e2 => e | Ebinop (Ocmpu c) e1 e2 => e | Ebinop (Ocmpf c) e1 e2 => e + | Ebinop (Ocmpl c) e1 e2 => e + | Ebinop (Ocmplu c) e1 e2 => e | _ => Ebinop (Ocmp Cne) e (make_intconst Int.zero) end. diff --git a/cfrontend/Cshmgenproof.v b/cfrontend/Cshmgenproof.v index 00ed1f64..de3b8df0 100644 --- a/cfrontend/Cshmgenproof.v +++ b/cfrontend/Cshmgenproof.v @@ -220,6 +220,12 @@ Proof. simpl in H6. inv H6. unfold Val.cmp in H0. eauto. inv H. econstructor; eauto. rewrite H6. decEq. decEq. simpl in H6. inv H6. unfold Val.cmp in H0. eauto. + inv H. econstructor; eauto. rewrite H6. decEq. decEq. + simpl in H6. unfold Val.cmpl in H6. + destruct (Val.cmpl_bool c v1 v2) as [[]|]; inv H6; reflexivity. + inv H. econstructor; eauto. rewrite H6. decEq. decEq. + simpl in H6. unfold Val.cmplu in H6. + destruct (Val.cmplu_bool c v1 v2) as [[]|]; inv H6; reflexivity. Qed. Lemma make_cast_int_correct: @@ -300,8 +306,7 @@ Proof. destruct (Int.eq i Int.zero); simpl; constructor. exists Vtrue; split. econstructor; eauto with cshm. constructor. (* long *) - econstructor; split. econstructor; eauto with cshm. simpl. eauto. - unfold Val.cmpl, Val.cmpl_bool. simpl. + econstructor; split. econstructor; eauto with cshm. simpl. unfold Val.cmpl. simpl. eauto. destruct (Int64.eq i Int64.zero); simpl; constructor. Qed. |