source: Deliverables/D2.2/8051/src/ASM/I8051.mli @ 1488

Last change on this file since 1488 was 1488, checked in by ayache, 8 years ago

Function pointers in D2.2/8051. Bugged for now.

File size: 1.6 KB
Line 
1
2include Arch.S
3
4type opaccs =
5  | Mul
6  | DivuModu
7
8type op1 =
9  | Cmpl
10  | Inc
11
12type op2 =
13  | Add
14  | Addc
15  | Sub
16  | And
17  | Or
18  | Xor
19
20val print_opaccs : opaccs -> string
21val print_op1 : op1 -> string
22val print_op2 : op2 -> string
23
24module Eval (Val : Value.S) : sig
25  val opaccs : opaccs -> Val.t -> Val.t ->
26               (Val.t (* first result (ACC) *) *
27                Val.t (* second result (BACC) *))
28  val op1    : op1 -> Val.t -> Val.t
29  val op2    : Val.t (* carry *) -> op2 -> Val.t -> Val.t ->
30               (Val.t (* returned value *) * Val.t (* new carry value *))
31end
32
33(* Not supported: signed division, signed modulo, shift operations. *)
34
35type register
36val compare_reg : register -> register -> int
37val eq_reg      : register -> register -> bool
38
39module RegisterSet : Set.S with type elt = register
40module RegisterMap : Map.S with type key = register
41
42val a : register
43val b : register
44val dpl : register
45val dph : register
46val spl : register
47val sph : register
48val st0 : register
49val st1 : register
50val st2 : register
51val st3 : register
52val sts : register list
53val rets : register list
54val sst : register
55val carry : register (* only used for the liveness analysis *)
56
57val spl_addr : int
58val spl_init : int
59val sph_addr : int
60val sph_init : int
61val isp_addr : int
62val isp_init : int
63
64val registers : RegisterSet.t
65val parameters : register list
66val callee_saved : RegisterSet.t
67val caller_saved : RegisterSet.t
68val allocatable : RegisterSet.t
69val forbidden : RegisterSet.t
70
71val print_register : register -> string
72
73val reg_addr : register -> [> ASM.direct]
74
75val ext_ram_size : int
76val int_ram_size : int
Note: See TracBrowser for help on using the repository browser.