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

Side by Side Diff: src/cmd/8g/ggen.c

Issue 7395050: code review 7395050: cmd/6g, cmd/8g: switch to DX for indirect call block (Closed)
Patch Set: diff -r 083759101bc9 https://go.googlecode.com/hg/ Created 12 years 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:
View unified diff | Download patch
« no previous file with comments | « src/cmd/6g/ggen.c ('k') | src/cmd/8l/pass.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #undef EXTERN 5 #undef EXTERN
6 #define EXTERN 6 #define EXTERN
7 #include <u.h> 7 #include <u.h>
8 #include <libc.h> 8 #include <libc.h>
9 #include "gg.h" 9 #include "gg.h"
10 #include "opt.h" 10 #include "opt.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 case 0: // normal call 114 case 0: // normal call
115 case -1: // normal call but no return 115 case -1: // normal call but no return
116 if(f->op == ONAME && f->class == PFUNC) { 116 if(f->op == ONAME && f->class == PFUNC) {
117 p = gins(ACALL, N, f); 117 p = gins(ACALL, N, f);
118 afunclit(&p->to, f); 118 afunclit(&p->to, f);
119 if(proc == -1 || noreturn(p)) 119 if(proc == -1 || noreturn(p))
120 gins(AUNDEF, N, N); 120 gins(AUNDEF, N, N);
121 break; 121 break;
122 } 122 }
123 » » nodreg(&reg, types[tptr], D_AX); 123 » » nodreg(&reg, types[tptr], D_DX);
124 nodreg(&r1, types[tptr], D_BX); 124 nodreg(&r1, types[tptr], D_BX);
125 gmove(f, &reg); 125 gmove(f, &reg);
126 reg.op = OINDREG; 126 reg.op = OINDREG;
127 gmove(&reg, &r1); 127 gmove(&reg, &r1);
128 gins(ACALL, N, &r1); 128 gins(ACALL, N, &r1);
129 break; 129 break;
130 ········ 130 ········
131 case 3: // normal call of c function pointer 131 case 3: // normal call of c function pointer
132 gins(ACALL, N, f); 132 gins(ACALL, N, f);
133 break; 133 break;
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 patch(p1, pc); 1118 patch(p1, pc);
1119 patch(p2, pc); 1119 patch(p2, pc);
1120 } else if(a == ONE) { 1120 } else if(a == ONE) {
1121 // either NE or P 1121 // either NE or P
1122 patch(gbranch(AJNE, T, likely), to); 1122 patch(gbranch(AJNE, T, likely), to);
1123 patch(gbranch(AJPS, T, likely), to); 1123 patch(gbranch(AJPS, T, likely), to);
1124 } else 1124 } else
1125 patch(gbranch(optoas(a, nr->type), T, likely), to); 1125 patch(gbranch(optoas(a, nr->type), T, likely), to);
1126 1126
1127 } 1127 }
OLDNEW
« no previous file with comments | « src/cmd/6g/ggen.c ('k') | src/cmd/8l/pass.c » ('j') | no next file with comments »

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