Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(462)

Side by Side Diff: runtime/vm/intermediate_language_dbc.cc

Issue 2268593002: DBC: Add back special case for float64 load/store (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix 32-bit build Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC.
6 #if defined(TARGET_ARCH_DBC) 6 #if defined(TARGET_ARCH_DBC)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } else { 719 } else {
720 __ StoreIndexedUint8(array, index, value); 720 __ StoreIndexedUint8(array, index, value);
721 } 721 }
722 break; 722 break;
723 case kTypedDataInt32ArrayCid: 723 case kTypedDataInt32ArrayCid:
724 case kTypedDataUint32ArrayCid: { 724 case kTypedDataUint32ArrayCid: {
725 if (IsExternal()) { 725 if (IsExternal()) {
726 Unsupported(compiler); 726 Unsupported(compiler);
727 UNREACHABLE(); 727 UNREACHABLE();
728 } 728 }
729 if (index_scale() != 1) { 729 if (index_scale() == 1) {
730 __ StoreIndexedUint32(array, index, value);
731 } else {
730 __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale())); 732 __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
731 } else { 733 __ StoreIndexedUint32(array, temp, value);
732 __ Move(temp, index);
733 } 734 }
734 __ StoreIndexedUint32(array, temp, value);
735 break; 735 break;
736 } 736 }
737 case kTypedDataFloat64ArrayCid: 737 case kTypedDataFloat64ArrayCid:
738 if (IsExternal()) { 738 if (IsExternal()) {
739 Unsupported(compiler); 739 Unsupported(compiler);
740 UNREACHABLE(); 740 UNREACHABLE();
741 } 741 }
742 if (index_scale() != 1) { 742 if (index_scale() == 1) {
743 __ StoreIndexedFloat64(array, index, value);
744 } else if (index_scale() == 8) {
745 __ StoreIndexed8Float64(array, index, value);
746 } else {
743 __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale())); 747 __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
744 } else { 748 __ StoreIndexedFloat64(array, temp, value);
745 __ Move(temp, index);
746 } 749 }
747 __ StoreIndexedFloat64(array, temp, value);
748 break; 750 break;
749 default: 751 default:
750 Unsupported(compiler); 752 Unsupported(compiler);
751 UNREACHABLE(); 753 UNREACHABLE();
752 break; 754 break;
753 } 755 }
754 } 756 }
755 757
756 758
757 EMIT_NATIVE_CODE(LoadIndexed, 2, Location::RequiresRegister(), 759 EMIT_NATIVE_CODE(LoadIndexed, 2, Location::RequiresRegister(),
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 case kTwoByteStringCid: 794 case kTwoByteStringCid:
793 if (index_scale() != 2) { 795 if (index_scale() != 2) {
794 // TODO(zra): Fix-up index. 796 // TODO(zra): Fix-up index.
795 Unsupported(compiler); 797 Unsupported(compiler);
796 UNREACHABLE(); 798 UNREACHABLE();
797 } 799 }
798 __ LoadIndexedTwoByteString(result, array, index); 800 __ LoadIndexedTwoByteString(result, array, index);
799 break; 801 break;
800 case kTypedDataInt32ArrayCid: 802 case kTypedDataInt32ArrayCid:
801 ASSERT(representation() == kUnboxedInt32); 803 ASSERT(representation() == kUnboxedInt32);
802 if (index_scale() != 1) { 804 if (index_scale() == 1) {
805 __ LoadIndexedInt32(result, array, index);
806 } else {
803 __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale())); 807 __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
804 } else { 808 __ LoadIndexedInt32(result, array, temp);
805 __ Move(temp, index);
806 } 809 }
807 __ LoadIndexedInt32(result, array, temp);
808 break; 810 break;
809 case kTypedDataUint32ArrayCid: 811 case kTypedDataUint32ArrayCid:
810 ASSERT(representation() == kUnboxedUint32); 812 ASSERT(representation() == kUnboxedUint32);
811 if (index_scale() != 1) { 813 if (index_scale() == 1) {
814 __ LoadIndexedUint32(result, array, index);
815 } else {
812 __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale())); 816 __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
813 } else { 817 __ LoadIndexedUint32(result, array, temp);
814 __ Move(temp, index);
815 } 818 }
816 __ LoadIndexedUint32(result, array, temp);
817 break; 819 break;
818 case kTypedDataFloat64ArrayCid: 820 case kTypedDataFloat64ArrayCid:
819 if (index_scale() != 1) { 821 if (index_scale() == 1) {
822 __ LoadIndexedFloat64(result, array, index);
823 } else if (index_scale() == 8) {
824 __ LoadIndexed8Float64(result, array, index);
825 } else {
820 __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale())); 826 __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
821 } else { 827 __ LoadIndexedFloat64(result, array, temp);
822 __ Move(temp, index);
823 } 828 }
824 __ LoadIndexedFloat64(result, array, temp);
825 break; 829 break;
826 default: 830 default:
827 Unsupported(compiler); 831 Unsupported(compiler);
828 UNREACHABLE(); 832 UNREACHABLE();
829 break; 833 break;
830 } 834 }
831 } 835 }
832 836
833 837
834 EMIT_NATIVE_CODE(StringInterpolate, 838 EMIT_NATIVE_CODE(StringInterpolate,
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
1734 __ IfULe(length, index); 1738 __ IfULe(length, index);
1735 compiler->EmitDeopt(deopt_id(), 1739 compiler->EmitDeopt(deopt_id(),
1736 ICData::kDeoptCheckArrayBound, 1740 ICData::kDeoptCheckArrayBound,
1737 (generalized_ ? ICData::kGeneralized : 0) | 1741 (generalized_ ? ICData::kGeneralized : 0) |
1738 (licm_hoisted_ ? ICData::kHoisted : 0)); 1742 (licm_hoisted_ ? ICData::kHoisted : 0));
1739 } 1743 }
1740 1744
1741 } // namespace dart 1745 } // namespace dart
1742 1746
1743 #endif // defined TARGET_ARCH_DBC 1747 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698