aboutsummaryrefslogtreecommitdiffstats
path: root/x86/ConstpropOpproof.v
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2017-05-17 15:00:55 +0200
committerXavier Leroy <xavier.leroy@inria.fr>2017-05-17 15:00:55 +0200
commit7a44249f8256058156053fd56ceb3dbf63426bbe (patch)
treedbf310cbe43e91f10248d0496a93d6defa36c6e6 /x86/ConstpropOpproof.v
parent7eaaa6aee670b06c427017a9af888d3469e53126 (diff)
downloadcompcert-kvx-7a44249f8256058156053fd56ceb3dbf63426bbe.tar.gz
compcert-kvx-7a44249f8256058156053fd56ceb3dbf63426bbe.zip
Issues with invalid x86 addressing modes (Github issue #183)
- x86/Op: in 32-bit mode all addressings are valid because offsets are always interpreted as 32-bit signed integers in Asmgen. - x86/ConstpropOp: in addr_strength_reduction, make sure no invalid addressing mode is generated.
Diffstat (limited to 'x86/ConstpropOpproof.v')
-rw-r--r--x86/ConstpropOpproof.v4
1 files changed, 3 insertions, 1 deletions
diff --git a/x86/ConstpropOpproof.v b/x86/ConstpropOpproof.v
index 5eb46e34..ce20738c 100644
--- a/x86/ConstpropOpproof.v
+++ b/x86/ConstpropOpproof.v
@@ -292,8 +292,10 @@ Lemma addr_strength_reduction_correct:
exists res', eval_addressing ge (Vptr sp Ptrofs.zero) addr' e##args' = Some res' /\ Val.lessdef res res'.
Proof.
unfold eval_addressing, addr_strength_reduction. destruct Archi.ptr64.
+- intros until res. destruct (addressing_valid (fst (addr_strength_reduction_64 addr args vl))).
apply addr_strength_reduction_64_correct.
- apply addr_strength_reduction_32_correct.
+ intros; exists res; auto.
+- apply addr_strength_reduction_32_correct.
Qed.
Lemma make_cmp_base_correct: