Files
lci/lib/miniImp/RISC.mli

57 lines
904 B
OCaml
Raw Normal View History

module RISCAssembly : sig
type register = {
index : int
}
type label
type risci =
| Nop
| BRegOp of brop * register * register * register
| BImmOp of biop * register * int * register
| URegOp of urop * register * register
| Load of register * register
| LoadI of register * int
| Store of register * register
| Jump of label
| CJump of register * label * label
| Label of label
and brop =
| Add
| Sub
| Mult
| Div
| Mod
| Pow
| And
| Or
| Eq
| Less
| LessEq
| More
| MoreEq
and biop =
| AddI
| SubI
| MultI
| DivI
| ModI
| PowI
| AndI
| OrI
| EqI
| LessI
| LessEqI
| MoreI
| MoreEqI
and urop =
| Not
| Copy
| Rand
type t = risci list
val pp : out_channel -> t -> unit
end
val convert : CfgRISC.RISCCfg.t -> RISCAssembly.t