aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/asm_386.s
diff options
context:
space:
mode:
authorMartin Möhrmann <moehrmann@google.com>2018-07-28 10:56:48 +0200
committerMartin Möhrmann <moehrmann@google.com>2018-08-24 07:29:52 +0000
commitc15c04d9e85a6a2c46ae57cb830192e0eee276dc (patch)
tree83dd5c15182196d11597cfad6823987138297c70 /src/runtime/asm_386.s
parentd8cf1514cadb512de6972e760ccef76452e3a67c (diff)
downloadgo-c15c04d9e85a6a2c46ae57cb830192e0eee276dc.tar.gz
go-c15c04d9e85a6a2c46ae57cb830192e0eee276dc.zip
runtime: use internal/cpu variables in assembler code
Using internal/cpu variables has the benefit of avoiding false sharing (as those are padded) and allows memory and cache usage for these variables to be shared by multiple packages. Change-Id: I2bf68d03091bf52b466cf689230d5d25d5950037 Reviewed-on: https://go-review.googlesource.com/126599 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/asm_386.s')
-rw-r--r--src/runtime/asm_386.s2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/asm_386.s b/src/runtime/asm_386.s
index a6a81c3f63..725271eec4 100644
--- a/src/runtime/asm_386.s
+++ b/src/runtime/asm_386.s
@@ -881,7 +881,7 @@ TEXT runtime·stackcheck(SB), NOSPLIT, $0-0
// func cputicks() int64
TEXT runtime·cputicks(SB),NOSPLIT,$0-8
- CMPB runtime·support_sse2(SB), $1
+ CMPB internal∕cpu·X86+const_offset_x86_HasSSE2(SB), $1
JNE done
CMPB runtime·lfenceBeforeRdtsc(SB), $1
JNE mfence