Implement interp_cnd.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
81944dbf11
commit
bf76aced95
1 changed files with 8 additions and 1 deletions
|
|
@ -169,7 +169,14 @@ let ( >=. ) a b = Int64.compare a b >= 0
|
|||
|
||||
(* Interpret a condition code with respect to the given flags. *)
|
||||
(* !!! Check the Specification for Help *)
|
||||
let interp_cnd { fo; fs; fz } : cnd -> bool = fun x -> failwith "interp_cnd unimplemented"
|
||||
let interp_cnd { fo; fs; fz } : cnd -> bool = fun c ->
|
||||
match c with
|
||||
| Eq -> fz
|
||||
| Neq -> not fz
|
||||
| Gt -> fo = fs && not fz
|
||||
| Ge -> fo = fs
|
||||
| Lt -> fo <> fs
|
||||
| Le -> fo <> fs || fz
|
||||
|
||||
(* Maps an X86lite address into Some OCaml array index,
|
||||
or None if the address is not within the legal address space. *)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue