diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-04-16 14:10:51 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-04-16 14:10:51 +0200 |
commit | ba32e5daa1ff343a1a0b89e65c2ba5764c9cef04 (patch) | |
tree | 585d094836b7b956601b1d12764b84bf83d63e8c /backend/CSE2.v | |
parent | 5450d5054dc84d31c820b6d60c87c628290d5487 (diff) | |
download | compcert-kvx-ba32e5daa1ff343a1a0b89e65c2ba5764c9cef04.tar.gz compcert-kvx-ba32e5daa1ff343a1a0b89e65c2ba5764c9cef04.zip |
progress on CSE2 builtins
Diffstat (limited to 'backend/CSE2.v')
-rw-r--r-- | backend/CSE2.v | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/backend/CSE2.v b/backend/CSE2.v index 900a7517..e2ab9f07 100644 --- a/backend/CSE2.v +++ b/backend/CSE2.v @@ -375,33 +375,12 @@ Definition load (chunk: memory_chunk) (addr : addressing) | None => load1 chunk addr dst args rel end. -(* NO LONGER NEEDED -Fixpoint list_represents { X : Type } (l : list (positive*X)) (tr : PTree.t X) : Prop := - match l with - | nil => True - | (r,sv)::tail => (tr ! r) = Some sv /\ list_represents tail tr +Fixpoint kill_builtin_res res rel := + match res with + | BR r => kill_reg r rel + | _ => rel end. -Lemma elements_represent : - forall { X : Type }, - forall tr : (PTree.t X), - (list_represents (PTree.elements tr) tr). -Proof. - intros. - generalize (PTree.elements_complete tr). - generalize (PTree.elements tr). - induction l; simpl; trivial. - intro COMPLETE. - destruct a as [ r sv ]. - split. - { - apply COMPLETE. - left; reflexivity. - } - apply IHl; auto. -Qed. -*) - Definition apply_instr instr (rel : RELATION.t) : RB.t := match instr with | Inop _ @@ -411,7 +390,7 @@ Definition apply_instr instr (rel : RELATION.t) : RB.t := | Iop op args dst _ => Some (gen_oper op dst args rel) | Iload trap chunk addr args dst _ => Some (load chunk addr dst args rel) | Icall _ _ _ dst _ => Some (kill_reg dst (kill_mem rel)) - | Ibuiltin _ _ res _ => Some (RELATION.top) (* TODO (kill_builtin_res res x) *) + | Ibuiltin _ _ res _ => Some (kill_builtin_res res (kill_mem rel)) | Itailcall _ _ _ | Ireturn _ => RB.bot end. |