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 #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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 | 798 |
799 // multiply. | 799 // multiply. |
800 nodreg(&ax, t, D_AX); | 800 nodreg(&ax, t, D_AX); |
801 gmove(&n2, &ax); | 801 gmove(&n2, &ax); |
802 gins(a, &n1, N); | 802 gins(a, &n1, N); |
803 regfree(&n2); | 803 regfree(&n2); |
804 | 804 |
805 if(t->width == 1) { | 805 if(t->width == 1) { |
806 // byte multiply behaves differently. | 806 // byte multiply behaves differently. |
807 nodreg(&ax, t, D_AH); | 807 nodreg(&ax, t, D_AH); |
808 » » gmove(&ax, res); | 808 » » nodreg(&dx, t, D_DL); |
809 » » return; | 809 » » gmove(&ax, &dx); |
810 } | 810 } |
811 nodreg(&dx, t, D_DX); | 811 nodreg(&dx, t, D_DX); |
812 gmove(&dx, res); | 812 gmove(&dx, res); |
813 } | 813 } |
814 | 814 |
LEFT | RIGHT |