diff options
| author | Russ Cox <rsc@golang.org> | 2010-01-25 18:52:55 -0800 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-01-25 18:52:55 -0800 |
| commit | 718be3215ffd6f8d4bfd8fa836cb2799d3366501 (patch) | |
| tree | 5de75ffa5504b39acc53f938e513f3261b173454 /src/pkg/runtime/amd64 | |
| parent | c90b05bf7dab3a03a018f018d56b456b7ce7c2c5 (diff) | |
| download | go-718be3215ffd6f8d4bfd8fa836cb2799d3366501.tar.xz | |
in C and asm, replace pkg·name with ·name
(eliminate assumption of package global name space,
make code easier to move between packages).
R=r
CC=golang-dev
https://golang.org/cl/194072
Diffstat (limited to 'src/pkg/runtime/amd64')
| -rw-r--r-- | src/pkg/runtime/amd64/asm.s | 50 | ||||
| -rw-r--r-- | src/pkg/runtime/amd64/closure.c | 2 | ||||
| -rw-r--r-- | src/pkg/runtime/amd64/traceback.c | 8 |
3 files changed, 30 insertions, 30 deletions
diff --git a/src/pkg/runtime/amd64/asm.s b/src/pkg/runtime/amd64/asm.s index 3bd63ad15b..a7d1c9711e 100644 --- a/src/pkg/runtime/amd64/asm.s +++ b/src/pkg/runtime/amd64/asm.s @@ -37,7 +37,7 @@ TEXT _rt0_amd64(SB),7,$-8 // create a new goroutine to start program PUSHQ $mainstart(SB) // entry PUSHQ $0 // arg size - CALL runtime·newproc(SB) + CALL ·newproc(SB) POPQ AX POPQ AX @@ -107,7 +107,7 @@ TEXT gogocall(SB), 7, $0 */ // Called during function prolog when more stack is needed. -TEXT runtime·morestack(SB),7,$0 +TEXT ·morestack(SB),7,$0 // Called from f. // Set m->morebuf to f's caller. MOVQ 8(SP), AX // f's caller's PC @@ -165,7 +165,7 @@ TEXT reflect·call(SB), 7, $0 RET // Return point when leaving stack. -TEXT runtime·lessstack(SB), 7, $0 +TEXT ·lessstack(SB), 7, $0 // Save return value in m->cret MOVQ AX, m_cret(m) @@ -177,66 +177,66 @@ TEXT runtime·lessstack(SB), 7, $0 RET // morestack trampolines -TEXT runtime·morestack00+0(SB),7,$0 +TEXT ·morestack00+0(SB),7,$0 MOVQ $0, AX MOVQ AX, m_moreframe(m) - MOVQ $runtime·morestack+0(SB), AX + MOVQ $·morestack+0(SB), AX JMP AX -TEXT runtime·morestack01+0(SB),7,$0 +TEXT ·morestack01+0(SB),7,$0 SHLQ $32, AX MOVQ AX, m_moreframe(m) - MOVQ $runtime·morestack+0(SB), AX + MOVQ $·morestack+0(SB), AX JMP AX -TEXT runtime·morestack10+0(SB),7,$0 +TEXT ·morestack10+0(SB),7,$0 MOVLQZX AX, AX MOVQ AX, m_moreframe(m) - MOVQ $runtime·morestack+0(SB), AX + MOVQ $·morestack+0(SB), AX JMP AX -TEXT runtime·morestack11+0(SB),7,$0 +TEXT ·morestack11+0(SB),7,$0 MOVQ AX, m_moreframe(m) - MOVQ $runtime·morestack+0(SB), AX + MOVQ $·morestack+0(SB), AX JMP AX // subcases of morestack01 // with const of 8,16,...48 -TEXT runtime·morestack8(SB),7,$0 +TEXT ·morestack8(SB),7,$0 PUSHQ $1 - MOVQ $runtime·morestackx(SB), AX + MOVQ $·morestackx(SB), AX JMP AX -TEXT runtime·morestack16(SB),7,$0 +TEXT ·morestack16(SB),7,$0 PUSHQ $2 - MOVQ $runtime·morestackx(SB), AX + MOVQ $·morestackx(SB), AX JMP AX -TEXT runtime·morestack24(SB),7,$0 +TEXT ·morestack24(SB),7,$0 PUSHQ $3 - MOVQ $runtime·morestackx(SB), AX + MOVQ $·morestackx(SB), AX JMP AX -TEXT runtime·morestack32(SB),7,$0 +TEXT ·morestack32(SB),7,$0 PUSHQ $4 - MOVQ $runtime·morestackx(SB), AX + MOVQ $·morestackx(SB), AX JMP AX -TEXT runtime·morestack40(SB),7,$0 +TEXT ·morestack40(SB),7,$0 PUSHQ $5 - MOVQ $runtime·morestackx(SB), AX + MOVQ $·morestackx(SB), AX JMP AX -TEXT runtime·morestack48(SB),7,$0 +TEXT ·morestack48(SB),7,$0 PUSHQ $6 - MOVQ $runtime·morestackx(SB), AX + MOVQ $·morestackx(SB), AX JMP AX -TEXT runtime·morestackx(SB),7,$0 +TEXT ·morestackx(SB),7,$0 POPQ AX SHLQ $35, AX MOVQ AX, m_moreframe(m) - MOVQ $runtime·morestack(SB), AX + MOVQ $·morestack(SB), AX JMP AX // bool cas(int32 *val, int32 old, int32 new) diff --git a/src/pkg/runtime/amd64/closure.c b/src/pkg/runtime/amd64/closure.c index 44c399bbe9..de2d1695ff 100644 --- a/src/pkg/runtime/amd64/closure.c +++ b/src/pkg/runtime/amd64/closure.c @@ -9,7 +9,7 @@ // fn func(arg0, arg1, arg2 *ptr, callerpc uintptr, xxx) yyy, // arg0, arg1, arg2 *ptr) (func(xxx) yyy) void -runtime·closure(int32 siz, byte *fn, byte *arg0) +·closure(int32 siz, byte *fn, byte *arg0) { byte *p, *q, **ret; int32 i, n; diff --git a/src/pkg/runtime/amd64/traceback.c b/src/pkg/runtime/amd64/traceback.c index a260b7e4cc..8fe23f32ee 100644 --- a/src/pkg/runtime/amd64/traceback.c +++ b/src/pkg/runtime/amd64/traceback.c @@ -24,7 +24,7 @@ traceback(byte *pc0, byte *sp, G *g) stk = (Stktop*)g->stackbase; for(n=0; n<100; n++) { - if(pc == (uint64)runtime·lessstack) { + if(pc == (uint64)·lessstack) { // pop to earlier stack block // printf("-- stack jump %p => %p\n", sp, stk->gobuf.sp); pc = (uintptr)stk->gobuf.pc; @@ -65,7 +65,7 @@ traceback(byte *pc0, byte *sp, G *g) for(i = 0; i < f->args; i++) { if(i != 0) prints(", "); - runtime·printhex(((uint32*)sp)[i]); + ·printhex(((uint32*)sp)[i]); if(i >= 4) { prints(", ..."); break; @@ -82,7 +82,7 @@ traceback(byte *pc0, byte *sp, G *g) // func caller(n int) (pc uint64, file string, line int, ok bool) void -runtime·Caller(int32 n, uint64 retpc, String retfile, int32 retline, bool retbool) +·Caller(int32 n, uint64 retpc, String retfile, int32 retline, bool retbool) { uint64 pc; byte *sp; @@ -109,7 +109,7 @@ runtime·Caller(int32 n, uint64 retpc, String retfile, int32 retline, bool retbo // now unwind n levels stk = (Stktop*)g->stackbase; while(n-- > 0) { - while(pc == (uintptr)runtime·lessstack) { + while(pc == (uintptr)·lessstack) { pc = (uintptr)stk->gobuf.pc; sp = stk->gobuf.sp; stk = (Stktop*)stk->stackbase; |
