]> Cypherpunks repositories - gostls13.git/commit
cmd/5a: prepare reglist correctly
authorRuss Cox <rsc@golang.org>
Thu, 5 Feb 2015 10:29:26 +0000 (05:29 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 5 Feb 2015 16:05:13 +0000 (16:05 +0000)
commit7e3b30aea6d741cbc8718faae114ed99ebffa673
tree41b20abcfb1f6b951bd8cd1199c7330a62beae6b
parent08ca401444cd3e08a98d7fd3f57e44b95243b4fb
cmd/5a: prepare reglist correctly

This was working when 5a was built on x86 because REG_R0 = 32,
and a 32-bit shift on x86 uses only the low 32 bits of the shift count.

On ARM, the shift clamping is different.

Moving to Go will avoid these differing shift semantics.
I tripped over and fixed this bug in new5a the same way earlier tonight.

Change-Id: Id56aa0bb1830ccf250960f843e0acb8a0409e87d
Reviewed-on: https://go-review.googlesource.com/3961
Reviewed-by: Dave Cheney <dave@cheney.net>
src/cmd/5a/a.y
src/cmd/5a/y.tab.c