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 #include <u.h> | 5 #include <u.h> |
6 #include <libc.h> | 6 #include <libc.h> |
7 #include "gg.h" | 7 #include "gg.h" |
8 | 8 |
9 /* | 9 /* |
10 * generate: | 10 * generate: |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 { | 525 { |
526 Node n1; | 526 Node n1; |
527 | 527 |
528 if(debug['g']) | 528 if(debug['g']) |
529 dump("cgenr-n", n); | 529 dump("cgenr-n", n); |
530 | 530 |
531 if(isfat(n->type)) | 531 if(isfat(n->type)) |
532 fatal("cgenr on fat node"); | 532 fatal("cgenr on fat node"); |
533 | 533 |
534 if(n->addable) { | 534 if(n->addable) { |
535 » » regalloc(a, types[tptr], res); | 535 » » regalloc(a, n->type, res); |
536 gmove(n, a); | 536 gmove(n, a); |
537 return; | 537 return; |
538 } | 538 } |
539 | 539 |
540 switch(n->op) { | 540 switch(n->op) { |
541 case ONAME: | 541 case ONAME: |
542 case ODOT: | 542 case ODOT: |
543 case ODOTPTR: | 543 case ODOTPTR: |
544 case OINDEX: | 544 case OINDEX: |
545 case OCALLFUNC: | 545 case OCALLFUNC: |
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1654 regfree(&nodl); | 1654 regfree(&nodl); |
1655 return 0; | 1655 return 0; |
1656 | 1656 |
1657 yes: | 1657 yes: |
1658 if(freer) | 1658 if(freer) |
1659 regfree(&nodr); | 1659 regfree(&nodr); |
1660 if(freel) | 1660 if(freel) |
1661 regfree(&nodl); | 1661 regfree(&nodl); |
1662 return 1; | 1662 return 1; |
1663 } | 1663 } |
LEFT | RIGHT |