view ppc/mach.ml @ 1:b5139af1a420 tip basis

Fixed permissions on compile scripts
author Mike Spivey <mike@cs.ox.ac.uk>
date Fri, 13 Oct 2017 17:27:58 +0100
parents bfdcc3820b32
children
line wrap: on
line source
(* ppc/mach.ml *)
(* Copyright (c) 2017 J. M. Spivey *)

(* |metrics| -- target representation of data object *)
type metrics = 
  { r_size: int;                (* Size of object *)
    r_align: int }              (* Address must be multiple of this *)

let int_rep = { r_size = 4; r_align = 4 }
let char_rep = { r_size = 1; r_align = 1 }
let bool_rep = { r_size = 1; r_align = 1 }
let void_rep = { r_size = 0; r_align = 1 }
let addr_rep = { r_size = 4; r_align = 4 }
let proc_rep = { r_size = 8; r_align = 4 }
let param_rep = { r_size = 4; r_align = 4 }
let max_align = 4

(* 
Frame layout:

        arg n
        ...
+16     arg 1
+12     static link     }
        context pointer }
        return address  }
bp:     dynamic link    }
        local 1
        ...
        local m
*)

let param_base = 16
let local_base = 0
let stat_link = 12