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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(®, types[tptr], D_AX); | 80 » » nodreg(®, types[tptr], D_DX); |
81 nodreg(&r1, types[tptr], D_BX); | 81 nodreg(&r1, types[tptr], D_BX); |
82 gmove(f, ®); | 82 gmove(f, ®); |
83 reg.op = OINDREG; | 83 reg.op = OINDREG; |
84 gmove(®, &r1); | 84 gmove(®, &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 Loading... |
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 } |
OLD | NEW |