diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-07-23 15:01:54 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-07-23 15:01:54 +0000 |
commit | 4297fcb821c3188449b64184af73e41491a6118f (patch) | |
tree | 3f31e0bd4bcfa107a345c1670e65290e785ee091 /backend | |
parent | 7c9500e438384c6c0ce478c8c73b3887137ac924 (diff) | |
download | compcert-kvx-4297fcb821c3188449b64184af73e41491a6118f.tar.gz compcert-kvx-4297fcb821c3188449b64184af73e41491a6118f.zip |
- Revised non-overflow constraints on memory injections so that
injections compose (Values, Memdata, Memory)
- Memory chunks: Mfloat64 now has alignment 8; introduced Mfloat64al32
that works like old Mfloat64 (i.e. has alignment 4); simplified
handling of memcpy builtin accordingly.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1983 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend')
-rw-r--r-- | backend/CMtypecheck.ml | 2 | ||||
-rw-r--r-- | backend/Inliningproof.v | 5 | ||||
-rw-r--r-- | backend/Mach.v | 2 | ||||
-rw-r--r-- | backend/PrintCminor.ml | 1 | ||||
-rw-r--r-- | backend/Stackingproof.v | 6 |
5 files changed, 12 insertions, 4 deletions
diff --git a/backend/CMtypecheck.ml b/backend/CMtypecheck.ml index 8db488ab..6e91f5b2 100644 --- a/backend/CMtypecheck.ml +++ b/backend/CMtypecheck.ml @@ -176,6 +176,7 @@ let type_chunk = function | Mint32 -> tint | Mfloat32 -> tfloat | Mfloat64 -> tfloat + | Mfloat64al32 -> tfloat let name_of_chunk = function | Mint8signed -> "int8signed" @@ -185,6 +186,7 @@ let name_of_chunk = function | Mint32 -> "int32" | Mfloat32 -> "float32" | Mfloat64 -> "float64" + | Mfloat64al32 -> "float64al32" let rec type_expr env lenv e = match e with diff --git a/backend/Inliningproof.v b/backend/Inliningproof.v index f88ca81e..9ca351a3 100644 --- a/backend/Inliningproof.v +++ b/backend/Inliningproof.v @@ -671,6 +671,11 @@ Proof. destruct (zle sz 2). omegaContradiction. destruct (zle sz 4). auto. apply Zdivides_trans with 8; auto. exists 2; auto. + assert (8 <= sz -> (8 | n)). intros. + destruct (zle sz 1). omegaContradiction. + destruct (zle sz 2). omegaContradiction. + destruct (zle sz 4). omegaContradiction. + auto. destruct chunk; simpl in *; auto. apply Zone_divide. apply Zone_divide. diff --git a/backend/Mach.v b/backend/Mach.v index 5c9cff55..669d35e7 100644 --- a/backend/Mach.v +++ b/backend/Mach.v @@ -97,7 +97,7 @@ Definition genv := Genv.t fundef unit. (** The operational semantics is in module [Machsem]. *) Definition chunk_of_type (ty: typ) := - match ty with Tint => Mint32 | Tfloat => Mfloat64 end. + match ty with Tint => Mint32 | Tfloat => Mfloat64al32 end. Module RegEq. Definition t := mreg. diff --git a/backend/PrintCminor.ml b/backend/PrintCminor.ml index cdbd8707..66b579e7 100644 --- a/backend/PrintCminor.ml +++ b/backend/PrintCminor.ml @@ -107,6 +107,7 @@ let name_of_chunk = function | Mint32 -> "int32" | Mfloat32 -> "float32" | Mfloat64 -> "float64" + | Mfloat64al32 -> "float64al32" (* Expressions *) diff --git a/backend/Stackingproof.v b/backend/Stackingproof.v index be5e4b97..1cfb7380 100644 --- a/backend/Stackingproof.v +++ b/backend/Stackingproof.v @@ -232,7 +232,7 @@ Proof. Qed. Lemma fe_stack_data_aligned: - (4 | fe_stack_data fe). + (8 | fe_stack_data fe). Proof. intros. generalize (frame_env_aligned b). intuition. fold fe in H. intuition. @@ -371,7 +371,7 @@ Lemma gss_index_contains_base: /\ decode_encode_val v (chunk_of_type (type_of_index idx)) (chunk_of_type (type_of_index idx)) v'. Proof. intros. - exploit Mem.load_store_similar. eauto. reflexivity. + exploit Mem.load_store_similar. eauto. reflexivity. omega. intros [v' [A B]]. exists v'; split; auto. constructor; auto. Qed. @@ -1408,7 +1408,7 @@ Proof. intros. apply Mem.perm_implies with Freeable; auto with mem. eapply Mem.perm_alloc_2; eauto. generalize stack_data_offset_valid bound_stack_data_stacksize; omega. - red. intros. apply Zdivides_trans with 4. + red. intros. apply Zdivides_trans with 8. destruct chunk; simpl; auto with align_4. apply fe_stack_data_aligned. intros. |