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

Side by Side Diff: src/cmd/6g/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 | « no previous file | src/cmd/8g/ggen.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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 case 0: // normal call 71 case 0: // normal call
72 case -1: // normal call but no return 72 case -1: // normal call but no return
73 if(f->op == ONAME && f->class == PFUNC) { 73 if(f->op == ONAME && f->class == PFUNC) {
74 p = gins(ACALL, N, f); 74 p = gins(ACALL, N, f);
75 afunclit(&p->to, f); 75 afunclit(&p->to, f);
76 if(proc == -1 || noreturn(p)) 76 if(proc == -1 || noreturn(p))
77 gins(AUNDEF, N, N); 77 gins(AUNDEF, N, N);
78 break; 78 break;
79 } 79 }
80 » » nodreg(&reg, types[tptr], D_AX); 80 » » nodreg(&reg, types[tptr], D_DX);
81 nodreg(&r1, types[tptr], D_BX); 81 nodreg(&r1, types[tptr], D_BX);
82 gmove(f, &reg); 82 gmove(f, &reg);
83 reg.op = OINDREG; 83 reg.op = OINDREG;
84 gmove(&reg, &r1); 84 gmove(&reg, &r1);
85 gins(ACALL, N, &r1); 85 gins(ACALL, N, &r1);
86 break; 86 break;
87 ········ 87 ········
88 case 3: // normal call of c function pointer 88 case 3: // normal call of c function pointer
89 gins(ACALL, N, f); 89 gins(ACALL, N, f);
90 break; 90 break;
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 gins(ASTOSB, N, N); // STOB AL,*(DI)+ 968 gins(ASTOSB, N, N); // STOB AL,*(DI)+
969 } else 969 } else
970 while(c > 0) { 970 while(c > 0) {
971 gins(ASTOSB, N, N); // STOB AL,*(DI)+ 971 gins(ASTOSB, N, N); // STOB AL,*(DI)+
972 c--; 972 c--;
973 } 973 }
974 974
975 restx(&n1, &oldn1); 975 restx(&n1, &oldn1);
976 restx(&ax, &oldax); 976 restx(&ax, &oldax);
977 } 977 }
OLDNEW
« no previous file with comments | « no previous file | src/cmd/8g/ggen.c » ('j') | no next file with comments »

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