mirror of
				https://github.com/golang/go.git
				synced 2025-11-04 02:30:57 +00:00 
			
		
		
		
	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>
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			433 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 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..,.."
 | 
						|
}
 |