mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 18:47:47 +00:00
54169c714f
This simplifies adding more baremetal targets, like a GameBoy Advance, or baremetal x86 for unikernels.
14 lines
413 B
Go
14 lines
413 B
Go
// +build gc.conservative
|
|
// +build baremetal
|
|
|
|
package runtime
|
|
|
|
// markStack marks all root pointers found on the stack.
|
|
//
|
|
// This implementation is conservative and relies on the stack top (provided by
|
|
// the linker) and getting the current stack pointer from a register. Also, it
|
|
// assumes a descending stack. Thus, it is not very portable.
|
|
func markStack() {
|
|
markRoots(getCurrentStackPointer(), stackTop)
|
|
}
|