]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove VZEROUPPER in asyncPreempt on darwin/amd64
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Sat, 3 Feb 2024 03:47:28 +0000 (10:47 +0700)
committerGopher Robot <gobot@golang.org>
Tue, 23 Jul 2024 17:16:29 +0000 (17:16 +0000)
Updates #37174
Updates #49233
Fixes #41152

Change-Id: I35b148c8bc132f02dd6a5a6bb48b711fb5c5df9e
Reviewed-on: https://go-review.googlesource.com/c/go/+/560955
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/mkpreempt.go
src/runtime/preempt_amd64.s

index 17544d6b21532c3ea9a40107c234e4b1fc62c867..08500a90d532ed8da85575de1a3720c746381738 100644 (file)
@@ -264,19 +264,6 @@ func genAMD64() {
 
        l.save()
 
-       // Apparently, the signal handling code path in darwin kernel leaves
-       // the upper bits of Y registers in a dirty state, which causes
-       // many SSE operations (128-bit and narrower) become much slower.
-       // Clear the upper bits to get to a clean state. See issue #37174.
-       // It is safe here as Go code don't use the upper bits of Y registers.
-       p("#ifdef GOOS_darwin")
-       p("#ifndef hasAVX")
-       p("CMPB internal∕cpu·X86+const_offsetX86HasAVX(SB), $0")
-       p("JE 2(PC)")
-       p("#endif")
-       p("VZEROUPPER")
-       p("#endif")
-
        lSSE.save()
        p("CALL ·asyncPreempt2(SB)")
        lSSE.restore()
index 94a84fb74cafa752a4991360600fb3022ce9bf84..8e3ed0d7c59dcee445b3f89e116ff5bef1ead8cb 100644 (file)
@@ -27,13 +27,6 @@ TEXT ·asyncPreempt(SB),NOSPLIT|NOFRAME,$0-0
        MOVQ R13, 88(SP)
        MOVQ R14, 96(SP)
        MOVQ R15, 104(SP)
-       #ifdef GOOS_darwin
-       #ifndef hasAVX
-       CMPB internal∕cpu·X86+const_offsetX86HasAVX(SB), $0
-       JE 2(PC)
-       #endif
-       VZEROUPPER
-       #endif
        MOVUPS X0, 112(SP)
        MOVUPS X1, 128(SP)
        MOVUPS X2, 144(SP)