diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2008-12-21 13:32:24 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2008-12-21 13:32:24 +0000 |
commit | dc4bed2cf06f46687225275131f411c86c773598 (patch) | |
tree | 9d99e759d906d061b6f213e0b20cb4bd53580ea6 /backend/LTLtyping.v | |
parent | ec6d00d94bcb1a0adc5c698367634b5e2f370c6e (diff) | |
download | compcert-dc4bed2cf06f46687225275131f411c86c773598.tar.gz compcert-dc4bed2cf06f46687225275131f411c86c773598.zip |
Revised back-end so that only 2 integer registers are reserved for reloading.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@925 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend/LTLtyping.v')
-rw-r--r-- | backend/LTLtyping.v | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/backend/LTLtyping.v b/backend/LTLtyping.v index 18308b8f..950154a1 100644 --- a/backend/LTLtyping.v +++ b/backend/LTLtyping.v @@ -35,6 +35,12 @@ Variable funct: function. Definition valid_successor (s: node) : Prop := exists i, funct.(fn_code)!s = Some i. +Definition call_loc_acceptable (sig: signature) (los: loc + ident) : Prop := + match los with + | inl l => Loc.type l = Tint /\ loc_acceptable l /\ ~In l (loc_arguments sig) + | inr s => True + end. + Inductive wt_instr : instruction -> Prop := | wt_Lnop: forall s, @@ -68,18 +74,16 @@ Inductive wt_instr : instruction -> Prop := wt_instr (Lstore chunk addr args src s) | wt_Lcall: forall sig ros args res s, - match ros with inl r => Loc.type r = Tint | inr s => True end -> List.map Loc.type args = sig.(sig_args) -> Loc.type res = proj_sig_res sig -> - match ros with inl r => loc_acceptable r | inr s => True end -> + call_loc_acceptable sig ros -> locs_acceptable args -> loc_acceptable res -> valid_successor s -> wt_instr (Lcall sig ros args res s) | wt_Ltailcall: forall sig ros args, - match ros with inl r => Loc.type r = Tint | inr s => True end -> List.map Loc.type args = sig.(sig_args) -> - match ros with inl r => loc_acceptable r | inr s => True end -> + call_loc_acceptable sig ros -> locs_acceptable args -> sig.(sig_res) = funct.(fn_sig).(sig_res) -> Conventions.tailcall_possible sig -> |