From 4b209dbf0bf3e5fd4cffda1e11f11bf45ddf212d Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Tue, 29 Mar 2016 21:25:33 -0700 Subject: runtime: don't use REP;MOVSB if CPUID doesn't say it is fast Only use REP;MOVSB if: 1) The CPUID flag says it is fast, and 2) The pointers are unaligned Otherwise, use REP;MOVSQ. Update #14630 Change-Id: I946b28b87880c08e5eed1ce2945016466c89db66 Reviewed-on: https://go-review.googlesource.com/21300 Reviewed-by: Nigel Tao --- src/runtime/runtime2.go | 1 + 1 file changed, 1 insertion(+) (limited to 'src/runtime/runtime2.go') diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index e1b1c83453..457927c804 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -701,6 +701,7 @@ var ( // Set on startup in asm_{x86,amd64}.s. cpuid_ecx uint32 cpuid_edx uint32 + cpuid_ebx7 uint32 lfenceBeforeRdtsc bool support_avx bool support_avx2 bool -- cgit v1.3