Section CMCONSTR.
Variable cunit: Cminor.program.
Variable hf: helper_functions.
Hypothesis LINK: linkorder cunit prog.
Hypothesis HF: helper_functions_declared cunit hf.
Let HF': helper_functions_declared tprog hf.
Variable sp: val.
Variable e: env.
Variable m: mem.
(** Correctness of instruction selection for operators *)
(** Known built-in functions *)
End CMCONSTR.
(** Recognition of calls to built-in functions *)

Lemma classify_call_correct:
forall unit sp e m a v fd,
linkorder unit prog ->
Cminor.eval_expr ge sp e m a v ->
Genv.find_funct ge v = Some fd ->
match classify_call (prog_defmap unit) a with
| Call_default => True
| Call_imm id => exists b, Genv.find_symbol ge id = Some b /\ v = Vptr b Ptrofs.zero
| Call_builtin ef => fd = External ef
end.