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

Delta Between Two Patch Sets: src/cmd/6g/gsubr.c

Issue 4813052: code review 4813052: 5g, 6g, 8g: shift, opt fixes (Closed)
Left Patch Set: Created 13 years, 7 months ago
Right Patch Set: diff -r 081f44903c4d https://go.googlecode.com/hg/ Created 13 years, 7 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:
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/5g/reg.c ('k') | 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
(no file at all)
1 // Derived from Inferno utils/6c/txt.c 1 // Derived from Inferno utils/6c/txt.c
2 // http://code.google.com/p/inferno-os/source/browse/utils/6c/txt.c 2 // http://code.google.com/p/inferno-os/source/browse/utils/6c/txt.c
3 // 3 //
4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. 4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) 5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
6 // Portions Copyright © 1997-1999 Vita Nuova Limited 6 // Portions Copyright © 1997-1999 Vita Nuova Limited
7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov a.com) 7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov a.com)
8 // Portions Copyright © 2004,2006 Bruce Ellis 8 // Portions Copyright © 2004,2006 Bruce Ellis
9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) 9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net)
10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others 10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 n->class = PPARAM; 466 n->class = PPARAM;
467 break; 467 break;
468 468
469 case 2: // offset output arg 469 case 2: // offset output arg
470 fatal("shouldnt be used"); 470 fatal("shouldnt be used");
471 n->op = OINDREG; 471 n->op = OINDREG;
472 n->val.u.reg = D_SP; 472 n->val.u.reg = D_SP;
473 n->xoffset += types[tptr]->width; 473 n->xoffset += types[tptr]->width;
474 break; 474 break;
475 } 475 }
476 n->typecheck = 1;
476 return n; 477 return n;
477 } 478 }
478 479
479 /* 480 /*
480 * generate 481 * generate
481 * as $c, reg 482 * as $c, reg
482 */ 483 */
483 void 484 void
484 gconreg(int as, vlong c, int reg) 485 gconreg(int as, vlong c, int reg)
485 { 486 {
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 naddr(f, &af, 1); 980 naddr(f, &af, 1);
980 if(t != N) 981 if(t != N)
981 naddr(t, &at, 1); 982 naddr(t, &at, 1);
982 p = prog(as); 983 p = prog(as);
983 if(f != N) 984 if(f != N)
984 p->from = af; 985 p->from = af;
985 if(t != N) 986 if(t != N)
986 p->to = at; 987 p->to = at;
987 if(debug['g']) 988 if(debug['g'])
988 print("%P\n", p); 989 print("%P\n", p);
989
990 990
991 w = 0; 991 w = 0;
992 switch(as) { 992 switch(as) {
993 case AMOVB: 993 case AMOVB:
994 w = 1; 994 w = 1;
995 break; 995 break;
996 case AMOVW: 996 case AMOVW:
997 w = 2; 997 w = 2;
998 break; 998 break;
999 case AMOVL: 999 case AMOVL:
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2150 naddr(&n2, a, 1); 2150 naddr(&n2, a, 1);
2151 goto yes; 2151 goto yes;
2152 2152
2153 yes: 2153 yes:
2154 return 1; 2154 return 1;
2155 2155
2156 no: 2156 no:
2157 sudoclean(); 2157 sudoclean();
2158 return 0; 2158 return 0;
2159 } 2159 }
LEFTRIGHT

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