summaryrefslogtreecommitdiff
path: root/backend/Allocproof.v
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-06-29 08:27:14 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-06-29 08:27:14 +0000
commit9c7c84cc40eaacc1e2c13091165785cddecba5ad (patch)
tree65eafe51ad284d88fd5a949e1b2a54cd272f9f91 /backend/Allocproof.v
parentf4b416882955d9d91bca60f3eb35b95f4124a5be (diff)
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.v15
1 files changed, 14 insertions, 1 deletions
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.