(** Translation of builtin arguments. *)

(* Specifications: *)
Lemma tr_builtin_arg:
forall F bound ctx rs rs' sp sp' m m',
match_globalenvs F bound ->
agree_regs F ctx rs rs' ->
F sp = Some(sp', ctx.(dstk)) ->
Mem.inject F m m' ->
forall a v,
eval_builtin_arg ge (fun r => rs#r) (Vptr sp Ptrofs.zero) m a v ->
exists v', eval_builtin_arg tge (fun r => rs'#r) (Vptr sp' Ptrofs.zero) m' (sbuiltinarg ctx a) v'
/\ Val.inject F v v'.
Lemma tr_builtin_args:
forall F bound ctx rs rs' sp sp' m m',
match_globalenvs F bound ->
agree_regs F ctx rs rs' ->
F sp = Some(sp', ctx.(dstk)) ->
Mem.inject F m m' ->
forall al vl,
eval_builtin_args ge (fun r => rs#r) (Vptr sp Ptrofs.zero) m al vl ->
exists vl', eval_builtin_args tge (fun r => rs'#r) (Vptr sp' Ptrofs.zero) m' (map (sbuiltinarg ctx) al) vl'
/\ Val.inject_list F vl vl'.