• Rob Pike's avatar
    cmd/asm: fix shifts again, this time for sure · 989b372a
    Rob Pike authored
    There are two conditions to worry about:
    
    1) The shift count cannot be negative. Since the evaluator uses unsigned
    arithmetic throughout, this means checking that the high bit of
    the shift count is always off, which is done by converting to int64
    and seeing if the result is negative.
    
    2) For right shifts, the value cannot be negative. We don't want a
    high bit in the value because right shifting a value depends on the
    sign, and for clarity we always want unsigned shifts.
    
    Next step is to build some testing infrastructure for the parser.
    
    Change-Id: I4c46c79989d02c107fc64954403fc18613763f1d
    Reviewed-on: https://go-review.googlesource.com/11326Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    989b372a
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
newlink Loading commit data...
nm Loading commit data...
objdump Loading commit data...
old5a Loading commit data...
old6a Loading commit data...
old8a Loading commit data...
old9a Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vet Loading commit data...
yacc Loading commit data...