Move timenow thunk into time.s
Move declarations for generic c/asm services into stubs.go
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/
137360043
RET
-TEXT runtime·timenow(SB), NOSPLIT, $0-0
- JMP time·now(SB)
-
TEXT runtime·fastrand1(SB), NOSPLIT, $0-4
get_tls(CX)
MOVL g(CX), AX
RET
-TEXT runtime·timenow(SB), NOSPLIT, $0-0
- JMP time·now(SB)
-
TEXT runtime·fastrand1(SB), NOSPLIT, $0-4
get_tls(CX)
MOVQ g(CX), AX
MOVB AX, ret+24(FP)
RET
-TEXT runtime·timenow(SB), NOSPLIT, $0-0
- JMP time·now(SB)
-
TEXT runtime·fastrand1(SB), NOSPLIT, $0-4
get_tls(CX)
MOVL g(CX), AX
MOVW R0, ret+12(FP)
RET
-TEXT runtime·timenow(SB),NOSPLIT,$0-0
- B time·now(SB)
-
// A Duff's device for zeroing memory.
// The compiler jumps to computed addresses within
// this routine to zero chunks of memory. Do not
return callers(skip, &pc[0], len(pc))
}
-func getgoroot() string
-
// GOROOT returns the root of the Go tree.
// It uses the GOROOT environment variable, if set,
// or else the root used during the Go build.
*ret = x
}
-func timenow() (sec int64, nsec int32)
-
func gc_unixnanotime(now *int64) {
sec, nsec := timenow()
*now = sec*1e9 + int64(nsec)
atomicstore64(&blockprofilerate, uint64(r))
}
-func fastrand1() uint32 // assembly
-func readgstatus(*g) uint32 // proc.c
-
func blockevent(cycles int64, skip int) {
if cycles <= 0 {
return
func acquirem() *m
func releasem(mp *m)
func gomcache() *mcache
+func readgstatus(*g) uint32 // proc.c
// mcall switches from the g to the g0 stack and invokes fn(g),
// where g is the goroutine that made the call.
// exported value for testing
var hashLoad = loadFactor
+// in asm_*.s
+func fastrand1() uint32
+
// in asm_*.s
//go:noescape
func memeq(a, b unsafe.Pointer, size uintptr) bool
// to deferreturn.
// in asm_*.s
func return0()
+
+// thunk to call time.now.
+func timenow() (sec int64, nsec int32)
TEXT runtime·main_main(SB),NOSPLIT,$0-0
JMP main·main(SB)
+
+TEXT runtime·timenow(SB), NOSPLIT, $0-0
+ JMP time·now(SB)