summaryrefslogtreecommitdiff
path: root/src/cmd/cc
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-07-13 19:20:43 -0700
committerRuss Cox <rsc@golang.org>2009-07-13 19:20:43 -0700
commite92e5f28012ce8a30a16c5a20a5cff3411fd22ad (patch)
tree180aa6f3617ec8fc73967b700926b7eb2892da7e /src/cmd/cc
parentface04436a1eb048e31626fba18bb66fb83aa1b5 (diff)
downloadgolang-e92e5f28012ce8a30a16c5a20a5cff3411fd22ad.tar.gz
compilers were inconsistent about
whether no register argument was REGARG == 0 or REGARG < 0. use REGARG < 0 because arm needs 0 for R0. R=ken OCL=31562 CL=31566
Diffstat (limited to 'src/cmd/cc')
-rw-r--r--src/cmd/cc/pgen.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/cc/pgen.c b/src/cmd/cc/pgen.c
index 2b7402f4e..0b9dc8e16 100644
--- a/src/cmd/cc/pgen.c
+++ b/src/cmd/cc/pgen.c
@@ -83,7 +83,7 @@ codgen(Node *n, Node *nn)
/*
* isolate first argument
*/
- if(REGARG) {
+ if(REGARG >= 0) {
if(typesuv[thisfn->link->etype]) {
nod1 = *nodret->left;
nodreg(&nod, &nod1, REGARG);
@@ -385,8 +385,8 @@ loop:
gbranch(OGOTO); /* entry */
sp = p;
- /*
- * if there are no incoming labels in the
+ /*
+ * if there are no incoming labels in the
* body and the top's not reachable, warn
*/
if(!canreach && warnreach && deadheads(n)) {
@@ -410,7 +410,7 @@ loop:
patch(spc, pc);
gen(l->right->right); /* inc */
- patch(sp, pc);
+ patch(sp, pc);
if(l->left != Z) { /* test */
bcomplex(l->left, Z);
patch(p, breakpc);
@@ -460,7 +460,7 @@ loop:
* Don't complain about unreachable break statements.
* There are breaks hidden in yacc's output and some people
* write return; break; in their switch statements out of habit.
- * However, don't confuse the analysis by inserting an
+ * However, don't confuse the analysis by inserting an
* unreachable reference to breakpc either.
*/
if(!canreach)
@@ -488,7 +488,7 @@ loop:
canreach = 1;
gen(n->right->right);
/*
- * treat constant ifs as regular ifs for
+ * treat constant ifs as regular ifs for
* reachability warnings.
*/
if(!canreach && oldreach && debug['w'] < 2)
@@ -501,7 +501,7 @@ loop:
canreach = 1;
supgen(n->right->right);
/*
- * treat constant ifs as regular ifs for
+ * treat constant ifs as regular ifs for
* reachability warnings.
*/
if(!oldreach && canreach && debug['w'] < 2)