diff options
Diffstat (limited to 'src/pkg/runtime/asm_386.s')
| -rw-r--r-- | src/pkg/runtime/asm_386.s | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/pkg/runtime/asm_386.s b/src/pkg/runtime/asm_386.s index 67c8854c3b..5238e59437 100644 --- a/src/pkg/runtime/asm_386.s +++ b/src/pkg/runtime/asm_386.s @@ -195,7 +195,12 @@ TEXT runtime·mcall(SB), 7, $0-4 */ // Called during function prolog when more stack is needed. -TEXT runtime·morestack(SB),7,$0 +// +// The traceback routines see morestack on a g0 as being +// the top of a stack (for example, morestack calling newstack +// calling the scheduler calling newm calling gc), so we must +// record an argument size. For that purpose, it has no arguments. +TEXT runtime·morestack(SB),7,$0-0 // Cannot grow scheduler stack (m->g0). get_tls(CX) MOVL m(CX), BX @@ -288,7 +293,10 @@ TEXT reflect·call(SB), 7, $0-12 // Return point when leaving stack. -TEXT runtime·lessstack(SB), 7, $0 +// +// Lessstack can appear in stack traces for the same reason +// as morestack; in that context, it has 0 arguments. +TEXT runtime·lessstack(SB), 7, $0-0 // Save return value in m->cret get_tls(CX) MOVL m(CX), BX |
