]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix comments (g->gobuf became g->sched long ago)
authorRuss Cox <rsc@golang.org>
Wed, 5 Jun 2013 11:16:53 +0000 (07:16 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 5 Jun 2013 11:16:53 +0000 (07:16 -0400)
Should reduce size of CL 9868044.

R=golang-dev, ality
CC=golang-dev
https://golang.org/cl/10045043

src/pkg/runtime/asm_386.s
src/pkg/runtime/asm_amd64.s
src/pkg/runtime/asm_arm.s

index 85b500807e14d082e9886387dbbedde7a33fbbc7..eb75de17a442d0ceaf9cbd57ea76deef91a38aa1 100644 (file)
@@ -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
index af83c0393c729ec7d27f5307d78828a9669edbdf..6408da42e96d9e3506604cef1311c831539819ee 100644 (file)
@@ -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
index d4bcbd5a91778a63d233b3a12cb2716060b9cef2..8c7011e1f093c750c550db4c555bfe50b927e23c 100644 (file)
@@ -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