diff --git a/tools/simdstring/generate.go b/tools/simdstring/generate.go index 07e4f96b7..fdbd2bf80 100644 --- a/tools/simdstring/generate.go +++ b/tools/simdstring/generate.go @@ -1048,6 +1048,10 @@ func (s *Function) OutputASM(w io.Writer) { s.print_signature(w) fmt.Fprintf(w, "\nTEXT ยท%s(SB), NOSPLIT, $0-%d\n", s.Name, s.Size) + if s.Used256BitReg { + fmt.Fprintln(w, "\tVZEROUPPER // zero upper bits of AVX registers to avoid dependencies when switching between SSE and AVX code") + } + s.Return() for _, i := range s.Instructions { fmt.Fprintln(w, i)