diff options
Diffstat (limited to 'backend/LTL.v')
-rw-r--r-- | backend/LTL.v | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/backend/LTL.v b/backend/LTL.v index 6dd1abd6..5e7eec8c 100644 --- a/backend/LTL.v +++ b/backend/LTL.v @@ -96,24 +96,28 @@ Definition call_regs (caller: locset) : locset := - Callee-save machine registers have the same values as in the caller before the call. - Caller-save machine registers have the same values as in the callee. -- Stack slots have the same values as in the caller. +- Local and Incoming stack slots have the same values as in the caller. +- Outgoing stack slots are set to Vundef to reflect the fact that they + may have been changed by the callee. *) Definition return_regs (caller callee: locset) : locset := fun (l: loc) => match l with | R r => if is_callee_save r then caller (R r) else callee (R r) + | S Outgoing ofs ty => Vundef | S sl ofs ty => caller (S sl ofs ty) end. (** [undef_caller_save_regs ls] models the effect of calling - an external function: caller-save registers can change unpredictably, - hence we set them to [Vundef]. *) + an external function: caller-save registers and outgoing locations + can change unpredictably, hence we set them to [Vundef]. *) Definition undef_caller_save_regs (ls: locset) : locset := fun (l: loc) => match l with | R r => if is_callee_save r then ls (R r) else Vundef + | S Outgoing ofs ty => Vundef | S sl ofs ty => ls (S sl ofs ty) end. |