diff options
Diffstat (limited to 'src/pkg/runtime/386/asm.s')
-rw-r--r-- | src/pkg/runtime/386/asm.s | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/pkg/runtime/386/asm.s b/src/pkg/runtime/386/asm.s index 84f5367e5..63d582606 100644 --- a/src/pkg/runtime/386/asm.s +++ b/src/pkg/runtime/386/asm.s @@ -18,9 +18,10 @@ TEXT _rt0_386(SB),7,$0 // we set up GS ourselves. MOVL initcgo(SB), AX TESTL AX, AX - JZ 3(PC) + JZ 4(PC) CALL AX - JMP ok + CMPL runtime·iswindows(SB), $0 + JEQ ok // set up %gs CALL runtime·ldt0setup(SB) @@ -46,7 +47,7 @@ ok: MOVL CX, m_g0(AX) // create istack out of the OS stack - LEAL (-8192+104)(SP), AX // TODO: 104? + LEAL (-64*1024+104)(SP), AX // TODO: 104? MOVL AX, g_stackguard(CX) MOVL SP, g_stackbase(CX) CALL runtime·emptyfunc(SB) // fault if stack check is wrong @@ -156,8 +157,8 @@ TEXT runtime·morestack(SB),7,$0 // frame size in DX // arg size in AX // Save in m. - MOVL DX, m_moreframe(BX) - MOVL AX, m_moreargs(BX) + MOVL DX, m_moreframesize(BX) + MOVL AX, m_moreargsize(BX) // Called from f. // Set m->morebuf to f's caller. @@ -165,7 +166,7 @@ TEXT runtime·morestack(SB),7,$0 MOVL DI, (m_morebuf+gobuf_pc)(BX) LEAL 8(SP), CX // f's caller's SP MOVL CX, (m_morebuf+gobuf_sp)(BX) - MOVL CX, (m_morefp)(BX) + MOVL CX, m_moreargp(BX) get_tls(CX) MOVL g(CX), SI MOVL SI, (m_morebuf+gobuf_g)(BX) @@ -213,9 +214,9 @@ TEXT reflect·call(SB), 7, $0 MOVL 12(SP), CX // arg size MOVL AX, m_morepc(BX) // f's PC - MOVL DX, m_morefp(BX) // argument frame pointer - MOVL CX, m_moreargs(BX) // f's argument size - MOVL $1, m_moreframe(BX) // f's frame size + MOVL DX, m_moreargp(BX) // f's argument pointer + MOVL CX, m_moreargsize(BX) // f's argument size + MOVL $1, m_moreframesize(BX) // f's frame size // Call newstack on m's scheduling stack. MOVL m_g0(BX), BP |