forked from tinygo-org/tinygo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime (gc): scan callee-saved registers while marking stack
- Loading branch information
1 parent
cbaa58a
commit 9f8715c
Showing
8 changed files
with
152 additions
and
3 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
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
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 @@ | ||
.section .text.tinygo_scanCurrentStack | ||
.global tinygo_scanCurrentStack | ||
.type tinygo_scanCurrentStack, %function | ||
tinygo_scanCurrentStack: | ||
// Push callee-saved registers onto the stack. | ||
addi sp, sp, -64 | ||
sw ra, 60(sp) | ||
sw s11, 56(sp) | ||
sw s10, 52(sp) | ||
sw s9, 48(sp) | ||
sw s8, 44(sp) | ||
sw s7, 40(sp) | ||
sw s6, 36(sp) | ||
sw s5, 32(sp) | ||
sw s4, 28(sp) | ||
sw s3, 24(sp) | ||
sw s2, 20(sp) | ||
sw s1, 16(sp) | ||
sw s0, 12(sp) | ||
|
||
// Scan the stack. | ||
mv a0, sp | ||
call tinygo_scanstack | ||
|
||
// Restore stack state. | ||
addi sp, sp, 64 | ||
|
||
// Return to the caller. | ||
ret |
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