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

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

Issue 593363003: Expands the use of Immediate and Operand wrappers. (Closed) Base URL: http://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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 const Register val_reg = locs()->in(0).reg(); 635 const Register val_reg = locs()->in(0).reg();
636 const Register cid_reg = locs()->temp(0).reg(); 636 const Register cid_reg = locs()->temp(0).reg();
637 637
638 Label* deopt = CanDeoptimize() ? 638 Label* deopt = CanDeoptimize() ?
639 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptTestCids) : NULL; 639 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptTestCids) : NULL;
640 640
641 const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0; 641 const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0;
642 const ZoneGrowableArray<intptr_t>& data = cid_results(); 642 const ZoneGrowableArray<intptr_t>& data = cid_results();
643 ASSERT(data[0] == kSmiCid); 643 ASSERT(data[0] == kSmiCid);
644 bool result = data[1] == true_result; 644 bool result = data[1] == true_result;
645 __ tsti(val_reg, kSmiTagMask); 645 __ tsti(val_reg, Immediate(kSmiTagMask));
646 __ b(result ? labels.true_label : labels.false_label, EQ); 646 __ b(result ? labels.true_label : labels.false_label, EQ);
647 __ LoadClassId(cid_reg, val_reg, PP); 647 __ LoadClassId(cid_reg, val_reg, PP);
648 648
649 for (intptr_t i = 2; i < data.length(); i += 2) { 649 for (intptr_t i = 2; i < data.length(); i += 2) {
650 const intptr_t test_cid = data[i]; 650 const intptr_t test_cid = data[i];
651 ASSERT(test_cid != kSmiCid); 651 ASSERT(test_cid != kSmiCid);
652 result = data[i + 1] == true_result; 652 result = data[i + 1] == true_result;
653 __ CompareImmediate(cid_reg, test_cid, PP); 653 __ CompareImmediate(cid_reg, test_cid, PP);
654 __ b(result ? labels.true_label : labels.false_label, EQ); 654 __ b(result ? labels.true_label : labels.false_label, EQ);
655 } 655 }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 LocationSummary::kNoCall); 930 LocationSummary::kNoCall);
931 } 931 }
932 932
933 933
934 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 934 void LoadClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
935 const Register object = locs()->in(0).reg(); 935 const Register object = locs()->in(0).reg();
936 const Register result = locs()->out(0).reg(); 936 const Register result = locs()->out(0).reg();
937 static const intptr_t kSmiCidSource = kSmiCid << RawObject::kClassIdTagPos; 937 static const intptr_t kSmiCidSource = kSmiCid << RawObject::kClassIdTagPos;
938 938
939 __ LoadImmediate(TMP, reinterpret_cast<int64_t>(&kSmiCidSource) + 1, PP); 939 __ LoadImmediate(TMP, reinterpret_cast<int64_t>(&kSmiCidSource) + 1, PP);
940 __ tsti(object, kSmiTagMask); 940 __ tsti(object, Immediate(kSmiTagMask));
941 __ csel(TMP, TMP, object, EQ); 941 __ csel(TMP, TMP, object, EQ);
942 __ LoadClassId(result, TMP, PP); 942 __ LoadClassId(result, TMP, PP);
943 __ SmiTag(result); 943 __ SmiTag(result);
944 } 944 }
945 945
946 946
947 CompileType LoadIndexedInstr::ComputeType() const { 947 CompileType LoadIndexedInstr::ComputeType() const {
948 switch (class_id_) { 948 switch (class_id_) {
949 case kArrayCid: 949 case kArrayCid:
950 case kImmutableArrayCid: 950 case kImmutableArrayCid:
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 1320
1321 1321
1322 static void LoadValueCid(FlowGraphCompiler* compiler, 1322 static void LoadValueCid(FlowGraphCompiler* compiler,
1323 Register value_cid_reg, 1323 Register value_cid_reg,
1324 Register value_reg, 1324 Register value_reg,
1325 Label* value_is_smi = NULL) { 1325 Label* value_is_smi = NULL) {
1326 Label done; 1326 Label done;
1327 if (value_is_smi == NULL) { 1327 if (value_is_smi == NULL) {
1328 __ LoadImmediate(value_cid_reg, kSmiCid, PP); 1328 __ LoadImmediate(value_cid_reg, kSmiCid, PP);
1329 } 1329 }
1330 __ tsti(value_reg, kSmiTagMask); 1330 __ tsti(value_reg, Immediate(kSmiTagMask));
1331 if (value_is_smi == NULL) { 1331 if (value_is_smi == NULL) {
1332 __ b(&done, EQ); 1332 __ b(&done, EQ);
1333 } else { 1333 } else {
1334 __ b(value_is_smi, EQ); 1334 __ b(value_is_smi, EQ);
1335 } 1335 }
1336 __ LoadClassId(value_cid_reg, value_reg, PP); 1336 __ LoadClassId(value_cid_reg, value_reg, PP);
1337 __ Bind(&done); 1337 __ Bind(&done);
1338 } 1338 }
1339 1339
1340 1340
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 __ CallRuntime(kUpdateFieldCidRuntimeEntry, 2); 1474 __ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
1475 __ Drop(2); // Drop the field and the value. 1475 __ Drop(2); // Drop the field and the value.
1476 } 1476 }
1477 } else { 1477 } else {
1478 ASSERT(compiler->is_optimizing()); 1478 ASSERT(compiler->is_optimizing());
1479 ASSERT(deopt != NULL); 1479 ASSERT(deopt != NULL);
1480 1480
1481 // Field guard class has been initialized and is known. 1481 // Field guard class has been initialized and is known.
1482 if (value_cid == kDynamicCid) { 1482 if (value_cid == kDynamicCid) {
1483 // Value's class id is not known. 1483 // Value's class id is not known.
1484 __ tsti(value_reg, kSmiTagMask); 1484 __ tsti(value_reg, Immediate(kSmiTagMask));
1485 1485
1486 if (field_cid != kSmiCid) { 1486 if (field_cid != kSmiCid) {
1487 __ b(fail, EQ); 1487 __ b(fail, EQ);
1488 __ LoadClassId(value_cid_reg, value_reg, PP); 1488 __ LoadClassId(value_cid_reg, value_reg, PP);
1489 __ CompareImmediate(value_cid_reg, field_cid, PP); 1489 __ CompareImmediate(value_cid_reg, field_cid, PP);
1490 } 1490 }
1491 1491
1492 if (field().is_nullable() && (field_cid != kNullCid)) { 1492 if (field().is_nullable() && (field_cid != kNullCid)) {
1493 __ b(&ok, EQ); 1493 __ b(&ok, EQ);
1494 __ CompareObject(value_reg, Object::null_object(), PP); 1494 __ CompareObject(value_reg, Object::null_object(), PP);
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 1784
1785 __ LoadObject(temp, Field::ZoneHandle(field().raw()), PP); 1785 __ LoadObject(temp, Field::ZoneHandle(field().raw()), PP);
1786 1786
1787 __ LoadFieldFromOffset(temp2, temp, Field::is_nullable_offset(), PP, kWord); 1787 __ LoadFieldFromOffset(temp2, temp, Field::is_nullable_offset(), PP, kWord);
1788 __ CompareImmediate(temp2, kNullCid, PP); 1788 __ CompareImmediate(temp2, kNullCid, PP);
1789 __ b(&store_pointer, EQ); 1789 __ b(&store_pointer, EQ);
1790 1790
1791 __ LoadFromOffset( 1791 __ LoadFromOffset(
1792 temp2, temp, Field::kind_bits_offset() - kHeapObjectTag, 1792 temp2, temp, Field::kind_bits_offset() - kHeapObjectTag,
1793 PP, kUnsignedByte); 1793 PP, kUnsignedByte);
1794 __ tsti(temp2, 1 << Field::kUnboxingCandidateBit); 1794 __ tsti(temp2, Immediate(1 << Field::kUnboxingCandidateBit));
1795 __ b(&store_pointer, EQ); 1795 __ b(&store_pointer, EQ);
1796 1796
1797 __ LoadFieldFromOffset(temp2, temp, Field::guarded_cid_offset(), PP, kWord); 1797 __ LoadFieldFromOffset(temp2, temp, Field::guarded_cid_offset(), PP, kWord);
1798 __ CompareImmediate(temp2, kDoubleCid, PP); 1798 __ CompareImmediate(temp2, kDoubleCid, PP);
1799 __ b(&store_double, EQ); 1799 __ b(&store_double, EQ);
1800 1800
1801 __ LoadFieldFromOffset(temp2, temp, Field::guarded_cid_offset(), PP, kWord); 1801 __ LoadFieldFromOffset(temp2, temp, Field::guarded_cid_offset(), PP, kWord);
1802 __ CompareImmediate(temp2, kFloat32x4Cid, PP); 1802 __ CompareImmediate(temp2, kFloat32x4Cid, PP);
1803 __ b(&store_float32x4, EQ); 1803 __ b(&store_float32x4, EQ);
1804 1804
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
2937 2937
2938 2938
2939 void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2939 void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2940 Label* deopt = compiler->AddDeoptStub(deopt_id(), 2940 Label* deopt = compiler->AddDeoptStub(deopt_id(),
2941 ICData::kDeoptBinaryDoubleOp); 2941 ICData::kDeoptBinaryDoubleOp);
2942 intptr_t left_cid = left()->Type()->ToCid(); 2942 intptr_t left_cid = left()->Type()->ToCid();
2943 intptr_t right_cid = right()->Type()->ToCid(); 2943 intptr_t right_cid = right()->Type()->ToCid();
2944 const Register left = locs()->in(0).reg(); 2944 const Register left = locs()->in(0).reg();
2945 const Register right = locs()->in(1).reg(); 2945 const Register right = locs()->in(1).reg();
2946 if (left_cid == kSmiCid) { 2946 if (left_cid == kSmiCid) {
2947 __ tsti(right, kSmiTagMask); 2947 __ tsti(right, Immediate(kSmiTagMask));
2948 } else if (right_cid == kSmiCid) { 2948 } else if (right_cid == kSmiCid) {
2949 __ tsti(left, kSmiTagMask); 2949 __ tsti(left, Immediate(kSmiTagMask));
2950 } else { 2950 } else {
2951 __ orr(TMP, left, Operand(right)); 2951 __ orr(TMP, left, Operand(right));
2952 __ tsti(TMP, kSmiTagMask); 2952 __ tsti(TMP, Immediate(kSmiTagMask));
2953 } 2953 }
2954 __ b(deopt, EQ); 2954 __ b(deopt, EQ);
2955 } 2955 }
2956 2956
2957 2957
2958 LocationSummary* BoxDoubleInstr::MakeLocationSummary(Isolate* isolate, 2958 LocationSummary* BoxDoubleInstr::MakeLocationSummary(Isolate* isolate,
2959 bool opt) const { 2959 bool opt) const {
2960 const intptr_t kNumInputs = 1; 2960 const intptr_t kNumInputs = 1;
2961 const intptr_t kNumTemps = 1; 2961 const intptr_t kNumTemps = 1;
2962 LocationSummary* summary = new(isolate) LocationSummary( 2962 LocationSummary* summary = new(isolate) LocationSummary(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
3006 Label* deopt = compiler->AddDeoptStub(deopt_id_, 3006 Label* deopt = compiler->AddDeoptStub(deopt_id_,
3007 ICData::kDeoptBinaryDoubleOp); 3007 ICData::kDeoptBinaryDoubleOp);
3008 if (value_type->is_nullable() && 3008 if (value_type->is_nullable() &&
3009 (value_type->ToNullableCid() == kDoubleCid)) { 3009 (value_type->ToNullableCid() == kDoubleCid)) {
3010 __ CompareObject(value, Object::null_object(), PP); 3010 __ CompareObject(value, Object::null_object(), PP);
3011 __ b(deopt, EQ); 3011 __ b(deopt, EQ);
3012 // It must be double now. 3012 // It must be double now.
3013 __ LoadDFieldFromOffset(result, value, Double::value_offset(), PP); 3013 __ LoadDFieldFromOffset(result, value, Double::value_offset(), PP);
3014 } else { 3014 } else {
3015 Label is_smi, done; 3015 Label is_smi, done;
3016 __ tsti(value, kSmiTagMask); 3016 __ tsti(value, Immediate(kSmiTagMask));
3017 __ b(&is_smi, EQ); 3017 __ b(&is_smi, EQ);
3018 __ CompareClassId(value, kDoubleCid, PP); 3018 __ CompareClassId(value, kDoubleCid, PP);
3019 __ b(deopt, NE); 3019 __ b(deopt, NE);
3020 __ LoadDFieldFromOffset(result, value, Double::value_offset(), PP); 3020 __ LoadDFieldFromOffset(result, value, Double::value_offset(), PP);
3021 __ b(&done); 3021 __ b(&done);
3022 __ Bind(&is_smi); 3022 __ Bind(&is_smi);
3023 __ SmiUntag(TMP, value); // Copy and untag. 3023 __ SmiUntag(TMP, value); // Copy and untag.
3024 __ scvtfd(result, TMP); 3024 __ scvtfd(result, TMP);
3025 __ Bind(&done); 3025 __ Bind(&done);
3026 } 3026 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
3064 } 3064 }
3065 3065
3066 3066
3067 void UnboxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { 3067 void UnboxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
3068 const intptr_t value_cid = value()->Type()->ToCid(); 3068 const intptr_t value_cid = value()->Type()->ToCid();
3069 const Register value = locs()->in(0).reg(); 3069 const Register value = locs()->in(0).reg();
3070 const VRegister result = locs()->out(0).fpu_reg(); 3070 const VRegister result = locs()->out(0).fpu_reg();
3071 3071
3072 if (value_cid != kFloat32x4Cid) { 3072 if (value_cid != kFloat32x4Cid) {
3073 Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); 3073 Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass);
3074 __ tsti(value, kSmiTagMask); 3074 __ tsti(value, Immediate(kSmiTagMask));
3075 __ b(deopt, EQ); 3075 __ b(deopt, EQ);
3076 __ CompareClassId(value, kFloat32x4Cid, PP); 3076 __ CompareClassId(value, kFloat32x4Cid, PP);
3077 __ b(deopt, NE); 3077 __ b(deopt, NE);
3078 } 3078 }
3079 3079
3080 __ LoadQFieldFromOffset(result, value, Float32x4::value_offset(), PP); 3080 __ LoadQFieldFromOffset(result, value, Float32x4::value_offset(), PP);
3081 } 3081 }
3082 3082
3083 3083
3084 LocationSummary* BoxFloat64x2Instr::MakeLocationSummary(Isolate* isolate, 3084 LocationSummary* BoxFloat64x2Instr::MakeLocationSummary(Isolate* isolate,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3117 } 3117 }
3118 3118
3119 3119
3120 void UnboxFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { 3120 void UnboxFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
3121 const intptr_t value_cid = value()->Type()->ToCid(); 3121 const intptr_t value_cid = value()->Type()->ToCid();
3122 const Register value = locs()->in(0).reg(); 3122 const Register value = locs()->in(0).reg();
3123 const VRegister result = locs()->out(0).fpu_reg(); 3123 const VRegister result = locs()->out(0).fpu_reg();
3124 3124
3125 if (value_cid != kFloat64x2Cid) { 3125 if (value_cid != kFloat64x2Cid) {
3126 Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); 3126 Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass);
3127 __ tsti(value, kSmiTagMask); 3127 __ tsti(value, Immediate(kSmiTagMask));
3128 __ b(deopt, EQ); 3128 __ b(deopt, EQ);
3129 __ CompareClassId(value, kFloat64x2Cid, PP); 3129 __ CompareClassId(value, kFloat64x2Cid, PP);
3130 __ b(deopt, NE); 3130 __ b(deopt, NE);
3131 } 3131 }
3132 3132
3133 __ LoadQFieldFromOffset(result, value, Float64x2::value_offset(), PP); 3133 __ LoadQFieldFromOffset(result, value, Float64x2::value_offset(), PP);
3134 } 3134 }
3135 3135
3136 3136
3137 LocationSummary* BoxInt32x4Instr::MakeLocationSummary(Isolate* isolate, 3137 LocationSummary* BoxInt32x4Instr::MakeLocationSummary(Isolate* isolate,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3169 } 3169 }
3170 3170
3171 3171
3172 void UnboxInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { 3172 void UnboxInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
3173 const intptr_t value_cid = value()->Type()->ToCid(); 3173 const intptr_t value_cid = value()->Type()->ToCid();
3174 const Register value = locs()->in(0).reg(); 3174 const Register value = locs()->in(0).reg();
3175 const VRegister result = locs()->out(0).fpu_reg(); 3175 const VRegister result = locs()->out(0).fpu_reg();
3176 3176
3177 if (value_cid != kInt32x4Cid) { 3177 if (value_cid != kInt32x4Cid) {
3178 Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); 3178 Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass);
3179 __ tsti(value, kSmiTagMask); 3179 __ tsti(value, Immediate(kSmiTagMask));
3180 __ b(deopt, EQ); 3180 __ b(deopt, EQ);
3181 __ CompareClassId(value, kInt32x4Cid, PP); 3181 __ CompareClassId(value, kInt32x4Cid, PP);
3182 __ b(deopt, NE); 3182 __ b(deopt, NE);
3183 } 3183 }
3184 3184
3185 __ LoadQFieldFromOffset(result, value, Int32x4::value_offset(), PP); 3185 __ LoadQFieldFromOffset(result, value, Int32x4::value_offset(), PP);
3186 } 3186 }
3187 3187
3188 3188
3189 LocationSummary* BinaryDoubleOpInstr::MakeLocationSummary(Isolate* isolate, 3189 LocationSummary* BinaryDoubleOpInstr::MakeLocationSummary(Isolate* isolate,
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
4349 __ subs(result, ZR, Operand(value)); 4349 __ subs(result, ZR, Operand(value));
4350 __ b(deopt, VS); 4350 __ b(deopt, VS);
4351 if (FLAG_throw_on_javascript_int_overflow) { 4351 if (FLAG_throw_on_javascript_int_overflow) {
4352 EmitJavascriptOverflowCheck(compiler, range(), deopt, value); 4352 EmitJavascriptOverflowCheck(compiler, range(), deopt, value);
4353 } 4353 }
4354 break; 4354 break;
4355 } 4355 }
4356 case Token::kBIT_NOT: 4356 case Token::kBIT_NOT:
4357 __ mvn(result, value); 4357 __ mvn(result, value);
4358 // Remove inverted smi-tag. 4358 // Remove inverted smi-tag.
4359 __ andi(result, result, ~kSmiTagMask); 4359 __ andi(result, result, Immediate(~kSmiTagMask));
4360 break; 4360 break;
4361 default: 4361 default:
4362 UNREACHABLE(); 4362 UNREACHABLE();
4363 } 4363 }
4364 } 4364 }
4365 4365
4366 4366
4367 LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary(Isolate* isolate, 4367 LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary(Isolate* isolate,
4368 bool opt) const { 4368 bool opt) const {
4369 const intptr_t kNumInputs = 1; 4369 const intptr_t kNumInputs = 1;
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
4912 } 4912 }
4913 4913
4914 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || 4914 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) ||
4915 (unary_checks().NumberOfChecks() > 1)); 4915 (unary_checks().NumberOfChecks() > 1));
4916 const Register value = locs()->in(0).reg(); 4916 const Register value = locs()->in(0).reg();
4917 const Register temp = locs()->temp(0).reg(); 4917 const Register temp = locs()->temp(0).reg();
4918 Label* deopt = compiler->AddDeoptStub(deopt_id(), deopt_reason); 4918 Label* deopt = compiler->AddDeoptStub(deopt_id(), deopt_reason);
4919 Label is_ok; 4919 Label is_ok;
4920 intptr_t cix = 0; 4920 intptr_t cix = 0;
4921 if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) { 4921 if (unary_checks().GetReceiverClassIdAt(cix) == kSmiCid) {
4922 __ tsti(value, kSmiTagMask); 4922 __ tsti(value, Immediate(kSmiTagMask));
4923 __ b(&is_ok, EQ); 4923 __ b(&is_ok, EQ);
4924 cix++; // Skip first check. 4924 cix++; // Skip first check.
4925 } else { 4925 } else {
4926 __ tsti(value, kSmiTagMask); 4926 __ tsti(value, Immediate(kSmiTagMask));
4927 __ b(deopt, EQ); 4927 __ b(deopt, EQ);
4928 } 4928 }
4929 __ LoadClassId(temp, value, PP); 4929 __ LoadClassId(temp, value, PP);
4930 4930
4931 if (IsDenseSwitch()) { 4931 if (IsDenseSwitch()) {
4932 ASSERT(cids_[0] < cids_[cids_.length() - 1]); 4932 ASSERT(cids_[0] < cids_[cids_.length() - 1]);
4933 __ AddImmediate(temp, temp, -cids_[0], PP); 4933 __ AddImmediate(temp, temp, -cids_[0], PP);
4934 __ CompareImmediate(temp, cids_[cids_.length() - 1] - cids_[0], PP); 4934 __ CompareImmediate(temp, cids_[cids_.length() - 1] - cids_[0], PP);
4935 __ b(deopt, HI); 4935 __ b(deopt, HI);
4936 4936
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
4987 LocationSummary* summary = new(isolate) LocationSummary( 4987 LocationSummary* summary = new(isolate) LocationSummary(
4988 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); 4988 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
4989 summary->set_in(0, Location::RequiresRegister()); 4989 summary->set_in(0, Location::RequiresRegister());
4990 return summary; 4990 return summary;
4991 } 4991 }
4992 4992
4993 4993
4994 void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 4994 void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
4995 const Register value = locs()->in(0).reg(); 4995 const Register value = locs()->in(0).reg();
4996 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi); 4996 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi);
4997 __ tsti(value, kSmiTagMask); 4997 __ tsti(value, Immediate(kSmiTagMask));
4998 __ b(deopt, NE); 4998 __ b(deopt, NE);
4999 } 4999 }
5000 5000
5001 5001
5002 LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(Isolate* isolate, 5002 LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(Isolate* isolate,
5003 bool opt) const { 5003 bool opt) const {
5004 const intptr_t kNumInputs = 2; 5004 const intptr_t kNumInputs = 2;
5005 const intptr_t kNumTemps = 0; 5005 const intptr_t kNumTemps = 0;
5006 LocationSummary* locs = new(isolate) LocationSummary( 5006 LocationSummary* locs = new(isolate) LocationSummary(
5007 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); 5007 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
5490 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 5490 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
5491 #if defined(DEBUG) 5491 #if defined(DEBUG)
5492 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); 5492 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP);
5493 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); 5493 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP);
5494 #endif 5494 #endif
5495 } 5495 }
5496 5496
5497 } // namespace dart 5497 } // namespace dart
5498 5498
5499 #endif // defined TARGET_ARCH_ARM64 5499 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698