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 /cfrontend/Cshmgenproof3.v | |
parent | f4b416882955d9d91bca60f3eb35b95f4124a5be (diff) | |
download | compcert-9c7c84cc40eaacc1e2c13091165785cddecba5ad.tar.gz compcert-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 'cfrontend/Cshmgenproof3.v')
-rw-r--r-- | cfrontend/Cshmgenproof3.v | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/cfrontend/Cshmgenproof3.v b/cfrontend/Cshmgenproof3.v index fb1edbe3..0e9e5b13 100644 --- a/cfrontend/Cshmgenproof3.v +++ b/cfrontend/Cshmgenproof3.v @@ -1249,7 +1249,8 @@ Proof. apply plus_one. econstructor; eauto. exploit transl_expr_correct; eauto. exploit transl_exprlist_correct; eauto. - eapply transl_fundef_sig1; eauto. congruence. + eapply transl_fundef_sig1; eauto. eapply functions_well_typed; eauto. + congruence. econstructor; eauto. eapply functions_well_typed; eauto. econstructor; eauto. simpl. auto. @@ -1263,7 +1264,8 @@ Proof. apply plus_one. econstructor; eauto. exploit transl_expr_correct; eauto. exploit transl_exprlist_correct; eauto. - eapply transl_fundef_sig1; eauto. congruence. + eapply transl_fundef_sig1; eauto. eapply functions_well_typed; eauto. + congruence. econstructor; eauto. eapply functions_well_typed; eauto. econstructor; eauto. simpl; auto. @@ -1595,10 +1597,15 @@ Proof. eapply Genv.find_funct_ptr_symbol_inversion; eauto. destruct H as [targs D]. assert (targs = Tnil). - inv H0. inv H10. simpl in D. unfold type_of_function in D. rewrite <- H5 in D. + inv H0. + (* internal function *) + inv H10. simpl in D. unfold type_of_function in D. rewrite <- H5 in D. simpl in D. congruence. + (* external function *) simpl in D. inv D. - exploit external_call_arity; eauto. destruct targs; simpl; congruence. + exploit external_call_arity; eauto. intro ARITY. + exploit function_ptr_well_typed; eauto. intro WT. inv WT. + rewrite H5 in ARITY. destruct targs; simpl in ARITY; congruence. subst targs. assert (funsig tf = signature_of_type Tnil (Tint I32 Signed)). eapply transl_fundef_sig2; eauto. |