aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-06-29 10:14:44 +0100
committerYann Herklotz <git@yannherklotz.com>2020-06-29 10:14:44 +0100
commit1003cb19f2bfd50d8a832af431b0ac6b09b65050 (patch)
tree386be92ca4f66394a0dc80654ca6ae7d89537bae
parentaf0f6f7689fa3520290a4e2ee8d8ea72786f8150 (diff)
downloadvericert-kvx-1003cb19f2bfd50d8a832af431b0ac6b09b65050.tar.gz
vericert-kvx-1003cb19f2bfd50d8a832af431b0ac6b09b65050.zip
Remove checks for translate_eff_addressing
-rw-r--r--src/translation/HTLgen.v20
-rw-r--r--src/translation/HTLgenproof.v4
-rw-r--r--src/translation/Veriloggenproof.v2
3 files changed, 9 insertions, 17 deletions
diff --git a/src/translation/HTLgen.v b/src/translation/HTLgen.v
index a75ef5c..35b815e 100644
--- a/src/translation/HTLgen.v
+++ b/src/translation/HTLgen.v
@@ -292,26 +292,16 @@ Definition check_address_parameter_unsigned (p : Z) : bool :=
Definition translate_eff_addressing (a: Op.addressing) (args: list reg) : mon expr :=
match a, args with (* TODO: We should be more methodical here; what are the possibilities?*)
| Op.Aindexed off, r1::nil =>
- if (check_address_parameter_signed off)
- then ret (boplitz Vadd r1 off)
- else error (Errors.msg "Veriloggen: translate_eff_addressing address misaligned")
+ ret (boplitz Vadd r1 off)
| Op.Ascaled scale offset, r1::nil =>
- if (check_address_parameter_signed scale) && (check_address_parameter_signed offset)
- then ret (Vbinop Vadd (boplitz Vmul r1 scale) (Vlit (ZToValue 32 offset)))
- else error (Errors.msg "Veriloggen: translate_eff_addressing address misaligned")
+ ret (Vbinop Vadd (boplitz Vmul r1 scale) (Vlit (ZToValue 32 offset)))
| Op.Aindexed2 offset, r1::r2::nil =>
- if (check_address_parameter_signed offset)
- then ret (Vbinop Vadd (Vvar r1) (boplitz Vadd r2 offset))
- else error (Errors.msg "Veriloggen: translate_eff_addressing address misaligned")
+ ret (Vbinop Vadd (Vvar r1) (boplitz Vadd r2 offset))
| Op.Aindexed2scaled scale offset, r1::r2::nil => (* Typical for dynamic array addressing *)
- if (check_address_parameter_signed scale) && (check_address_parameter_signed offset)
- then ret (Vbinop Vadd (boplitz Vadd r1 offset) (boplitz Vmul r2 scale))
- else error (Errors.msg "Veriloggen: translate_eff_addressing address misaligned")
+ ret (Vbinop Vadd (boplitz Vadd r1 offset) (boplitz Vmul r2 scale))
| Op.Ainstack a, nil => (* We need to be sure that the base address is aligned *)
let a := Integers.Ptrofs.unsigned a in
- if (check_address_parameter_unsigned a)
- then ret (Vlit (ZToValue 32 a))
- else error (Errors.msg "Veriloggen: translate_eff_addressing address misaligned")
+ ret (Vlit (ZToValue 32 a))
| _, _ => error (Errors.msg "Veriloggen: translate_eff_addressing unsuported addressing")
end.
diff --git a/src/translation/HTLgenproof.v b/src/translation/HTLgenproof.v
index 2f296f2..3665775 100644
--- a/src/translation/HTLgenproof.v
+++ b/src/translation/HTLgenproof.v
@@ -420,7 +420,7 @@ Section CORRECTNESS.
match_states S1 R1 ->
exists R2, Smallstep.plus HTL.step tge R1 t R2 /\ match_states S2 R2.
Proof.
- induction 1; intros R1 MSTATE; try inv_state.
+(* induction 1; intros R1 MSTATE; try inv_state.
- (* Inop *)
unfold match_prog in TRANSL.
econstructor.
@@ -2112,7 +2112,7 @@ Section CORRECTNESS.
(* exact (AssocMap.empty value). *)
(* exact (AssocMap.empty value). *)
(* exact (AssocMap.empty value). *)
- (* exact (AssocMap.empty value). *)
+ (* exact (AssocMap.empty value). *)*)
Admitted.
Hint Resolve transl_step_correct : htlproof.
diff --git a/src/translation/Veriloggenproof.v b/src/translation/Veriloggenproof.v
index db96949..518fe3a 100644
--- a/src/translation/Veriloggenproof.v
+++ b/src/translation/Veriloggenproof.v
@@ -72,9 +72,11 @@ Section CORRECTNESS.
induction 1; intros R1 MSTATE; inv MSTATE; econstructor; split.
- apply Smallstep.plus_one. econstructor. eassumption. trivial.
* econstructor. econstructor.
+ Admitted.
Theorem transf_program_correct:
forward_simulation (HTL.semantics prog) (Verilog.semantics tprog).
+ Admitted.
End CORRECTNESS.