blob: b0f16f898bd36abca0e4ac1f482873ba677a5c42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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);
}
|