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

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

Issue 616873003: Use UnboxedInt32 and UnboxedUint32 representation for LoadIndexedInstr (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 // Return false if D0 or D1 was NaN before checking true condition. 866 // Return false if D0 or D1 was NaN before checking true condition.
867 __ b(&not_nan, VC); 867 __ b(&not_nan, VC);
868 __ ret(); 868 __ ret();
869 __ Bind(&not_nan); 869 __ Bind(&not_nan);
870 __ LoadObject(TMP, Bool::True(), PP); 870 __ LoadObject(TMP, Bool::True(), PP);
871 __ csel(R0, TMP, R0, true_condition); 871 __ csel(R0, TMP, R0, true_condition);
872 __ ret(); 872 __ ret();
873 873
874 __ Bind(&is_smi); // Convert R0 to a double. 874 __ Bind(&is_smi); // Convert R0 to a double.
875 __ SmiUntag(R0); 875 __ SmiUntag(R0);
876 __ scvtfd(V1, R0); 876 __ scvtfdx(V1, R0);
877 __ b(&double_op); // Then do the comparison. 877 __ b(&double_op); // Then do the comparison.
878 __ Bind(&fall_through); 878 __ Bind(&fall_through);
879 } 879 }
880 880
881 881
882 void Intrinsifier::Double_greaterThan(Assembler* assembler) { 882 void Intrinsifier::Double_greaterThan(Assembler* assembler) {
883 CompareDoubles(assembler, HI); 883 CompareDoubles(assembler, HI);
884 } 884 }
885 885
886 886
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 952
953 // Left is double right is integer (Bigint, Mint or Smi) 953 // Left is double right is integer (Bigint, Mint or Smi)
954 void Intrinsifier::Double_mulFromInteger(Assembler* assembler) { 954 void Intrinsifier::Double_mulFromInteger(Assembler* assembler) {
955 Label fall_through; 955 Label fall_through;
956 // Only smis allowed. 956 // Only smis allowed.
957 __ ldr(R0, Address(SP, 0 * kWordSize)); 957 __ ldr(R0, Address(SP, 0 * kWordSize));
958 __ tsti(R0, Immediate(kSmiTagMask)); 958 __ tsti(R0, Immediate(kSmiTagMask));
959 __ b(&fall_through, NE); 959 __ b(&fall_through, NE);
960 // Is Smi. 960 // Is Smi.
961 __ SmiUntag(R0); 961 __ SmiUntag(R0);
962 __ scvtfd(V1, R0); 962 __ scvtfdx(V1, R0);
963 __ ldr(R0, Address(SP, 1 * kWordSize)); 963 __ ldr(R0, Address(SP, 1 * kWordSize));
964 __ LoadDFieldFromOffset(V0, R0, Double::value_offset(), kNoPP); 964 __ LoadDFieldFromOffset(V0, R0, Double::value_offset(), kNoPP);
965 __ fmuld(V0, V0, V1); 965 __ fmuld(V0, V0, V1);
966 const Class& double_class = Class::Handle( 966 const Class& double_class = Class::Handle(
967 Isolate::Current()->object_store()->double_class()); 967 Isolate::Current()->object_store()->double_class());
968 __ TryAllocate(double_class, &fall_through, R0, R1, kNoPP); 968 __ TryAllocate(double_class, &fall_through, R0, R1, kNoPP);
969 __ StoreDFieldToOffset(V0, R0, Double::value_offset(), kNoPP); 969 __ StoreDFieldToOffset(V0, R0, Double::value_offset(), kNoPP);
970 __ ret(); 970 __ ret();
971 __ Bind(&fall_through); 971 __ Bind(&fall_through);
972 } 972 }
973 973
974 974
975 void Intrinsifier::DoubleFromInteger(Assembler* assembler) { 975 void Intrinsifier::DoubleFromInteger(Assembler* assembler) {
976 Label fall_through; 976 Label fall_through;
977 977
978 __ ldr(R0, Address(SP, 0 * kWordSize)); 978 __ ldr(R0, Address(SP, 0 * kWordSize));
979 __ tsti(R0, Immediate(kSmiTagMask)); 979 __ tsti(R0, Immediate(kSmiTagMask));
980 __ b(&fall_through, NE); 980 __ b(&fall_through, NE);
981 // Is Smi. 981 // Is Smi.
982 __ SmiUntag(R0); 982 __ SmiUntag(R0);
983 __ scvtfd(V0, R0); 983 __ scvtfdx(V0, R0);
984 const Class& double_class = Class::Handle( 984 const Class& double_class = Class::Handle(
985 Isolate::Current()->object_store()->double_class()); 985 Isolate::Current()->object_store()->double_class());
986 __ TryAllocate(double_class, &fall_through, R0, R1, kNoPP); 986 __ TryAllocate(double_class, &fall_through, R0, R1, kNoPP);
987 __ StoreDFieldToOffset(V0, R0, Double::value_offset(), kNoPP); 987 __ StoreDFieldToOffset(V0, R0, Double::value_offset(), kNoPP);
988 __ ret(); 988 __ ret();
989 __ Bind(&fall_through); 989 __ Bind(&fall_through);
990 } 990 }
991 991
992 992
993 void Intrinsifier::Double_getIsNaN(Assembler* assembler) { 993 void Intrinsifier::Double_getIsNaN(Assembler* assembler) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 __ LoadDFieldFromOffset(V1, R0, Double::value_offset(), kNoPP); 1061 __ LoadDFieldFromOffset(V1, R0, Double::value_offset(), kNoPP);
1062 __ Bind(&double_op); 1062 __ Bind(&double_op);
1063 __ fsqrtd(V0, V1); 1063 __ fsqrtd(V0, V1);
1064 const Class& double_class = Class::Handle( 1064 const Class& double_class = Class::Handle(
1065 Isolate::Current()->object_store()->double_class()); 1065 Isolate::Current()->object_store()->double_class());
1066 __ TryAllocate(double_class, &fall_through, R0, R1, kNoPP); 1066 __ TryAllocate(double_class, &fall_through, R0, R1, kNoPP);
1067 __ StoreDFieldToOffset(V0, R0, Double::value_offset(), kNoPP); 1067 __ StoreDFieldToOffset(V0, R0, Double::value_offset(), kNoPP);
1068 __ ret(); 1068 __ ret();
1069 __ Bind(&is_smi); 1069 __ Bind(&is_smi);
1070 __ SmiUntag(R0); 1070 __ SmiUntag(R0);
1071 __ scvtfd(V1, R0); 1071 __ scvtfdx(V1, R0);
1072 __ b(&double_op); 1072 __ b(&double_op);
1073 __ Bind(&fall_through); 1073 __ Bind(&fall_through);
1074 } 1074 }
1075 1075
1076 1076
1077 // var state = ((_A * (_state[kSTATE_LO])) + _state[kSTATE_HI]) & _MASK_64; 1077 // var state = ((_A * (_state[kSTATE_LO])) + _state[kSTATE_HI]) & _MASK_64;
1078 // _state[kSTATE_LO] = state & _MASK_32; 1078 // _state[kSTATE_LO] = state & _MASK_32;
1079 // _state[kSTATE_HI] = state >> 32; 1079 // _state[kSTATE_HI] = state >> 32;
1080 void Intrinsifier::Random_nextState(Assembler* assembler) { 1080 void Intrinsifier::Random_nextState(Assembler* assembler) {
1081 const Library& math_lib = Library::Handle(Library::MathLibrary()); 1081 const Library& math_lib = Library::Handle(Library::MathLibrary());
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 Isolate* isolate = Isolate::Current(); 1552 Isolate* isolate = Isolate::Current();
1553 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate), kNoPP); 1553 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate), kNoPP);
1554 // Set return value to Isolate::current_tag_. 1554 // Set return value to Isolate::current_tag_.
1555 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); 1555 __ ldr(R0, Address(R1, Isolate::current_tag_offset()));
1556 __ ret(); 1556 __ ret();
1557 } 1557 }
1558 1558
1559 } // namespace dart 1559 } // namespace dart
1560 1560
1561 #endif // defined TARGET_ARCH_ARM64 1561 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698