(* *********************************************************************)
(*                                                                     *)
(*              The Compcert verified compiler                         *)
(*                                                                     *)
(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)
(*                                                                     *)
(*  Copyright Institut National de Recherche en Informatique et en     *)
(*  Automatique.  All rights reserved.  This file is distributed       *)
(*  under the terms of the INRIA Non-Commercial License Agreement.     *)
(*                                                                     *)
(* *********************************************************************)
(** Correctness proof for the translation from Linear to Mach. *)
(** This file proves semantic preservation for the [Stacking] pass. *)
Local Open Scope sep_scope.
Definition match_prog (p: Linear.program) (tp: Mach.program) :=
match_program (fun _ f tf => transf_fundef f = OK tf) eq p tp.
(** * Basic properties of the translation *)
Remark size_type_chunk:
forall ty, size_chunk (chunk_of_type ty) = AST.typesize ty.
Remark align_type_chunk:
forall ty, align_chunk (chunk_of_type ty) = 4 * Locations.typealign ty.

Lemma slot_outgoing_argument_valid:
forall f ofs ty sg,
In (S Outgoing ofs ty) (regs_of_rpairs (loc_arguments sg)) -> slot_valid f Outgoing ofs ty = true.