diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-06-29 08:27:14 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2010-06-29 08:27:14 +0000 |
commit | 9c7c84cc40eaacc1e2c13091165785cddecba5ad (patch) | |
tree | 65eafe51ad284d88fd5a949e1b2a54cd272f9f91 /backend/Allocproof.v | |
parent | f4b416882955d9d91bca60f3eb35b95f4124a5be (diff) | |
download | compcert-kvx-9c7c84cc40eaacc1e2c13091165785cddecba5ad.tar.gz compcert-kvx-9c7c84cc40eaacc1e2c13091165785cddecba5ad.zip |
Support for inlined built-ins.
AST: add ef_inline flag to external functions.
Selection: recognize calls to inlined built-ins and inline them as Sbuiltin.
CminorSel to Asm: added Sbuiltin/Ibuiltin instruction.
PrintAsm: adapted expansion of builtins.
C2Clight: adapted detection of builtins.
Conventions: refactored in a machine-independent part (backend/Conventions)
and a machine-dependent part (ARCH/SYS/Conventions1).
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1356 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend/Allocproof.v')
-rw-r--r-- | backend/Allocproof.v | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/backend/Allocproof.v b/backend/Allocproof.v index c5d6adc3..d06c26fa 100644 --- a/backend/Allocproof.v +++ b/backend/Allocproof.v @@ -330,7 +330,7 @@ Lemma agree_postcall: forall live args ros res rs v (ls: locset), (forall r, Regset.In r live -> r <> res -> - ~(In (assign r) Conventions.destroyed_at_call)) -> + ~(In (assign r) destroyed_at_call)) -> (forall r, Regset.In r live -> r <> res -> assign r <> assign res) -> agree (reg_list_live args (reg_sum_live ros (reg_dead res live))) rs ls -> @@ -676,6 +676,19 @@ Proof. rewrite (sig_function_translated _ _ TF). eauto. rewrite H1. econstructor; eauto. + (* Ibuiltin *) + econstructor; split. + eapply exec_Lbuiltin; eauto. TranslInstr. + replace (map ls (@map reg loc assign args)) with (rs##args). + eapply external_call_symbols_preserved; eauto. + exact symbols_preserved. exact varinfo_preserved. + eapply agree_eval_regs; eauto. + generalize (regalloc_correct_1 f env live _ _ _ _ ASG H). + unfold correct_alloc_instr. intro CORR. + MatchStates. + eapply agree_assign_live; eauto. + eapply agree_reg_list_live; eauto. + (* Icond, true *) assert (COND: eval_condition cond (map ls (map assign args)) = Some true). replace (map ls (map assign args)) with (rs##args). auto. |