Commit 5b21bf6f authored by Tobias Klauser's avatar Tobias Klauser Committed by Tobias Klauser

runtime: simplify walltime/nanotime on linux/{386,amd64}

Avoid an unnecessary MOVL/MOVQ.

Follow CL 97377

Change-Id: Ic43976d6b0cece3ed455496d18aedd67e0337d3f
Reviewed-on: https://go-review.googlesource.com/97358
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 2013ad89
......@@ -203,9 +203,8 @@ TEXT runtime·walltime(SB), NOSPLIT, $0-12
get_tls(CX)
MOVL g(CX), AX
MOVL g_m(AX), CX
MOVL m_curg(CX), DX
CMPL AX, DX // Only switch if on curg.
CMPL AX, m_curg(CX) // Only switch if on curg.
JNE noswitch
MOVL m_g0(CX), DX
......@@ -260,9 +259,8 @@ TEXT runtime·nanotime(SB), NOSPLIT, $0-8
get_tls(CX)
MOVL g(CX), AX
MOVL g_m(AX), CX
MOVL m_curg(CX), DX
CMPL AX, DX // Only switch if on curg.
CMPL AX, m_curg(CX) // Only switch if on curg.
JNE noswitch
MOVL m_g0(CX), DX
......
......@@ -189,9 +189,8 @@ TEXT runtime·walltime(SB),NOSPLIT,$0-12
get_tls(CX)
MOVQ g(CX), AX
MOVQ g_m(AX), CX
MOVQ m_curg(CX), DX
CMPQ AX, DX // Only switch if on curg.
CMPQ AX, m_curg(CX) // Only switch if on curg.
JNE noswitch
MOVQ m_g0(CX), DX
......@@ -234,9 +233,8 @@ TEXT runtime·nanotime(SB),NOSPLIT,$0-8
get_tls(CX)
MOVQ g(CX), AX
MOVQ g_m(AX), CX
MOVQ m_curg(CX), DX
CMPQ AX, DX // Only switch if on curg.
CMPQ AX, m_curg(CX) // Only switch if on curg.
JNE noswitch
MOVQ m_g0(CX), DX
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment