-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GH-100: Incorrect stack alignment with VAR on aarch64
sp register must be always 16-bytes aligned
- Loading branch information
Showing
4 changed files
with
37 additions
and
10 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,27 @@ | ||
--TEST-- | ||
GH-100: incorrect stack alignment with VAR on aarch64 | ||
--TARGET-- | ||
aarch64 | ||
--ARGS-- | ||
-O0 -S --run | ||
--CODE-- | ||
{ | ||
int32_t c_1 = 42; | ||
l_1 = START(l_4); | ||
int32_t p = PARAM(l_1, "p", 1); | ||
int32_t v = VAR(l_1, "v"); | ||
l_2 = VSTORE(l_1, v, c_1); | ||
int32_t d_3, l_3 = VLOAD(l_2, v); | ||
l_4 = RETURN(l_3, d_3); | ||
} | ||
--EXPECT-- | ||
main: | ||
sub sp, sp, #0x10 | ||
movz w0, #0x2a | ||
str w0, [sp] | ||
ldr w0, [sp] | ||
add sp, sp, #0x10 | ||
ret | ||
|
||
|
||
exit code = 42 |
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