-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
(module | ||
(func $test32 (result i32) | ||
(return (i32.const 0x0bAdD00D)) | ||
) | ||
|
||
(func $max32 (result i32) | ||
(return (i32.const 0xffffffff)) | ||
) | ||
|
||
(func $neg32 (result i32) | ||
(return (i32.const -0x7fffffff)) | ||
) | ||
|
||
(func $test64 (result i64) | ||
(return (i64.const 0x0CABBA6E0ba66a6e)) | ||
) | ||
|
||
(func $max64 (result i64) | ||
(return (i64.const 0xffffffffffffffff)) | ||
) | ||
|
||
(func $neg64 (result i64) | ||
(return (i64.const -0x7fffffffffffffff)) | ||
) | ||
|
||
(export "test32" $test32) | ||
(export "max32" $max32) | ||
(export "neg32" $neg32) | ||
(export "test64" $test64) | ||
(export "max64" $max64) | ||
(export "neg64" $neg64) | ||
) | ||
|
||
(assert_eq (invoke "test32") (i32.const 195940365)) | ||
(assert_eq (invoke "max32") (i32.const -1)) | ||
(assert_eq (invoke "neg32") (i32.const -2147483647)) | ||
(assert_eq (invoke "test64") (i64.const 913028331277281902)) | ||
(assert_eq (invoke "max64") (i64.const -1)) | ||
(assert_eq (invoke "neg64") (i64.const -9223372036854775807)) |