From 9c7c84cc40eaacc1e2c13091165785cddecba5ad Mon Sep 17 00:00:00 2001 From: xleroy Date: Tue, 29 Jun 2010 08:27:14 +0000 Subject: 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 --- backend/Allocproof.v | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'backend/Allocproof.v') diff --git a/backend/Allocproof.v b/backend/Allocproof.v index c5d6adc..d06c26f 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. -- cgit v1.2.3