summaryrefslogtreecommitdiff
path: root/src/cmd/8c/cgen.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-06-05 23:12:07 -0700
committerRuss Cox <rsc@golang.org>2009-06-05 23:12:07 -0700
commitdb7f771921b133b9f9b5f99fe277be63a413e0f0 (patch)
treeb7750780ac3e5a3cf395013581922ccace8577ae /src/cmd/8c/cgen.c
parent408500211e917bc3d571da5e232f459966f2dffe (diff)
downloadgolang-db7f771921b133b9f9b5f99fe277be63a413e0f0.tar.gz
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
Diffstat (limited to 'src/cmd/8c/cgen.c')
-rw-r--r--src/cmd/8c/cgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/8c/cgen.c b/src/cmd/8c/cgen.c
index 8c5bf7b15..1df03ef50 100644
--- a/src/cmd/8c/cgen.c
+++ b/src/cmd/8c/cgen.c
@@ -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 */