Also zero upper at start of function
This commit is contained in:
parent
db2e0e816d
commit
5a5e31c38b
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue