aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/Duplicate.v24
-rw-r--r--backend/Duplicateproof.v22
2 files changed, 43 insertions, 3 deletions
diff --git a/backend/Duplicate.v b/backend/Duplicate.v
index a96d0826..465b1538 100644
--- a/backend/Duplicate.v
+++ b/backend/Duplicate.v
@@ -60,6 +60,30 @@ Definition verify_match_inst revmap inst tinst :=
else Error (msg "Different lr in Iop")
else Error(msg "Different operations in Iop")
| _ => Error(msg "verify_match_inst Inop") end
+ | Iload m a lr r n => match tinst with
+ | Iload m' a' lr' r' n' =>
+ do u <- verify_is_copy revmap n n';
+ if (chunk_eq m m') then
+ if (eq_addressing a a') then
+ if (list_eq_dec Pos.eq_dec lr lr') then
+ if (Pos.eq_dec r r') then OK tt
+ else Error (msg "Different r in Iload")
+ else Error (msg "Different lr in Iload")
+ else Error (msg "Different addressing in Iload")
+ else Error (msg "Different mchunk in Iload")
+ | _ => Error (msg "verify_match_inst Iload") end
+ | Istore m a lr r n => match tinst with
+ | Istore m' a' lr' r' n' =>
+ do u <- verify_is_copy revmap n n';
+ if (chunk_eq m m') then
+ if (eq_addressing a a') then
+ if (list_eq_dec Pos.eq_dec lr lr') then
+ if (Pos.eq_dec r r') then OK tt
+ else Error (msg "Different r in Istore")
+ else Error (msg "Different lr in Istore")
+ else Error (msg "Different addressing in Istore")
+ else Error (msg "Different mchunk in Istore")
+ | _ => Error (msg "verify_match_inst Istore") end
| _ => Error(msg "not implemented")
end.
diff --git a/backend/Duplicateproof.v b/backend/Duplicateproof.v
index d8ca9cd1..c2bdf10d 100644
--- a/backend/Duplicateproof.v
+++ b/backend/Duplicateproof.v
@@ -85,9 +85,25 @@ Proof.
constructor; eauto.
(* Iop *)
- destruct i'; try (inversion H; fail). monadInv H.
- destruct (eq_operation _ _) eqn:EQO; try discriminate.
- destruct (list_eq_dec _ _ _) eqn:LEQ; try discriminate.
- destruct (Pos.eq_dec _ _) eqn:POS; try discriminate. clear EQ0. subst.
+ destruct (eq_operation _ _); try discriminate.
+ destruct (list_eq_dec _ _ _); try discriminate.
+ destruct (Pos.eq_dec _ _); try discriminate. clear EQ0. subst.
+ eapply verify_is_copy_correct_one. destruct x. eassumption.
+ constructor.
+(* Iload *)
+ - destruct i'; try (inversion H; fail). monadInv H.
+ destruct (chunk_eq _ _); try discriminate.
+ destruct (eq_addressing _ _); try discriminate.
+ destruct (list_eq_dec _ _ _); try discriminate.
+ destruct (Pos.eq_dec _ _); try discriminate. clear EQ0. subst.
+ eapply verify_is_copy_correct_one. destruct x. eassumption.
+ constructor.
+(* Istore *)
+ - destruct i'; try (inversion H; fail). monadInv H.
+ destruct (chunk_eq _ _); try discriminate.
+ destruct (eq_addressing _ _); try discriminate.
+ destruct (list_eq_dec _ _ _); try discriminate.
+ destruct (Pos.eq_dec _ _); try discriminate. clear EQ0. subst.
eapply verify_is_copy_correct_one. destruct x. eassumption.
constructor.
Qed.