diff options
| author | Martin Möhrmann <moehrmann@google.com> | 2018-07-28 10:56:48 +0200 |
|---|---|---|
| committer | Martin Möhrmann <moehrmann@google.com> | 2018-08-24 07:29:52 +0000 |
| commit | c15c04d9e85a6a2c46ae57cb830192e0eee276dc (patch) | |
| tree | 83dd5c15182196d11597cfad6823987138297c70 /src/runtime/runtime2.go | |
| parent | d8cf1514cadb512de6972e760ccef76452e3a67c (diff) | |
| download | go-c15c04d9e85a6a2c46ae57cb830192e0eee276dc.tar.xz | |
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/runtime2.go')
| -rw-r--r-- | src/runtime/runtime2.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index bbbe1ee852..9311924942 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -836,16 +836,15 @@ var ( newprocs int32 // Information about what cpu features are available. - // Set on startup in runtime.cpuinit. // Packages outside the runtime should not use these // as they are not an external api. - // TODO: deprecate these; use internal/cpu directly. + // Set on startup in asm_{386,amd64,amd64p32}.s processorVersionInfo uint32 isIntel bool lfenceBeforeRdtsc bool // Set in runtime.cpuinit. - support_erms bool + // TODO: deprecate these; use internal/cpu directly. support_popcnt bool support_sse2 bool support_sse41 bool |
