FAQ
LGTM

Thank you for the new comments.

For a future CL if you are looking for something fun: the unsigned magic
division algorithm can be improved slightly:
http://ridiculousfish.com/blog/posts/labor-of-division-episode-iii.html.
Most Go code does not use unsigned integers anyway, so the benefit here
is minimal.



https://codereview.appspot.com/6819123/diff/16015/src/cmd/5g/cgen.c
File src/cmd/5g/cgen.c (right):

https://codereview.appspot.com/6819123/diff/16015/src/cmd/5g/cgen.c#newcode266
src/cmd/5g/cgen.c:266: case OHMUL:
tab please

https://codereview.appspot.com/6819123/diff/16015/src/cmd/5g/ggen.c
File src/cmd/5g/ggen.c (right):

https://codereview.appspot.com/6819123/diff/16015/src/cmd/5g/ggen.c#newcode478
src/cmd/5g/ggen.c:478: * res = (nl * nr) >> w
s/w/wordsize/

https://codereview.appspot.com/6819123/diff/16015/src/cmd/6g/ggen.c
File src/cmd/6g/ggen.c (right):

https://codereview.appspot.com/6819123/diff/16015/src/cmd/6g/ggen.c#newcode612
src/cmd/6g/ggen.c:612: goto divbymul;
Can delete this goto and the label.

https://codereview.appspot.com/6819123/diff/16015/src/cmd/6g/ggen.c#newcode614
src/cmd/6g/ggen.c:614: divbymul:
// Front end handled 32-bit division. We only need to handle 64-bit.

https://codereview.appspot.com/6819123/diff/16015/src/cmd/6g/ggen.c#newcode621
src/cmd/6g/ggen.c:621: case TUINT8:
delete these cases, leaving only TUINT64.

https://codereview.appspot.com/6819123/diff/16015/src/cmd/6g/ggen.c#newcode655
src/cmd/6g/ggen.c:655: case TINT8:
same

https://codereview.appspot.com/6819123/diff/16015/src/cmd/gc/walk.c
File src/cmd/gc/walk.c (right):

https://codereview.appspot.com/6819123/diff/16015/src/cmd/gc/walk.c#newcode959
src/cmd/gc/walk.c:959: * rewrite div and mod into function calls
rewrite 64-bit div and mod...

https://codereview.appspot.com/6819123/diff/16015/src/cmd/gc/walk.c#newcode2895
src/cmd/gc/walk.c:2895: int pow; // if >= 0, nr is 1<<n
1<<pow?

https://codereview.appspot.com/6819123/

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 26, '12 at 4:28p
activeNov 26, '12 at 10:53p
posts3
users2
websitegolang.org

2 users in discussion

Remyoudompheng: 2 posts Rsc: 1 post

People

Translate

site design / logo © 2022 Grokbase