-
Notifications
You must be signed in to change notification settings - Fork 20
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
4 changed files
with
129 additions
and
0 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,30 @@ | ||
--TEST-- | ||
001: Combine ROL/ROR | ||
--ARGS-- | ||
-O2 --save | ||
--CODE-- | ||
{ | ||
uintptr_t c_1 = 0; | ||
bool c_2 = 0; | ||
bool c_3 = 1; | ||
int32_t c_4 = 32; | ||
l_1 = START(l_12); | ||
int32_t d_2 = PARAM(l_1, "x", 0); | ||
int32_t d_3 = PARAM(l_1, "y", 1); | ||
int32_t d_4 = SHL(d_2, d_3); | ||
int32_t d_5 = SUB(c_4, d_3); | ||
int32_t d_6 = SHR(d_2, d_5); | ||
int32_t d_7 = OR(d_4, d_6); | ||
l_12 = RETURN(l_1, d_7); | ||
} | ||
--EXPECT-- | ||
{ | ||
uintptr_t c_1 = 0; | ||
bool c_2 = 0; | ||
bool c_3 = 1; | ||
l_1 = START(l_5); | ||
int32_t d_2 = PARAM(l_1, "x", 0); | ||
int32_t d_3 = PARAM(l_1, "y", 1); | ||
int32_t d_4 = ROL(d_2, d_3); | ||
l_5 = RETURN(l_1, d_4); | ||
} |
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,30 @@ | ||
--TEST-- | ||
001: Combine ROL/ROR | ||
--ARGS-- | ||
-O2 --save | ||
--CODE-- | ||
{ | ||
uintptr_t c_1 = 0; | ||
bool c_2 = 0; | ||
bool c_3 = 1; | ||
int32_t c_4 = 32; | ||
l_1 = START(l_12); | ||
int32_t d_2 = PARAM(l_1, "x", 0); | ||
int32_t d_3 = PARAM(l_1, "y", 1); | ||
int32_t d_4 = SUB(c_4, d_3); | ||
int32_t d_5 = SHL(d_2, d_4); | ||
int32_t d_6 = SHR(d_2, d_3); | ||
int32_t d_7 = OR(d_5, d_6); | ||
l_12 = RETURN(l_1, d_7); | ||
} | ||
--EXPECT-- | ||
{ | ||
uintptr_t c_1 = 0; | ||
bool c_2 = 0; | ||
bool c_3 = 1; | ||
l_1 = START(l_5); | ||
int32_t d_2 = PARAM(l_1, "x", 0); | ||
int32_t d_3 = PARAM(l_1, "y", 1); | ||
int32_t d_4 = ROR(d_2, d_3); | ||
l_5 = RETURN(l_1, d_4); | ||
} |
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,29 @@ | ||
--TEST-- | ||
001: Combine ROL/ROR | ||
--ARGS-- | ||
-O2 --save | ||
--CODE-- | ||
{ | ||
uintptr_t c_1 = 0; | ||
bool c_2 = 0; | ||
bool c_3 = 1; | ||
int32_t c_4 = 12; | ||
int32_t c_5 = 20; | ||
l_1 = START(l_12); | ||
int32_t d_2 = PARAM(l_1, "x", 0); | ||
int32_t d_3 = SHL(d_2, c_4); | ||
int32_t d_4 = SHR(d_2, c_5); | ||
int32_t d_5 = OR(d_3, d_4); | ||
l_12 = RETURN(l_1, d_5); | ||
} | ||
--EXPECT-- | ||
{ | ||
uintptr_t c_1 = 0; | ||
bool c_2 = 0; | ||
bool c_3 = 1; | ||
int32_t c_4 = 12; | ||
l_1 = START(l_4); | ||
int32_t d_2 = PARAM(l_1, "x", 0); | ||
int32_t d_3 = ROL(d_2, c_4); | ||
l_4 = RETURN(l_1, d_3); | ||
} |