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/LTLtyping.v | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'backend/LTLtyping.v') diff --git a/backend/LTLtyping.v b/backend/LTLtyping.v index e1e43f56..7afae2db 100644 --- a/backend/LTLtyping.v +++ b/backend/LTLtyping.v @@ -88,8 +88,16 @@ Inductive wt_instr : instruction -> Prop := call_loc_acceptable sig ros -> locs_acceptable args -> sig.(sig_res) = funct.(fn_sig).(sig_res) -> - Conventions.tailcall_possible sig -> + tailcall_possible sig -> wt_instr (Ltailcall sig ros args) + | wt_Lbuiltin: + forall ef args res s, + List.map Loc.type args = (ef_sig ef).(sig_args) -> + Loc.type res = proj_sig_res (ef_sig ef) -> + arity_ok (ef_sig ef).(sig_args) = true -> + locs_acceptable args -> loc_acceptable res -> + valid_successor s -> + wt_instr (Lbuiltin ef args res s) | wt_Lcond: forall cond args s1 s2, List.map Loc.type args = type_of_condition cond -> -- cgit