LEFT | RIGHT |
(no file at all) | |
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 // TODO(rsc): | 5 // TODO(rsc): |
6 // assume CLD? | 6 // assume CLD? |
7 | 7 |
8 #include <u.h> | 8 #include <u.h> |
9 #include <libc.h> | 9 #include <libc.h> |
10 #include "gg.h" | 10 #include "gg.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 if(a == AIMULB) { | 242 if(a == AIMULB) { |
243 cgen_bmul(n->op, nl, nr, res); | 243 cgen_bmul(n->op, nl, nr, res); |
244 break; | 244 break; |
245 } | 245 } |
246 goto sbop; | 246 goto sbop; |
247 | 247 |
248 // asymmetric binary | 248 // asymmetric binary |
249 case OSUB: | 249 case OSUB: |
250 a = optoas(n->op, nl->type); | 250 a = optoas(n->op, nl->type); |
251 goto abop; | 251 goto abop; |
| 252 |
| 253 case OHMUL: |
| 254 cgen_hmul(nl, nr, res); |
| 255 break; |
252 | 256 |
253 case OCONV: | 257 case OCONV: |
254 if(eqtype(n->type, nl->type) || noconv(n->type, nl->type)) { | 258 if(eqtype(n->type, nl->type) || noconv(n->type, nl->type)) { |
255 cgen(nl, res); | 259 cgen(nl, res); |
256 break; | 260 break; |
257 } | 261 } |
258 | 262 |
259 tempname(&n2, n->type); | 263 tempname(&n2, n->type); |
260 mgen(nl, &n1, res); | 264 mgen(nl, &n1, res); |
261 gmove(&n1, &n2); | 265 gmove(&n1, &n2); |
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 regfree(&nodl); | 1517 regfree(&nodl); |
1514 return 0; | 1518 return 0; |
1515 | 1519 |
1516 yes: | 1520 yes: |
1517 if(freer) | 1521 if(freer) |
1518 regfree(&nodr); | 1522 regfree(&nodr); |
1519 if(freel) | 1523 if(freel) |
1520 regfree(&nodl); | 1524 regfree(&nodl); |
1521 return 1; | 1525 return 1; |
1522 } | 1526 } |
LEFT | RIGHT |