forked from alastairreid/asl-interpreter
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing/portability: re-enable most of the C23 tests
The previous way of coping with platforms that only support _BitInt up to 128 bits wide was to disable all of the C23 tests. This commit changes the test to be much more precise. A test is only disabled if it depends on wide _BitInt support and wide _BitInts are not supported on this platform.
- Loading branch information
1 parent
929cf1d
commit a8d316d
Showing
6 changed files
with
36 additions
and
17 deletions.
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
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,11 @@ | ||
// RUN: %aslrun %s | filecheck %s | ||
// REQUIRES: !c23 || wide_bitint | ||
// Copyright (C) 2023-2024 Intel Corporation | ||
|
||
func main() => integer | ||
begin | ||
print_bits_hex(256'xff01020304050607_1011121314151617_2021222324252627_3031323334353637); println(); | ||
// CHECK: 256'xff01020304050607101112131415161720212223242526273031323334353637 | ||
|
||
return 0; | ||
end |
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,18 @@ | ||
// RUN: %aslrun %s | filecheck %s | ||
// REQUIRES: !c23 || wide_bitint | ||
// Copyright (C) 2023-2024 Intel Corporation | ||
|
||
func Test_70_140(x : bits(70)) => bits(140) | ||
begin | ||
return asl_sign_extend_bits(x, 140); | ||
end | ||
|
||
func main() => integer | ||
begin | ||
print_bits_hex(Test_70_140(16384[0 +: 70])); println(); | ||
// CHECK: 140'x4000 | ||
print_bits_hex(Test_70_140((-16384)[0 +: 70])); println(); | ||
// CHECK: 140'xfffffffffffffffffffffffffffffffc000 | ||
|
||
return 0; | ||
end |
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