diff options
| author | Jon French | 2019-03-14 13:56:37 +0000 |
|---|---|---|
| committer | Jon French | 2019-03-14 13:56:37 +0000 |
| commit | 0d88c148a2a068a95b5fc3d5c25b599faf3e75a0 (patch) | |
| tree | cb507bee25582f503ae4047ce32558352aeb8b27 /test/c/fast_signed.sail | |
| parent | 4f14ccb421443dbc10b88e190526dda754f324aa (diff) | |
| parent | ec8cad1daa76fb265014d3d313173905925c9922 (diff) | |
Merge branch 'sail2' into rmem_interpreter
Diffstat (limited to 'test/c/fast_signed.sail')
| -rw-r--r-- | test/c/fast_signed.sail | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/c/fast_signed.sail b/test/c/fast_signed.sail new file mode 100644 index 00000000..b0f16f89 --- /dev/null +++ b/test/c/fast_signed.sail @@ -0,0 +1,30 @@ +default Order dec + +$include <prelude.sail> + +function main((): unit) -> unit = { + let x = signed(0xFF); + let y = signed(0xFFFF); + let z = signed(0xFFFFFFFF_FFFFFFFF); + let w = signed(0xFFFFFFFF_FFFFFFFF_FFFFFFFF_FFFFFFFF); + print_int("x = ", x); + print_int("y = ", y); + print_int("z = ", z); + print_int("w = ", w); + let x = signed(0x80); + let y = signed(0x8000); + let z = signed(0x80000000_00000000); + let w = signed(0x80000000_00000000_00000000_00000000); + print_int("x = ", x); + print_int("y = ", y); + print_int("z = ", z); + print_int("w = ", w); + let x = signed(0x7F); + let y = signed(0x7FFF); + let z = signed(0x7FFFFFFF_FFFFFFFF); + let w = signed(0x7FFFFFFF_FFFFFFFF_FFFFFFFF_FFFFFFFF); + print_int("x = ", x); + print_int("y = ", y); + print_int("z = ", z); + print_int("w = ", w); +}
\ No newline at end of file |
