mirror of
https://github.com/golang/go
synced 2024-09-19 07:52:34 +00:00
another both sides functions
SVN=125230
This commit is contained in:
parent
57d80398e6
commit
ca029d34b6
|
@ -29,8 +29,10 @@ cgen(Node *n, Node *res)
|
|||
if(n->op == OINDREG)
|
||||
fatal("cgen: this is going to misscompile");
|
||||
if(res->ullman >= UINF) {
|
||||
dump("fncalls", n);
|
||||
fatal("cgen: node and result functions");
|
||||
tempname(&n1, n->type);
|
||||
cgen(n, &n1);
|
||||
cgen(&n1, res);
|
||||
goto ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +47,7 @@ cgen(Node *n, Node *res)
|
|||
cgen(n, &n1);
|
||||
cgen(&n1, res);
|
||||
regfree(&n1);
|
||||
return;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
igen(res, &n1, N);
|
||||
|
|
|
@ -746,7 +746,12 @@ cgen_asop(Node *n)
|
|||
nr = n->right;
|
||||
|
||||
if(nr->ullman >= UINF && nl->ullman >= UINF) {
|
||||
fatal("cgen_asop: both sides call");
|
||||
tempname(&n1, nr->type);
|
||||
cgen(nr, &n1);
|
||||
n2 = *n;
|
||||
n2.right = &n1;
|
||||
cgen_asop(&n2);
|
||||
return;
|
||||
}
|
||||
|
||||
if(nr->ullman > nl->ullman) {
|
||||
|
@ -881,9 +886,6 @@ cgen_as(Node *nl, Node *nr, int op)
|
|||
ullmancalc(nr);
|
||||
}
|
||||
|
||||
if(nr->ullman >= UINF && nl->ullman >= UINF) {
|
||||
fatal("cgen_as both sides call");
|
||||
}
|
||||
cgen(nr, nl);
|
||||
|
||||
ret:
|
||||
|
|
Loading…
Reference in a new issue