LEFT | RIGHT |
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 #include "gg.h" | 5 #include "gg.h" |
6 | 6 |
7 /* | 7 /* |
8 * generate: | 8 * generate: |
9 * res = n; | 9 * res = n; |
10 * simplifies and calls gmove. | 10 * simplifies and calls gmove. |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 if(res == N || res->type == T) | 28 if(res == N || res->type == T) |
29 fatal("cgen: res nil"); | 29 fatal("cgen: res nil"); |
30 | 30 |
31 while(n->op == OCONVNOP) | 31 while(n->op == OCONVNOP) |
32 n = n->left; | 32 n = n->left; |
33 | 33 |
34 // inline slices | 34 // inline slices |
35 if(cgen_inline(n, res)) | 35 if(cgen_inline(n, res)) |
36 goto ret; | 36 goto ret; |
37 if(n->left != N && n->left->op == OCALLFUNC && n->left->sym != S && n->left->sym
->pkg == runtimepkg) print("no inline %S\n", n->left->sym); | |
38 | 37 |
39 if(n->ullman >= UINF) { | 38 if(n->ullman >= UINF) { |
40 if(n->op == OINDREG) | 39 if(n->op == OINDREG) |
41 fatal("cgen: this is going to misscompile"); | 40 fatal("cgen: this is going to misscompile"); |
42 if(res->ullman >= UINF) { | 41 if(res->ullman >= UINF) { |
43 tempname(&n1, n->type); | 42 tempname(&n1, n->type); |
44 cgen(n, &n1); | 43 cgen(n, &n1); |
45 cgen(&n1, res); | 44 cgen(&n1, res); |
46 goto ret; | 45 goto ret; |
47 } | 46 } |
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 gins(AMOVSB, N, N); // MOVB *(SI)+,*(DI)+ | 1097 gins(AMOVSB, N, N); // MOVB *(SI)+,*(DI)+ |
1099 c--; | 1098 c--; |
1100 } | 1099 } |
1101 } | 1100 } |
1102 | 1101 |
1103 | 1102 |
1104 restx(&nodl, &oldl); | 1103 restx(&nodl, &oldl); |
1105 restx(&nodr, &oldr); | 1104 restx(&nodr, &oldr); |
1106 restx(&cx, &oldcx); | 1105 restx(&cx, &oldcx); |
1107 } | 1106 } |
LEFT | RIGHT |