mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 19:43:44 +00:00
mips: fix a bug when scanning the stack
Previously the assembler was reordering this code:
jal tinygo_scanstack
move $a0, $sp
Into this:
jal tinygo_scanstack
nop
move $a0, $sp
So it was "helpfully" inserting a branch delay slot, even though this
was already being taken care of.
Somehow this didn't break, but it does break in the WIP threading branch
(https://github.com/tinygo-org/tinygo/pull/4559) where this bug leads to
a crash.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
// Do not reorder instructions to insert a branch delay slot.
|
||||
// We know what we're doing, and will manually fill the branch delay slot.
|
||||
.set noreorder
|
||||
|
||||
.section .text.tinygo_startTask
|
||||
.global tinygo_startTask
|
||||
.type tinygo_startTask, %function
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
// Do not reorder instructions to insert a branch delay slot.
|
||||
// We know what we're doing, and will manually fill the branch delay slot.
|
||||
.set noreorder
|
||||
|
||||
.section .text.tinygo_scanCurrentStack
|
||||
.global tinygo_scanCurrentStack
|
||||
.type tinygo_scanCurrentStack, %function
|
||||
|
||||
Reference in New Issue
Block a user