aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Schommer <bschommer@users.noreply.github.com>2019-08-17 10:10:42 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2019-08-17 10:10:42 +0200
commit7d5db993033ce049776fa290ae1ebc6051dea0f3 (patch)
treedf067338ff4dd76ee805a486f865ff2272b3c82a
parent27167c6226bbdd2856b8bb6c290b31b5e8534ba9 (diff)
downloadcompcert-7d5db993033ce049776fa290ae1ebc6051dea0f3.tar.gz
compcert-7d5db993033ce049776fa290ae1ebc6051dea0f3.zip
Fix compile for architectures other than AArch64 (#192)
Some changes were not correctly propagated to all architectures.
-rw-r--r--arm/SelectOpproof.v4
-rw-r--r--backend/SelectDivproof.v4
-rw-r--r--powerpc/SelectOpproof.v4
-rw-r--r--riscV/Asmgenproof1.v8
-rw-r--r--riscV/SelectOpproof.v4
-rw-r--r--x86/SelectOpproof.v8
6 files changed, 16 insertions, 16 deletions
diff --git a/arm/SelectOpproof.v b/arm/SelectOpproof.v
index 5d54d94f..70f8f191 100644
--- a/arm/SelectOpproof.v
+++ b/arm/SelectOpproof.v
@@ -754,7 +754,7 @@ Qed.
Theorem eval_cast8unsigned: unary_constructor_sound cast8unsigned (Val.zero_ext 8).
Proof.
red; intros until x. unfold cast8unsigned.
- rewrite Val.zero_ext_and. apply eval_andimm. compute; auto.
+ rewrite Val.zero_ext_and. apply eval_andimm. omega.
Qed.
Theorem eval_cast16signed: unary_constructor_sound cast16signed (Val.sign_ext 16).
@@ -767,7 +767,7 @@ Qed.
Theorem eval_cast16unsigned: unary_constructor_sound cast16unsigned (Val.zero_ext 16).
Proof.
red; intros until x. unfold cast8unsigned.
- rewrite Val.zero_ext_and. apply eval_andimm. compute; auto.
+ rewrite Val.zero_ext_and. apply eval_andimm. omega.
Qed.
Theorem eval_singleoffloat: unary_constructor_sound singleoffloat Val.singleoffloat.
diff --git a/backend/SelectDivproof.v b/backend/SelectDivproof.v
index 334bedf6..c57d3652 100644
--- a/backend/SelectDivproof.v
+++ b/backend/SelectDivproof.v
@@ -835,7 +835,7 @@ Proof.
assert (A0: eval_expr ge sp e m le (Eletvar O) (Vlong x)).
{ constructor; auto. }
exploit eval_mullhs. try apply HELPERS. eexact A0. instantiate (1 := Int64.repr M). intros (v1 & A1 & B1).
- exploit eval_addl. try apply HELPERS. eexact A1. eexact A0. intros (v2 & A2 & B2).
+ exploit eval_addl. auto. eexact A1. eexact A0. intros (v2 & A2 & B2).
exploit eval_shrluimm. try apply HELPERS. eexact A0. instantiate (1 := Int.repr 63). intros (v3 & A3 & B3).
set (a4 := if zlt M Int64.half_modulus
then mullhs (Eletvar 0) (Int64.repr M)
@@ -844,7 +844,7 @@ Proof.
assert (A4: eval_expr ge sp e m le a4 v4).
{ unfold a4, v4; destruct (zlt M Int64.half_modulus); auto. }
exploit eval_shrlimm. try apply HELPERS. eexact A4. instantiate (1 := Int.repr p). intros (v5 & A5 & B5).
- exploit eval_addl. try apply HELPERS. eexact A5. eexact A3. intros (v6 & A6 & B6).
+ exploit eval_addl. auto. eexact A5. eexact A3. intros (v6 & A6 & B6).
assert (RANGE: forall x, 0 <= x < 64 -> Int.ltu (Int.repr x) Int64.iwordsize' = true).
{ intros. unfold Int.ltu. rewrite Int.unsigned_repr. rewrite zlt_true by tauto. auto.
assert (64 < Int.max_unsigned) by (compute; auto). omega. }
diff --git a/powerpc/SelectOpproof.v b/powerpc/SelectOpproof.v
index 1f23f4bd..c3eda068 100644
--- a/powerpc/SelectOpproof.v
+++ b/powerpc/SelectOpproof.v
@@ -805,7 +805,7 @@ Qed.
Theorem eval_cast8unsigned: unary_constructor_sound cast8unsigned (Val.zero_ext 8).
Proof.
red; intros. unfold cast8unsigned.
- rewrite Val.zero_ext_and. apply eval_andimm; auto. compute; auto.
+ rewrite Val.zero_ext_and. apply eval_andimm; auto. omega.
Qed.
Theorem eval_cast16signed: unary_constructor_sound cast16signed (Val.sign_ext 16).
@@ -818,7 +818,7 @@ Qed.
Theorem eval_cast16unsigned: unary_constructor_sound cast16unsigned (Val.zero_ext 16).
Proof.
red; intros. unfold cast16unsigned.
- rewrite Val.zero_ext_and. apply eval_andimm; auto. compute; auto.
+ rewrite Val.zero_ext_and. apply eval_andimm; auto. omega.
Qed.
Theorem eval_singleoffloat: unary_constructor_sound singleoffloat Val.singleoffloat.
diff --git a/riscV/Asmgenproof1.v b/riscV/Asmgenproof1.v
index b4d6b831..c20c4e49 100644
--- a/riscV/Asmgenproof1.v
+++ b/riscV/Asmgenproof1.v
@@ -407,7 +407,7 @@ Lemma transl_cbranch_correct_1:
agree ms sp rs ->
Mem.extends m m' ->
exists rs', exists insn,
- exec_straight_opt c rs m' (insn :: k) rs' m'
+ exec_straight_opt ge fn c rs m' (insn :: k) rs' m'
/\ exec_instr ge fn insn rs' m' = eval_branch fn lbl rs' m' (Some b)
/\ forall r, r <> PC -> r <> X31 -> rs'#r = rs#r.
Proof.
@@ -502,7 +502,7 @@ Lemma transl_cbranch_correct_true:
agree ms sp rs ->
Mem.extends m m' ->
exists rs', exists insn,
- exec_straight_opt c rs m' (insn :: k) rs' m'
+ exec_straight_opt ge fn c rs m' (insn :: k) rs' m'
/\ exec_instr ge fn insn rs' m' = goto_label fn lbl rs' m'
/\ forall r, r <> PC -> r <> X31 -> rs'#r = rs#r.
Proof.
@@ -1092,7 +1092,7 @@ Lemma indexed_memory_access_correct:
forall mk_instr base ofs k rs m,
base <> X31 ->
exists base' ofs' rs',
- exec_straight_opt (indexed_memory_access mk_instr base ofs k) rs m
+ exec_straight_opt ge fn (indexed_memory_access mk_instr base ofs k) rs m
(mk_instr base' ofs' :: k) rs' m
/\ Val.offset_ptr rs'#base' (eval_offset ge ofs') = Val.offset_ptr rs#base ofs
/\ forall r, r <> PC -> r <> X31 -> rs'#r = rs#r.
@@ -1242,7 +1242,7 @@ Lemma transl_memory_access_correct:
transl_memory_access mk_instr addr args k = OK c ->
eval_addressing ge rs#SP addr (map rs (map preg_of args)) = Some v ->
exists base ofs rs',
- exec_straight_opt c rs m (mk_instr base ofs :: k) rs' m
+ exec_straight_opt ge fn c rs m (mk_instr base ofs :: k) rs' m
/\ Val.offset_ptr rs'#base (eval_offset ge ofs) = v
/\ forall r, r <> PC -> r <> X31 -> rs'#r = rs#r.
Proof.
diff --git a/riscV/SelectOpproof.v b/riscV/SelectOpproof.v
index 18bc5dfe..593be1ed 100644
--- a/riscV/SelectOpproof.v
+++ b/riscV/SelectOpproof.v
@@ -763,7 +763,7 @@ Qed.
Theorem eval_cast8unsigned: unary_constructor_sound cast8unsigned (Val.zero_ext 8).
Proof.
red; intros until x. unfold cast8unsigned.
- rewrite Val.zero_ext_and. apply eval_andimm. compute; auto.
+ rewrite Val.zero_ext_and. apply eval_andimm. omega.
Qed.
Theorem eval_cast16signed: unary_constructor_sound cast16signed (Val.sign_ext 16).
@@ -776,7 +776,7 @@ Qed.
Theorem eval_cast16unsigned: unary_constructor_sound cast16unsigned (Val.zero_ext 16).
Proof.
red; intros until x. unfold cast8unsigned.
- rewrite Val.zero_ext_and. apply eval_andimm. compute; auto.
+ rewrite Val.zero_ext_and. apply eval_andimm. omega.
Qed.
Theorem eval_intoffloat:
diff --git a/x86/SelectOpproof.v b/x86/SelectOpproof.v
index a1bb0703..961f602c 100644
--- a/x86/SelectOpproof.v
+++ b/x86/SelectOpproof.v
@@ -381,9 +381,9 @@ Proof.
- TrivialExists. simpl. rewrite Int.and_commut; auto.
- TrivialExists. simpl. rewrite Val.and_assoc. rewrite Int.and_commut. auto.
- rewrite Val.zero_ext_and. TrivialExists. rewrite Val.and_assoc.
- rewrite Int.and_commut. auto. compute; auto.
+ rewrite Int.and_commut. auto. omega.
- rewrite Val.zero_ext_and. TrivialExists. rewrite Val.and_assoc.
- rewrite Int.and_commut. auto. compute; auto.
+ rewrite Int.and_commut. auto. omega.
- TrivialExists.
Qed.
@@ -743,7 +743,7 @@ Proof.
red; intros until x. unfold cast8unsigned. destruct (cast8unsigned_match a); intros; InvEval.
TrivialExists.
subst. rewrite Val.zero_ext_and. rewrite Val.and_assoc.
- rewrite Int.and_commut. apply eval_andimm; auto. compute; auto.
+ rewrite Int.and_commut. apply eval_andimm; auto. omega.
TrivialExists.
Qed.
@@ -759,7 +759,7 @@ Proof.
red; intros until x. unfold cast16unsigned. destruct (cast16unsigned_match a); intros; InvEval.
TrivialExists.
subst. rewrite Val.zero_ext_and. rewrite Val.and_assoc.
- rewrite Int.and_commut. apply eval_andimm; auto. compute; auto.
+ rewrite Int.and_commut. apply eval_andimm; auto. omega.
TrivialExists.
Qed.