mirror of
https://github.com/golang/go
synced 2024-11-06 10:26:10 -07:00
a3593685cf
We generate MOVBLZX for byte-sized LoadReg, so (MOVBQZX (LoadReg (Arg))) is the same as (LoadReg (Arg)). Remove those zero extension where possible. Triggers several times during all.bash. Fixes #25378 Updates #15300 Change-Id: If50656e66f217832a13ee8f49c47997f4fcc093a Reviewed-on: https://go-review.googlesource.com/115617 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
23 lines
433 B
Go
23 lines
433 B
Go
// asmcheck
|
|
|
|
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package codegen
|
|
|
|
var wsp = [256]bool{
|
|
' ': true,
|
|
'\t': true,
|
|
'\n': true,
|
|
'\r': true,
|
|
}
|
|
|
|
func zeroExtArgByte(ch byte) bool {
|
|
return wsp[ch] // amd64:-"MOVBLZX\t..,.."
|
|
}
|
|
|
|
func zeroExtArgUint16(ch uint16) bool {
|
|
return wsp[ch] // amd64:-"MOVWLZX\t..,.."
|
|
}
|