aboutsummaryrefslogtreecommitdiffstats
path: root/backend/LTL.v
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2016-05-27 09:03:30 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2016-05-27 09:03:30 +0200
commit5087ec788016b719b4038be08cd55bccc22b3619 (patch)
tree58f0a26f4b02364c0823ba64a2de2df1a073e0a4 /backend/LTL.v
parentb45cdb9dce7df376fd3cb27a32863af90b847b78 (diff)
parent8d3dbd3636fbb6a056f5506be8ee2d8839c1aea2 (diff)
downloadcompcert-5087ec788016b719b4038be08cd55bccc22b3619.tar.gz
compcert-5087ec788016b719b4038be08cd55bccc22b3619.zip
Merge pull request #99 from AbsInt/register-pairs
Introduce register pairs to describe calling conventions more precisely
Diffstat (limited to 'backend/LTL.v')
-rw-r--r--backend/LTL.v11
1 files changed, 5 insertions, 6 deletions
diff --git a/backend/LTL.v b/backend/LTL.v
index bb596fa2..5f7116ae 100644
--- a/backend/LTL.v
+++ b/backend/LTL.v
@@ -266,9 +266,9 @@ Inductive step: state -> trace -> state -> Prop :=
step (Callstate s (Internal f) rs m)
E0 (State s f (Vptr sp Int.zero) f.(fn_entrypoint) rs' m')
| exec_function_external: forall s ef t args res rs m rs' m',
- args = map rs (loc_arguments (ef_sig ef)) ->
- external_call' ef ge args m t res m' ->
- rs' = Locmap.setlist (map R (loc_result (ef_sig ef))) res rs ->
+ args = map (fun p => Locmap.getpair p rs) (loc_arguments (ef_sig ef)) ->
+ external_call ef ge args m t res m' ->
+ rs' = Locmap.setpair (loc_result (ef_sig ef)) res rs ->
step (Callstate s (External ef) rs m)
t (Returnstate s rs' m')
| exec_return: forall f sp rs1 bb s rs m,
@@ -292,9 +292,8 @@ Inductive initial_state (p: program): state -> Prop :=
initial_state p (Callstate nil f (Locmap.init Vundef) m0).
Inductive final_state: state -> int -> Prop :=
- | final_state_intro: forall rs m r retcode,
- loc_result signature_main = r :: nil ->
- rs (R r) = Vint retcode ->
+ | final_state_intro: forall rs m retcode,
+ Locmap.getpair (map_rpair R (loc_result signature_main)) rs = Vint retcode ->
final_state (Returnstate nil rs m) retcode.
Definition semantics (p: program) :=