]> Cypherpunks repositories - gostls13.git/commit
cmd/asm: fix handling of negative shifts.
authorRob Pike <r@golang.org>
Mon, 22 Jun 2015 20:23:04 +0000 (06:23 +1000)
committerRob Pike <r@golang.org>
Mon, 22 Jun 2015 20:42:22 +0000 (20:42 +0000)
commit58d177c63e9e9e50df4341d9aa5518c87a3309d8
tree8433701f7dc3d64f1d04b86d14df39e7d8b8ec87
parent98c9e9e74ffbdaeb7ff4af8a478d502123014626
cmd/asm: fix handling of negative shifts.

The change that "fixed" LSH was incorrect, and the fix for RSH was poor.
Make both use a correct, simple test: if the 64-bit value as a signed
integer is negative, it's an error.

Really fixes #11278.

Change-Id: I72cca03d7ad0d64fd649fa33a9ead2f31bd2977b
Reviewed-on: https://go-review.googlesource.com/11325
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/cmd/asm/internal/asm/parse.go