package jasmin

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module type Regalloc.RegallocSource

type extended_op
val create_return_addresses : (('info, 'asm) Prog.sfundef -> Z.t) -> ('info, 'asm) Prog.sfundef list -> retaddr Jasmin.Prog.Hf.t

Compute where the return address will be stored

val renaming : (unit, extended_op) Prog.func -> (unit, extended_op) Prog.func
val subroutine_ra_by_stack : (unit, extended_op) Prog.func -> bool
val get_reg_oracle : (('info, 'asm) Prog.func -> bool) -> (Prog.var -> Prog.var) -> (Prog.funname -> Prog.Sv.t) -> retaddr -> ('info, 'asm) Prog.func -> reg_oracle_t

Extract from the outcome of register allocation the information that is needed by stack-allocation.

val alloc_prog : retaddr Jasmin.Prog.Hf.t -> ('a * (unit, extended_op) Prog.func) list -> (Prog.var -> Prog.var) * (Prog.funname -> Prog.Sv.t) * ('a * (unit, extended_op) Prog.func) list

Returns:

  • the global renaming function
  • the set of killed registers (see note below)
  • the input function with variables turned into registers

Note: Export functions can freely use caller-saved registers: they are not reported as killed. Subroutines report ALL killed registers.