diff options
Diffstat (limited to 'src/runtime/sys_solaris_amd64.s')
-rw-r--r-- | src/runtime/sys_solaris_amd64.s | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/runtime/sys_solaris_amd64.s b/src/runtime/sys_solaris_amd64.s index 0ebdab6ee..54aeaeaf5 100644 --- a/src/runtime/sys_solaris_amd64.s +++ b/src/runtime/sys_solaris_amd64.s @@ -6,14 +6,15 @@ // /usr/include/sys/syscall.h for syscall numbers. // -#include "zasm_GOOS_GOARCH.h" +#include "go_asm.h" +#include "go_tls.h" #include "textflag.h" // This is needed by asm_amd64.s TEXT runtime·settls(SB),NOSPLIT,$8 RET -// void libc·miniterrno(void *(*___errno)(void)); +// void libc_miniterrno(void *(*___errno)(void)); // // Set the TLS errno pointer in M. // @@ -40,7 +41,7 @@ TEXT runtime·nanotime1(SB),NOSPLIT,$0 SUBQ $64, SP // 16 bytes will do, but who knows in the future? MOVQ $3, DI // CLOCK_REALTIME from <sys/time_impl.h> MOVQ SP, SI - MOVQ libc·clock_gettime(SB), AX + MOVQ libc_clock_gettime(SB), AX CALL AX MOVQ (SP), AX // tv_sec from struct timespec IMULQ $1000000000, AX // multiply into nanoseconds @@ -53,7 +54,7 @@ TEXT runtime·nanotime1(SB),NOSPLIT,$0 TEXT runtime·pipe1(SB),NOSPLIT,$0 SUBQ $16, SP // 8 bytes will do, but stack has to be 16-byte alligned MOVQ SP, DI - MOVQ libc·pipe(SB), AX + MOVQ libc_pipe(SB), AX CALL AX MOVL 0(SP), AX MOVL 4(SP), DX @@ -132,7 +133,7 @@ TEXT runtime·tstart_sysvicall(SB),NOSPLIT,$0 MOVQ AX, (g_stack+stack_hi)(DX) SUBQ $(0x100000), AX // stack size MOVQ AX, (g_stack+stack_lo)(DX) - ADDQ $const_StackGuard, AX + ADDQ $const__StackGuard, AX MOVQ AX, g_stackguard0(DX) MOVQ AX, g_stackguard1(DX) @@ -287,24 +288,24 @@ TEXT runtime·usleep1(SB),NOSPLIT,$0 // Execute call on m->g0. get_tls(R15) CMPQ R15, $0 - JE usleep1_noswitch + JE noswitch MOVQ g(R15), R13 CMPQ R13, $0 - JE usleep1_noswitch + JE noswitch MOVQ g_m(R13), R13 CMPQ R13, $0 - JE usleep1_noswitch + JE noswitch // TODO(aram): do something about the cpu profiler here. MOVQ m_g0(R13), R14 CMPQ g(R15), R14 - JNE usleep1_switch + JNE switch // executing on m->g0 already CALL AX RET -usleep1_switch: +switch: // Switch to m->g0 stack and back. MOVQ (g_sched+gobuf_sp)(R14), R14 MOVQ SP, -8(R14) @@ -313,20 +314,20 @@ usleep1_switch: MOVQ 0(SP), SP RET -usleep1_noswitch: +noswitch: // Not a Go-managed thread. Do not switch stack. CALL AX RET // Runs on OS stack. duration (in µs units) is in DI. TEXT runtime·usleep2(SB),NOSPLIT,$0 - MOVQ libc·usleep(SB), AX + MOVQ libc_usleep(SB), AX CALL AX RET // Runs on OS stack, called from runtime·osyield. TEXT runtime·osyield1(SB),NOSPLIT,$0 - MOVQ libc·sched_yield(SB), AX + MOVQ libc_sched_yield(SB), AX CALL AX RET |