-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for shifting by out of range immediate
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
- Loading branch information
Showing
13 changed files
with
106 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) Big Switch Networks, Inc | ||
# SPDX-License-Identifier: Apache-2.0 | ||
-- asm | ||
mov32 %r0, 0xf8 | ||
lsh32 %r0, 28 | ||
# %r0 == 0x80000000 | ||
arsh32 %r0, 48 | ||
exit | ||
-- result | ||
0xffff8000 |
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,10 @@ | ||
# Copyright (c) Big Switch Networks, Inc | ||
# SPDX-License-Identifier: Apache-2.0 | ||
-- asm | ||
mov32 %r0, 0xf8 | ||
lsh32 %r0, 28 | ||
# %r0 == 0x80000000 | ||
arsh32 %r0, -16 | ||
exit | ||
-- result | ||
0xffff8000 |
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,9 @@ | ||
# Copyright (c) Big Switch Networks, Inc | ||
# SPDX-License-Identifier: Apache-2.0 | ||
-- asm | ||
mov32 %r0, 1 | ||
lsh %r0, 63 | ||
arsh %r0, 124 | ||
exit | ||
-- result | ||
0xfffffffffffffff8 |
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,9 @@ | ||
# Copyright (c) Big Switch Networks, Inc | ||
# SPDX-License-Identifier: Apache-2.0 | ||
-- asm | ||
mov32 %r0, 1 | ||
lsh %r0, 63 | ||
arsh %r0, -4 | ||
exit | ||
-- result | ||
0xfffffffffffffff8 |
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 @@ | ||
# Copyright (c) Big Switch Networks, Inc | ||
# SPDX-License-Identifier: Apache-2.0 | ||
-- asm | ||
mov %r0, 0x11 | ||
lsh32 %r0, 60 | ||
exit | ||
-- result | ||
0x10000000 |
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 @@ | ||
# Copyright (c) Big Switch Networks, Inc | ||
# SPDX-License-Identifier: Apache-2.0 | ||
-- asm | ||
mov %r0, 0x11 | ||
lsh32 %r0, -4 | ||
exit | ||
-- result | ||
0x10000000 |
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 @@ | ||
# Copyright (c) Big Switch Networks, Inc | ||
# SPDX-License-Identifier: Apache-2.0 | ||
-- asm | ||
mov %r0, 0x1 | ||
lsh %r0, 68 | ||
exit | ||
-- result | ||
0x10 |
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 @@ | ||
# Copyright (c) Big Switch Networks, Inc | ||
# SPDX-License-Identifier: Apache-2.0 | ||
-- asm | ||
mov %r0, 0x1 | ||
lsh %r0, -60 | ||
exit | ||
-- result | ||
0x10 |
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,9 @@ | ||
# Copyright (c) Big Switch Networks, Inc | ||
# SPDX-License-Identifier: Apache-2.0 | ||
-- asm | ||
mov %r0, 0 | ||
sub %r0, 1 | ||
rsh32 %r0, 40 | ||
exit | ||
-- result | ||
0x00ffffff |
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,9 @@ | ||
# Copyright (c) Big Switch Networks, Inc | ||
# SPDX-License-Identifier: Apache-2.0 | ||
-- asm | ||
mov %r0, 0 | ||
sub %r0, 1 | ||
rsh32 %r0, -24 | ||
exit | ||
-- result | ||
0x00ffffff |
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 @@ | ||
# Copyright (c) Microsoft Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
-- asm | ||
mov %r0, 0x10 | ||
rsh %r0, 68 | ||
exit | ||
-- result | ||
0x1 |
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 @@ | ||
# Copyright (c) Microsoft Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
-- asm | ||
mov %r0, 0x10 | ||
rsh %r0, -60 | ||
exit | ||
-- result | ||
0x1 |