From 0d71bd57c94f2e07788699b8134486ff46e88767 Mon Sep 17 00:00:00 2001 From: Cherry Mui Date: Tue, 9 Dec 2025 11:48:41 -0500 Subject: [PATCH] runtime: VZEROUPPER at the end of FilterNilAVX512 VZEROUPPER at the end of FilterNilAVX512 as we're leaving AVX context. Also explicitly zero Z15, as the high bits are not guaranteed zero as of CL 728240. Change-Id: I000a199206d0b8fd4905c8a699e934551bbd3c60 Reviewed-on: https://go-review.googlesource.com/c/go/+/728740 Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI --- src/internal/runtime/gc/scan/filter_amd64.s | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/internal/runtime/gc/scan/filter_amd64.s b/src/internal/runtime/gc/scan/filter_amd64.s index 47330b62ee..2897d3c026 100644 --- a/src/internal/runtime/gc/scan/filter_amd64.s +++ b/src/internal/runtime/gc/scan/filter_amd64.s @@ -16,6 +16,7 @@ TEXT ·FilterNilAVX512(SB), NOSPLIT, $0-20 SUBL R10, R12 // R12 = n - scanned CMPL R12, $8 // Compare (n - scanned) with 8 JLT scalar_loop // If (n - scanned) < 8, jump to the scalar cleanup + VPXOR X15, X15, X15 // Zero the high bits of Z15 vector_loop: LEAQ (R8)(R10*8), R13 // R13 = buf[scanned:] address @@ -61,4 +62,5 @@ scalar_increment_i: end: MOVL R11, ret+16(FP) + VZEROUPPER RET -- 2.52.0