diff options
author | Keith Randall <khr@golang.org> | 2016-01-13 13:09:46 -0800 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2016-01-13 23:07:40 +0000 |
commit | 8c9ef9dd0a4667611a3afb710a319ba088a754ec (patch) | |
tree | b79cc433891f25b7d562290ae91672aa6635e2c6 | |
parent | 608ddc38bdaed0791979145947d7c08738b5f2a2 (diff) | |
download | go-8c9ef9dd0a4667611a3afb710a319ba088a754ec.tar.gz go-8c9ef9dd0a4667611a3afb710a319ba088a754ec.zip |
runtime: don't use CMOV for 386
CMOVs were not introduced until P6. We need 386 to run on
Pentium MMX.
Fixes #13923
Change-Id: Iee9572cd83e64c3a1336bc1e6b300b048fbcc996
Reviewed-on: https://go-review.googlesource.com/18621
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r-- | src/runtime/asm_386.s | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/runtime/asm_386.s b/src/runtime/asm_386.s index c5f0c51566..4181859724 100644 --- a/src/runtime/asm_386.s +++ b/src/runtime/asm_386.s @@ -1439,7 +1439,8 @@ TEXT strings·IndexByte(SB),NOSPLIT,$0-16 TEXT runtime·cmpbody(SB),NOSPLIT,$0-0 MOVL DX, BP SUBL BX, DX // DX = blen-alen - CMOVLGT BX, BP // BP = min(alen, blen) + JLE 2(PC) + MOVL BX, BP // BP = min(alen, blen) CMPL SI, DI JEQ allsame CMPL BP, $4 @@ -1558,7 +1559,8 @@ TEXT runtime·fastrand1(SB), NOSPLIT, $0-4 ADDL DX, DX MOVL DX, BX XORL $0x88888eef, DX - CMOVLMI BX, DX + JPL 2(PC) + MOVL BX, DX MOVL DX, m_fastrand(AX) MOVL DX, ret+0(FP) RET |