mirror of
https://github.com/golang/go
synced 2024-11-25 23:07:58 -07:00
use cc provided xlog2 instead of system log2.
(on plan 9 cc calls it log2, but that conflicts here.) the difference is that xlog2 returns -1 on non powers of 2. 8c was rewriting /10 into /8. R=ken OCL=29968 CL=29968
This commit is contained in:
parent
01fe6a9c58
commit
8720b4721f
@ -346,7 +346,7 @@ cgen(Node *n, Node *nn)
|
||||
c = r->vconst;
|
||||
if(c < 0)
|
||||
c = -c;
|
||||
v = log2(c);
|
||||
v = xlog2(c);
|
||||
if(v < 0)
|
||||
break;
|
||||
/* fall thru */
|
||||
@ -609,7 +609,7 @@ cgen(Node *n, Node *nn)
|
||||
c = r->vconst;
|
||||
if(c < 0)
|
||||
c = -c;
|
||||
v = log2(c);
|
||||
v = xlog2(c);
|
||||
if(v < 0)
|
||||
break;
|
||||
/* fall thru */
|
||||
|
Loading…
Reference in New Issue
Block a user