OLD | NEW |
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 Loading... |
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(®, types[tptr], D_AX); | 123 » » nodreg(®, types[tptr], D_DX); |
124 nodreg(&r1, types[tptr], D_BX); | 124 nodreg(&r1, types[tptr], D_BX); |
125 gmove(f, ®); | 125 gmove(f, ®); |
126 reg.op = OINDREG; | 126 reg.op = OINDREG; |
127 gmove(®, &r1); | 127 gmove(®, &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 Loading... |
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 } |
OLD | NEW |