aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-05-31 09:35:37 -0400
committerRuss Cox <rsc@golang.org>2014-05-31 09:35:37 -0400
commit19c8f67e25dc25abdca34b1ebbfa6ed8439a7071 (patch)
treea08f024f283f1213503a7d6ec6492200ea67a512
parenta238973949287d6d00a5b014135032dd4e0012fb (diff)
downloadgo-19c8f67e25dc25abdca34b1ebbfa6ed8439a7071.tar.gz
go-19c8f67e25dc25abdca34b1ebbfa6ed8439a7071.zip
runtime: fix error check in freebsd/386 i386_set_ldt
Update #2675 The code here was using the error check for Linux/386, not the one for FreeBSD/386. Most of the time it worked. Thanks to Neel Natu (FreeBSD developer) for finding this. The s/JCC/JAE/ a few lines later is a no-op but makes the test match the rest of the file. Why we write JAE instead of JCC I don't know, but the two are equivalent and the file might as well be consistent. LGTM=bradfitz, minux R=golang-codereviews, bradfitz, minux CC=golang-codereviews https://golang.org/cl/99680044
-rw-r--r--src/pkg/runtime/sys_freebsd_386.s5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pkg/runtime/sys_freebsd_386.s b/src/pkg/runtime/sys_freebsd_386.s
index 71245a1562..4c97eec7b1 100644
--- a/src/pkg/runtime/sys_freebsd_386.s
+++ b/src/pkg/runtime/sys_freebsd_386.s
@@ -309,8 +309,7 @@ TEXT runtime·i386_set_ldt(SB),NOSPLIT,$16
MOVL AX, 8(SP)
MOVL $165, AX
INT $0x80
- CMPL AX, $0xfffff001
- JLS 2(PC)
+ JAE 2(PC)
INT $3
RET
@@ -326,7 +325,7 @@ TEXT runtime·sysctl(SB),NOSPLIT,$28
MOVSL // arg 6 - newlen
MOVL $202, AX // sys___sysctl
INT $0x80
- JCC 3(PC)
+ JAE 3(PC)
NEGL AX
RET
MOVL $0, AX