-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes incorrect type calculation of bitv
*_extend
ops
- Loading branch information
Showing
3 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
test_unop | ||
test_binop | ||
test_triop | ||
test_ty | ||
test_relop | ||
test_cvtop | ||
test_naryop | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
open Smtml | ||
|
||
let () = | ||
let x = Expr.symbol (Symbol.make (Ty_bitv 32) "x") in | ||
let x = Expr.extract x ~high:2 ~low:0 in | ||
assert (Ty.equal (Expr.ty x) (Ty_bitv 16)); | ||
let x = Expr.cvtop (Ty_bitv 32) (Sign_extend 16) x in | ||
assert (Ty.equal (Expr.ty x) (Ty_bitv 32)) |