LEFT | RIGHT |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // TODO(rsc): | 5 // TODO(rsc): |
6 // assume CLD? | 6 // assume CLD? |
7 | 7 |
8 #include <u.h> | 8 #include <u.h> |
9 #include <libc.h> | 9 #include <libc.h> |
10 #include "gg.h" | 10 #include "gg.h" |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 igen(Node *n, Node *a, Node *res) | 768 igen(Node *n, Node *a, Node *res) |
769 { | 769 { |
770 Node n1; | 770 Node n1; |
771 Type *fp; | 771 Type *fp; |
772 Iter flist; | 772 Iter flist; |
773 ·· | 773 ·· |
774 switch(n->op) { | 774 switch(n->op) { |
775 case ONAME: | 775 case ONAME: |
776 if((n->class&PHEAP) || n->class == PPARAMREF) | 776 if((n->class&PHEAP) || n->class == PPARAMREF) |
777 break; | 777 break; |
778 *a = *n; | |
779 return; | |
780 | |
781 case OINDREG: | |
782 *a = *n; | 778 *a = *n; |
783 return; | 779 return; |
784 | 780 |
785 case OCALLFUNC: | 781 case OCALLFUNC: |
786 fp = structfirst(&flist, getoutarg(n->left->type)); | 782 fp = structfirst(&flist, getoutarg(n->left->type)); |
787 cgen_call(n, 0); | 783 cgen_call(n, 0); |
788 memset(a, 0, sizeof *a); | 784 memset(a, 0, sizeof *a); |
789 a->op = OINDREG; | 785 a->op = OINDREG; |
790 a->val.u.reg = D_SP; | 786 a->val.u.reg = D_SP; |
791 a->addable = 1; | 787 a->addable = 1; |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1441 regfree(&nodl); | 1437 regfree(&nodl); |
1442 return 0; | 1438 return 0; |
1443 | 1439 |
1444 yes: | 1440 yes: |
1445 if(freer) | 1441 if(freer) |
1446 regfree(&nodr); | 1442 regfree(&nodr); |
1447 if(freel) | 1443 if(freel) |
1448 regfree(&nodl); | 1444 regfree(&nodl); |
1449 return 1; | 1445 return 1; |
1450 } | 1446 } |
LEFT | RIGHT |