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/Stackingproof.v | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'backend/Stackingproof.v') diff --git a/backend/Stackingproof.v b/backend/Stackingproof.v index 4406187..68d179a 100644 --- a/backend/Stackingproof.v +++ b/backend/Stackingproof.v @@ -650,7 +650,7 @@ Qed. Lemma agree_callee_save_set_result: forall ls1 ls2 v sg, agree_callee_save ls1 ls2 -> - agree_callee_save (Locmap.set (R (Conventions.loc_result sg)) v ls1) ls2. + agree_callee_save (Locmap.set (R (loc_result sg)) v ls1) ls2. Proof. intros; red; intros. rewrite H; auto. symmetry; apply Locmap.gso. destruct l; simpl; auto. @@ -1501,7 +1501,17 @@ Proof. econstructor; eauto. intros; symmetry; eapply agree_return_regs; eauto. intros. inv WTI. generalize (H4 _ H0). tauto. - apply agree_callee_save_return_regs. + apply agree_callee_save_return_regs. + + (* Lbuiltin *) + exists (State ts tf (shift_sp tf sp) (transl_code (make_env (function_bounds f)) b) (rs0#res <- v) fr m'); split. + apply plus_one. apply exec_Mbuiltin. + change mreg with RegEq.t. + rewrite (agree_eval_regs _ _ _ _ _ _ _ args AG). + eapply external_call_symbols_preserved; eauto. + exact symbols_preserved. exact varinfo_preserved. + econstructor; eauto with coqlib. + apply agree_set_reg; auto. (* Llabel *) econstructor; split. -- cgit v1.2.3