Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1267)

Delta Between Two Patch Sets: src/cmd/8g/cgen.c

Issue 6489067: code review 6489067: cmd/8g: import componentgen from 6g. (Closed)
Left Patch Set: diff -r 79225d9f3ced https://go.googlecode.com/hg/ Created 12 years, 6 months ago
Right Patch Set: diff -r cad5b70d58b6 https://go.googlecode.com/hg/ Created 12 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | src/cmd/8g/gg.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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
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 }
LEFTRIGHT
« no previous file | src/cmd/8g/gg.h » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b