diff options
author | Martin Möhrmann <moehrmann@google.com> | 2017-04-27 08:30:27 +0200 |
---|---|---|
committer | Martin Möhrmann <moehrmann@google.com> | 2017-05-01 20:46:03 +0000 |
commit | 5a6c58099085a8156bc42b68a7cf51b5b9c72802 (patch) | |
tree | 245a4db2af872b465cfb8e6220c4b8ae26996466 /src/runtime/memmove_386.s | |
parent | 1f85d3ad09152e09d5f4e9b6d9dcec72dbb4ad9b (diff) | |
download | go-5a6c58099085a8156bc42b68a7cf51b5b9c72802.tar.gz go-5a6c58099085a8156bc42b68a7cf51b5b9c72802.zip |
runtime: refactor cpu feature detection for 386 & amd64
Changes all cpu features to be detected and stored in bools in rt0_go.
Updates: #15403
Change-Id: I5a9961cdec789b331d09c44d86beb53833d5dc3e
Reviewed-on: https://go-review.googlesource.com/41950
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/memmove_386.s')
-rw-r--r-- | src/runtime/memmove_386.s | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/memmove_386.s b/src/runtime/memmove_386.s index b712ea182a..e76201b48b 100644 --- a/src/runtime/memmove_386.s +++ b/src/runtime/memmove_386.s @@ -49,8 +49,8 @@ tail: JBE move_5through8 CMPL BX, $16 JBE move_9through16 - TESTL $0x4000000, runtime·cpuid_edx(SB) // check for sse2 - JEQ nosse2 + CMPB runtime·support_sse2(SB), $1 + JNE nosse2 CMPL BX, $32 JBE move_17through32 CMPL BX, $64 @@ -71,8 +71,8 @@ nosse2: */ forward: // If REP MOVSB isn't fast, don't use it - TESTL $(1<<9), runtime·cpuid_ebx7(SB) // erms, aka enhanced REP MOVSB/STOSB - JEQ fwdBy4 + CMPB runtime·support_erms(SB), $1 // enhanced REP MOVSB/STOSB + JNE fwdBy4 // Check alignment MOVL SI, AX |