mirror of
https://github.com/golang/go
synced 2024-11-23 03:30:02 -07:00
cmd/asm: remove needless check for negative right shift
In the parser, the shift value is always a uint64. Change-Id: I9b50295a9f7d174ed1f6f9baf78ec0ed43db417f Reviewed-on: https://go-review.googlesource.com/11322 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
626188dd31
commit
71859efceb
@ -812,10 +812,8 @@ func (p *Parser) term() uint64 {
|
||||
case lex.RSH:
|
||||
p.next()
|
||||
shift := p.term()
|
||||
if shift < 0 {
|
||||
p.errorf("negative right shift %d", shift)
|
||||
}
|
||||
if shift > 0 && value&(1<<63) != 0 {
|
||||
// shift is a uint, so can never be negative.
|
||||
if value&(1<<63) != 0 {
|
||||
p.errorf("right shift with high bit set")
|
||||
}
|
||||
value >>= uint(shift)
|
||||
|
Loading…
Reference in New Issue
Block a user