From: Russ Cox Date: Wed, 5 Jun 2013 11:16:53 +0000 (-0400) Subject: runtime: fix comments (g->gobuf became g->sched long ago) X-Git-Tag: go1.2rc2~1316 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=528534c1d4901f832e1ac6b5e2b8a56071ff8427;p=gostls13.git runtime: fix comments (g->gobuf became g->sched long ago) Should reduce size of CL 9868044. R=golang-dev, ality CC=golang-dev https://golang.org/cl/10045043 --- diff --git a/src/pkg/runtime/asm_386.s b/src/pkg/runtime/asm_386.s index 85b500807e..eb75de17a4 100644 --- a/src/pkg/runtime/asm_386.s +++ b/src/pkg/runtime/asm_386.s @@ -194,7 +194,7 @@ TEXT runtime·mcall(SB), 7, $0 MOVL fn+0(FP), DI get_tls(CX) - MOVL g(CX), AX // save state in g->gobuf + MOVL g(CX), AX // save state in g->sched MOVL 0(SP), BX // caller's PC MOVL BX, (g_sched+gobuf_pc)(AX) LEAL 4(SP), BX // caller's SP @@ -208,7 +208,7 @@ TEXT runtime·mcall(SB), 7, $0 JNE 2(PC) CALL runtime·badmcall(SB) MOVL SI, g(CX) // g = m->g0 - MOVL (g_sched+gobuf_sp)(SI), SP // sp = m->g0->gobuf.sp + MOVL (g_sched+gobuf_sp)(SI), SP // sp = m->g0->sched.sp PUSHL AX CALL DI POPL AX @@ -566,11 +566,11 @@ havem: // Switch to m->curg stack and call runtime.cgocallbackg // with the three arguments. Because we are taking over // the execution of m->curg but *not* resuming what had - // been running, we need to save that information (m->curg->gobuf) + // been running, we need to save that information (m->curg->sched) // so that we can restore it when we're done. - // We can restore m->curg->gobuf.sp easily, because calling + // We can restore m->curg->sched.sp easily, because calling // runtime.cgocallbackg leaves SP unchanged upon return. - // To save m->curg->gobuf.pc, we push it onto the stack. + // To save m->curg->sched.pc, we push it onto the stack. // This has the added benefit that it looks to the traceback // routine like cgocallbackg is going to return to that // PC (because we defined cgocallbackg to have @@ -602,7 +602,7 @@ havem: MOVL DI, SP CALL runtime·cgocallbackg(SB) - // Restore g->gobuf (== m->curg->gobuf) from saved values. + // Restore g->sched (== m->curg->sched) from saved values. get_tls(CX) MOVL g(CX), SI MOVL 12(SP), BP diff --git a/src/pkg/runtime/asm_amd64.s b/src/pkg/runtime/asm_amd64.s index af83c0393c..6408da42e9 100644 --- a/src/pkg/runtime/asm_amd64.s +++ b/src/pkg/runtime/asm_amd64.s @@ -181,7 +181,7 @@ TEXT runtime·mcall(SB), 7, $0 MOVQ fn+0(FP), DI get_tls(CX) - MOVQ g(CX), AX // save state in g->gobuf + MOVQ g(CX), AX // save state in g->sched MOVQ 0(SP), BX // caller's PC MOVQ BX, (g_sched+gobuf_pc)(AX) LEAQ 8(SP), BX // caller's SP @@ -195,7 +195,7 @@ TEXT runtime·mcall(SB), 7, $0 JNE 2(PC) CALL runtime·badmcall(SB) MOVQ SI, g(CX) // g = m->g0 - MOVQ (g_sched+gobuf_sp)(SI), SP // sp = m->g0->gobuf.sp + MOVQ (g_sched+gobuf_sp)(SI), SP // sp = m->g0->sched.sp PUSHQ AX CALL DI POPQ AX @@ -605,11 +605,11 @@ havem: // Switch to m->curg stack and call runtime.cgocallbackg // with the three arguments. Because we are taking over // the execution of m->curg but *not* resuming what had - // been running, we need to save that information (m->curg->gobuf) + // been running, we need to save that information (m->curg->sched) // so that we can restore it when we're done. - // We can restore m->curg->gobuf.sp easily, because calling + // We can restore m->curg->sched.sp easily, because calling // runtime.cgocallbackg leaves SP unchanged upon return. - // To save m->curg->gobuf.pc, we push it onto the stack. + // To save m->curg->sched.pc, we push it onto the stack. // This has the added benefit that it looks to the traceback // routine like cgocallbackg is going to return to that // PC (because we defined cgocallbackg to have @@ -641,7 +641,7 @@ havem: MOVQ DI, SP CALL runtime·cgocallbackg(SB) - // Restore g->gobuf (== m->curg->gobuf) from saved values. + // Restore g->sched (== m->curg->sched) from saved values. get_tls(CX) MOVQ g(CX), SI MOVQ 24(SP), BP diff --git a/src/pkg/runtime/asm_arm.s b/src/pkg/runtime/asm_arm.s index d4bcbd5a91..8c7011e1f0 100644 --- a/src/pkg/runtime/asm_arm.s +++ b/src/pkg/runtime/asm_arm.s @@ -158,7 +158,7 @@ TEXT runtime·gogocallfn(SB), 7, $-4 TEXT runtime·mcall(SB), 7, $-4 MOVW fn+0(FP), R0 - // Save caller state in g->gobuf. + // Save caller state in g->sched. MOVW SP, (g_sched+gobuf_sp)(g) MOVW LR, (g_sched+gobuf_pc)(g) MOVW g, (g_sched+gobuf_g)(g) @@ -360,11 +360,11 @@ havem: // Switch to m->curg stack and call runtime.cgocallbackg // with the three arguments. Because we are taking over // the execution of m->curg but *not* resuming what had - // been running, we need to save that information (m->curg->gobuf) + // been running, we need to save that information (m->curg->sched) // so that we can restore it when we're done. - // We can restore m->curg->gobuf.sp easily, because calling + // We can restore m->curg->sched.sp easily, because calling // runtime.cgocallbackg leaves SP unchanged upon return. - // To save m->curg->gobuf.pc, we push it onto the stack. + // To save m->curg->sched.pc, we push it onto the stack. // This has the added benefit that it looks to the traceback // routine like cgocallbackg is going to return to that // PC (because we defined cgocallbackg to have @@ -393,7 +393,7 @@ havem: MOVW R4, R13 BL runtime·cgocallbackg(SB) - // Restore g->gobuf (== m->curg->gobuf) from saved values. + // Restore g->sched (== m->curg->sched) from saved values. MOVW 0(R13), R5 MOVW R5, (g_sched+gobuf_pc)(g) ADD $(12+4), R13, R4