| OLD | NEW |
| 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 19 matching lines...) Expand all Loading... |
| 30 LocationSummary* result = new LocationSummary(0, 0, LocationSummary::kCall); | 30 LocationSummary* result = new LocationSummary(0, 0, LocationSummary::kCall); |
| 31 result->set_out(0, Location::RegisterLocation(R0)); | 31 result->set_out(0, Location::RegisterLocation(R0)); |
| 32 return result; | 32 return result; |
| 33 } | 33 } |
| 34 | 34 |
| 35 | 35 |
| 36 LocationSummary* PushArgumentInstr::MakeLocationSummary(bool opt) const { | 36 LocationSummary* PushArgumentInstr::MakeLocationSummary(bool opt) const { |
| 37 const intptr_t kNumInputs = 1; | 37 const intptr_t kNumInputs = 1; |
| 38 const intptr_t kNumTemps= 0; | 38 const intptr_t kNumTemps= 0; |
| 39 LocationSummary* locs = | 39 LocationSummary* locs = |
| 40 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 40 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 41 locs->set_in(0, Location::AnyOrConstant(value())); | 41 locs->set_in(0, Location::AnyOrConstant(value())); |
| 42 return locs; | 42 return locs; |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 void PushArgumentInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 46 void PushArgumentInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 47 // In SSA mode, we need an explicit push. Nothing to do in non-SSA mode | 47 // In SSA mode, we need an explicit push. Nothing to do in non-SSA mode |
| 48 // where PushArgument is handled by BindInstr::EmitNativeCode. | 48 // where PushArgument is handled by BindInstr::EmitNativeCode. |
| 49 if (compiler->is_optimizing()) { | 49 if (compiler->is_optimizing()) { |
| 50 Location value = locs()->in(0); | 50 Location value = locs()->in(0); |
| 51 if (value.IsRegister()) { | 51 if (value.IsRegister()) { |
| 52 __ Push(value.reg()); | 52 __ Push(value.reg()); |
| 53 } else if (value.IsConstant()) { | 53 } else if (value.IsConstant()) { |
| 54 __ PushObject(value.constant(), PP); | 54 __ PushObject(value.constant(), PP); |
| 55 } else { | 55 } else { |
| 56 ASSERT(value.IsStackSlot()); | 56 ASSERT(value.IsStackSlot()); |
| 57 const intptr_t value_offset = value.ToStackSlotOffset(); | 57 const intptr_t value_offset = value.ToStackSlotOffset(); |
| 58 __ LoadFromOffset(TMP, FP, value_offset, PP); | 58 __ LoadFromOffset(TMP, FP, value_offset, PP); |
| 59 __ Push(TMP); | 59 __ Push(TMP); |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 | 63 |
| 64 | 64 |
| 65 LocationSummary* ReturnInstr::MakeLocationSummary(bool opt) const { | 65 LocationSummary* ReturnInstr::MakeLocationSummary(bool opt) const { |
| 66 const intptr_t kNumInputs = 1; | 66 const intptr_t kNumInputs = 1; |
| 67 const intptr_t kNumTemps = 0; | 67 const intptr_t kNumTemps = 0; |
| 68 LocationSummary* locs = | 68 LocationSummary* locs = |
| 69 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 69 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 70 locs->set_in(0, Location::RegisterLocation(R0)); | 70 locs->set_in(0, Location::RegisterLocation(R0)); |
| 71 return locs; | 71 return locs; |
| 72 } | 72 } |
| 73 | 73 |
| 74 | 74 |
| 75 // Attempt optimized compilation at return instruction instead of at the entry. | 75 // Attempt optimized compilation at return instruction instead of at the entry. |
| 76 // The entry needs to be patchable, no inlined objects are allowed in the area | 76 // The entry needs to be patchable, no inlined objects are allowed in the area |
| 77 // that will be overwritten by the patch instructions: a branch macro sequence. | 77 // that will be overwritten by the patch instructions: a branch macro sequence. |
| 78 void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 78 void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 79 const Register result = locs()->in(0).reg(); | 79 const Register result = locs()->in(0).reg(); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 __ AddImmediate(result, result, Smi::RawValue(false_value), PP); | 176 __ AddImmediate(result, result, Smi::RawValue(false_value), PP); |
| 177 } | 177 } |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 | 180 |
| 181 | 181 |
| 182 LocationSummary* ClosureCallInstr::MakeLocationSummary(bool opt) const { | 182 LocationSummary* ClosureCallInstr::MakeLocationSummary(bool opt) const { |
| 183 const intptr_t kNumInputs = 1; | 183 const intptr_t kNumInputs = 1; |
| 184 const intptr_t kNumTemps = 0; | 184 const intptr_t kNumTemps = 0; |
| 185 LocationSummary* summary = | 185 LocationSummary* summary = |
| 186 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 186 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
| 187 summary->set_in(0, Location::RegisterLocation(R0)); // Function. | 187 summary->set_in(0, Location::RegisterLocation(R0)); // Function. |
| 188 summary->set_out(0, Location::RegisterLocation(R0)); | 188 summary->set_out(0, Location::RegisterLocation(R0)); |
| 189 return summary; | 189 return summary; |
| 190 } | 190 } |
| 191 | 191 |
| 192 | 192 |
| 193 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 193 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 194 // Load arguments descriptor in R4. | 194 // Load arguments descriptor in R4. |
| 195 int argument_count = ArgumentCount(); | 195 int argument_count = ArgumentCount(); |
| 196 const Array& arguments_descriptor = | 196 const Array& arguments_descriptor = |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 const VRegister dst = locs()->out(0).fpu_reg(); | 286 const VRegister dst = locs()->out(0).fpu_reg(); |
| 287 __ LoadDImmediate(dst, Double::Cast(value()).value(), PP); | 287 __ LoadDImmediate(dst, Double::Cast(value()).value(), PP); |
| 288 } | 288 } |
| 289 } | 289 } |
| 290 | 290 |
| 291 | 291 |
| 292 LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const { | 292 LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const { |
| 293 const intptr_t kNumInputs = 3; | 293 const intptr_t kNumInputs = 3; |
| 294 const intptr_t kNumTemps = 0; | 294 const intptr_t kNumTemps = 0; |
| 295 LocationSummary* summary = | 295 LocationSummary* summary = |
| 296 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 296 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
| 297 summary->set_in(0, Location::RegisterLocation(R0)); // Value. | 297 summary->set_in(0, Location::RegisterLocation(R0)); // Value. |
| 298 summary->set_in(1, Location::RegisterLocation(R2)); // Instantiator. | 298 summary->set_in(1, Location::RegisterLocation(R2)); // Instantiator. |
| 299 summary->set_in(2, Location::RegisterLocation(R1)); // Type arguments. | 299 summary->set_in(2, Location::RegisterLocation(R1)); // Type arguments. |
| 300 summary->set_out(0, Location::RegisterLocation(R0)); | 300 summary->set_out(0, Location::RegisterLocation(R0)); |
| 301 return summary; | 301 return summary; |
| 302 } | 302 } |
| 303 | 303 |
| 304 | 304 |
| 305 LocationSummary* AssertBooleanInstr::MakeLocationSummary(bool opt) const { | 305 LocationSummary* AssertBooleanInstr::MakeLocationSummary(bool opt) const { |
| 306 const intptr_t kNumInputs = 1; | 306 const intptr_t kNumInputs = 1; |
| 307 const intptr_t kNumTemps = 0; | 307 const intptr_t kNumTemps = 0; |
| 308 LocationSummary* locs = | 308 LocationSummary* locs = |
| 309 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 309 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
| 310 locs->set_in(0, Location::RegisterLocation(R0)); | 310 locs->set_in(0, Location::RegisterLocation(R0)); |
| 311 locs->set_out(0, Location::RegisterLocation(R0)); | 311 locs->set_out(0, Location::RegisterLocation(R0)); |
| 312 return locs; | 312 return locs; |
| 313 } | 313 } |
| 314 | 314 |
| 315 | 315 |
| 316 static void EmitAssertBoolean(Register reg, | 316 static void EmitAssertBoolean(Register reg, |
| 317 intptr_t token_pos, | 317 intptr_t token_pos, |
| 318 intptr_t deopt_id, | 318 intptr_t deopt_id, |
| 319 LocationSummary* locs, | 319 LocationSummary* locs, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 } | 420 } |
| 421 return true_condition; | 421 return true_condition; |
| 422 } | 422 } |
| 423 | 423 |
| 424 | 424 |
| 425 LocationSummary* EqualityCompareInstr::MakeLocationSummary(bool opt) const { | 425 LocationSummary* EqualityCompareInstr::MakeLocationSummary(bool opt) const { |
| 426 const intptr_t kNumInputs = 2; | 426 const intptr_t kNumInputs = 2; |
| 427 if (operation_cid() == kDoubleCid) { | 427 if (operation_cid() == kDoubleCid) { |
| 428 const intptr_t kNumTemps = 0; | 428 const intptr_t kNumTemps = 0; |
| 429 LocationSummary* locs = | 429 LocationSummary* locs = |
| 430 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 430 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kNoCall); |
| 431 locs->set_in(0, Location::RequiresFpuRegister()); | 431 locs->set_in(0, Location::RequiresFpuRegister()); |
| 432 locs->set_in(1, Location::RequiresFpuRegister()); | 432 locs->set_in(1, Location::RequiresFpuRegister()); |
| 433 locs->set_out(0, Location::RequiresRegister()); | 433 locs->set_out(0, Location::RequiresRegister()); |
| 434 return locs; | 434 return locs; |
| 435 } | 435 } |
| 436 if (operation_cid() == kSmiCid) { | 436 if (operation_cid() == kSmiCid) { |
| 437 const intptr_t kNumTemps = 0; | 437 const intptr_t kNumTemps = 0; |
| 438 LocationSummary* locs = | 438 LocationSummary* locs = |
| 439 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 439 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kNoCall); |
| 440 locs->set_in(0, Location::RegisterOrConstant(left())); | 440 locs->set_in(0, Location::RegisterOrConstant(left())); |
| 441 // Only one input can be a constant operand. The case of two constant | 441 // Only one input can be a constant operand. The case of two constant |
| 442 // operands should be handled by constant propagation. | 442 // operands should be handled by constant propagation. |
| 443 // Only right can be a stack slot. | 443 // Only right can be a stack slot. |
| 444 locs->set_in(1, locs->in(0).IsConstant() | 444 locs->set_in(1, locs->in(0).IsConstant() |
| 445 ? Location::RequiresRegister() | 445 ? Location::RequiresRegister() |
| 446 : Location::RegisterOrConstant(right())); | 446 : Location::RegisterOrConstant(right())); |
| 447 locs->set_out(0, Location::RequiresRegister()); | 447 locs->set_out(0, Location::RequiresRegister()); |
| 448 return locs; | 448 return locs; |
| 449 } | 449 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 __ b(labels.false_label, VS); | 525 __ b(labels.false_label, VS); |
| 526 } | 526 } |
| 527 EmitBranchOnCondition(compiler, true_condition, labels); | 527 EmitBranchOnCondition(compiler, true_condition, labels); |
| 528 } | 528 } |
| 529 | 529 |
| 530 | 530 |
| 531 LocationSummary* TestSmiInstr::MakeLocationSummary(bool opt) const { | 531 LocationSummary* TestSmiInstr::MakeLocationSummary(bool opt) const { |
| 532 const intptr_t kNumInputs = 2; | 532 const intptr_t kNumInputs = 2; |
| 533 const intptr_t kNumTemps = 0; | 533 const intptr_t kNumTemps = 0; |
| 534 LocationSummary* locs = | 534 LocationSummary* locs = |
| 535 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 535 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 536 locs->set_in(0, Location::RequiresRegister()); | 536 locs->set_in(0, Location::RequiresRegister()); |
| 537 // Only one input can be a constant operand. The case of two constant | 537 // Only one input can be a constant operand. The case of two constant |
| 538 // operands should be handled by constant propagation. | 538 // operands should be handled by constant propagation. |
| 539 locs->set_in(1, Location::RegisterOrConstant(right())); | 539 locs->set_in(1, Location::RegisterOrConstant(right())); |
| 540 return locs; | 540 return locs; |
| 541 } | 541 } |
| 542 | 542 |
| 543 | 543 |
| 544 Condition TestSmiInstr::EmitComparisonCode(FlowGraphCompiler* compiler, | 544 Condition TestSmiInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
| 545 BranchLabels labels) { | 545 BranchLabels labels) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 569 BranchLabels labels = compiler->CreateBranchLabels(branch); | 569 BranchLabels labels = compiler->CreateBranchLabels(branch); |
| 570 Condition true_condition = EmitComparisonCode(compiler, labels); | 570 Condition true_condition = EmitComparisonCode(compiler, labels); |
| 571 EmitBranchOnCondition(compiler, true_condition, labels); | 571 EmitBranchOnCondition(compiler, true_condition, labels); |
| 572 } | 572 } |
| 573 | 573 |
| 574 | 574 |
| 575 LocationSummary* TestCidsInstr::MakeLocationSummary(bool opt) const { | 575 LocationSummary* TestCidsInstr::MakeLocationSummary(bool opt) const { |
| 576 const intptr_t kNumInputs = 1; | 576 const intptr_t kNumInputs = 1; |
| 577 const intptr_t kNumTemps = 1; | 577 const intptr_t kNumTemps = 1; |
| 578 LocationSummary* locs = | 578 LocationSummary* locs = |
| 579 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 579 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 580 locs->set_in(0, Location::RequiresRegister()); | 580 locs->set_in(0, Location::RequiresRegister()); |
| 581 locs->set_temp(0, Location::RequiresRegister()); | 581 locs->set_temp(0, Location::RequiresRegister()); |
| 582 locs->set_out(0, Location::RequiresRegister()); | 582 locs->set_out(0, Location::RequiresRegister()); |
| 583 return locs; | 583 return locs; |
| 584 } | 584 } |
| 585 | 585 |
| 586 | 586 |
| 587 Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler, | 587 Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
| 588 BranchLabels labels) { | 588 BranchLabels labels) { |
| 589 ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT)); | 589 ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT)); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 __ LoadObject(result_reg, Bool::True(), PP); | 644 __ LoadObject(result_reg, Bool::True(), PP); |
| 645 __ Bind(&done); | 645 __ Bind(&done); |
| 646 } | 646 } |
| 647 | 647 |
| 648 | 648 |
| 649 LocationSummary* RelationalOpInstr::MakeLocationSummary(bool opt) const { | 649 LocationSummary* RelationalOpInstr::MakeLocationSummary(bool opt) const { |
| 650 const intptr_t kNumInputs = 2; | 650 const intptr_t kNumInputs = 2; |
| 651 const intptr_t kNumTemps = 0; | 651 const intptr_t kNumTemps = 0; |
| 652 if (operation_cid() == kDoubleCid) { | 652 if (operation_cid() == kDoubleCid) { |
| 653 LocationSummary* summary = | 653 LocationSummary* summary = |
| 654 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 654 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kNoCall); |
| 655 summary->set_in(0, Location::RequiresFpuRegister()); | 655 summary->set_in(0, Location::RequiresFpuRegister()); |
| 656 summary->set_in(1, Location::RequiresFpuRegister()); | 656 summary->set_in(1, Location::RequiresFpuRegister()); |
| 657 summary->set_out(0, Location::RequiresRegister()); | 657 summary->set_out(0, Location::RequiresRegister()); |
| 658 return summary; | 658 return summary; |
| 659 } | 659 } |
| 660 ASSERT(operation_cid() == kSmiCid); | 660 ASSERT(operation_cid() == kSmiCid); |
| 661 LocationSummary* summary = | 661 LocationSummary* summary = |
| 662 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 662 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 663 summary->set_in(0, Location::RegisterOrConstant(left())); | 663 summary->set_in(0, Location::RegisterOrConstant(left())); |
| 664 // Only one input can be a constant operand. The case of two constant | 664 // Only one input can be a constant operand. The case of two constant |
| 665 // operands should be handled by constant propagation. | 665 // operands should be handled by constant propagation. |
| 666 summary->set_in(1, summary->in(0).IsConstant() | 666 summary->set_in(1, summary->in(0).IsConstant() |
| 667 ? Location::RequiresRegister() | 667 ? Location::RequiresRegister() |
| 668 : Location::RegisterOrConstant(right())); | 668 : Location::RegisterOrConstant(right())); |
| 669 summary->set_out(0, Location::RequiresRegister()); | 669 summary->set_out(0, Location::RequiresRegister()); |
| 670 return summary; | 670 return summary; |
| 671 } | 671 } |
| 672 | 672 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 __ b(labels.false_label, VS); | 715 __ b(labels.false_label, VS); |
| 716 } | 716 } |
| 717 EmitBranchOnCondition(compiler, true_condition, labels); | 717 EmitBranchOnCondition(compiler, true_condition, labels); |
| 718 } | 718 } |
| 719 | 719 |
| 720 | 720 |
| 721 LocationSummary* NativeCallInstr::MakeLocationSummary(bool opt) const { | 721 LocationSummary* NativeCallInstr::MakeLocationSummary(bool opt) const { |
| 722 const intptr_t kNumInputs = 0; | 722 const intptr_t kNumInputs = 0; |
| 723 const intptr_t kNumTemps = 3; | 723 const intptr_t kNumTemps = 3; |
| 724 LocationSummary* locs = | 724 LocationSummary* locs = |
| 725 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 725 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
| 726 locs->set_temp(0, Location::RegisterLocation(R1)); | 726 locs->set_temp(0, Location::RegisterLocation(R1)); |
| 727 locs->set_temp(1, Location::RegisterLocation(R2)); | 727 locs->set_temp(1, Location::RegisterLocation(R2)); |
| 728 locs->set_temp(2, Location::RegisterLocation(R5)); | 728 locs->set_temp(2, Location::RegisterLocation(R5)); |
| 729 locs->set_out(0, Location::RegisterLocation(R0)); | 729 locs->set_out(0, Location::RegisterLocation(R0)); |
| 730 return locs; | 730 return locs; |
| 731 } | 731 } |
| 732 | 732 |
| 733 | 733 |
| 734 void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 734 void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 735 ASSERT(locs()->temp(0).reg() == R1); | 735 ASSERT(locs()->temp(0).reg() == R1); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 __ LoadImmediate(result, -1, PP); | 818 __ LoadImmediate(result, -1, PP); |
| 819 __ csel(result, TMP, result, EQ); | 819 __ csel(result, TMP, result, EQ); |
| 820 __ SmiTag(result); | 820 __ SmiTag(result); |
| 821 } | 821 } |
| 822 | 822 |
| 823 | 823 |
| 824 LocationSummary* StringInterpolateInstr::MakeLocationSummary(bool opt) const { | 824 LocationSummary* StringInterpolateInstr::MakeLocationSummary(bool opt) const { |
| 825 const intptr_t kNumInputs = 1; | 825 const intptr_t kNumInputs = 1; |
| 826 const intptr_t kNumTemps = 0; | 826 const intptr_t kNumTemps = 0; |
| 827 LocationSummary* summary = | 827 LocationSummary* summary = |
| 828 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 828 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
| 829 summary->set_in(0, Location::RegisterLocation(R0)); | 829 summary->set_in(0, Location::RegisterLocation(R0)); |
| 830 summary->set_out(0, Location::RegisterLocation(R0)); | 830 summary->set_out(0, Location::RegisterLocation(R0)); |
| 831 return summary; | 831 return summary; |
| 832 } | 832 } |
| 833 | 833 |
| 834 | 834 |
| 835 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 835 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 836 const Register array = locs()->in(0).reg(); | 836 const Register array = locs()->in(0).reg(); |
| 837 __ Push(array); | 837 __ Push(array); |
| 838 const int kNumberOfArguments = 1; | 838 const int kNumberOfArguments = 1; |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 UNIMPLEMENTED(); | 950 UNIMPLEMENTED(); |
| 951 return kTagged; | 951 return kTagged; |
| 952 } | 952 } |
| 953 } | 953 } |
| 954 | 954 |
| 955 | 955 |
| 956 LocationSummary* LoadIndexedInstr::MakeLocationSummary(bool opt) const { | 956 LocationSummary* LoadIndexedInstr::MakeLocationSummary(bool opt) const { |
| 957 const intptr_t kNumInputs = 2; | 957 const intptr_t kNumInputs = 2; |
| 958 const intptr_t kNumTemps = 0; | 958 const intptr_t kNumTemps = 0; |
| 959 LocationSummary* locs = | 959 LocationSummary* locs = |
| 960 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 960 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 961 locs->set_in(0, Location::RequiresRegister()); | 961 locs->set_in(0, Location::RequiresRegister()); |
| 962 // The smi index is either untagged (element size == 1), or it is left smi | 962 // The smi index is either untagged (element size == 1), or it is left smi |
| 963 // tagged (for all element sizes > 1). | 963 // tagged (for all element sizes > 1). |
| 964 // TODO(regis): Revisit and see if the index can be immediate. | 964 // TODO(regis): Revisit and see if the index can be immediate. |
| 965 locs->set_in(1, Location::WritableRegister()); | 965 locs->set_in(1, Location::WritableRegister()); |
| 966 if ((representation() == kUnboxedDouble) || | 966 if ((representation() == kUnboxedDouble) || |
| 967 (representation() == kUnboxedFloat32x4) || | 967 (representation() == kUnboxedFloat32x4) || |
| 968 (representation() == kUnboxedInt32x4) || | 968 (representation() == kUnboxedInt32x4) || |
| 969 (representation() == kUnboxedFloat64x2)) { | 969 (representation() == kUnboxedFloat64x2)) { |
| 970 locs->set_out(0, Location::RequiresFpuRegister()); | 970 locs->set_out(0, Location::RequiresFpuRegister()); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 UNREACHABLE(); | 1118 UNREACHABLE(); |
| 1119 return kTagged; | 1119 return kTagged; |
| 1120 } | 1120 } |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 | 1123 |
| 1124 LocationSummary* StoreIndexedInstr::MakeLocationSummary(bool opt) const { | 1124 LocationSummary* StoreIndexedInstr::MakeLocationSummary(bool opt) const { |
| 1125 const intptr_t kNumInputs = 3; | 1125 const intptr_t kNumInputs = 3; |
| 1126 const intptr_t kNumTemps = 0; | 1126 const intptr_t kNumTemps = 0; |
| 1127 LocationSummary* locs = | 1127 LocationSummary* locs = |
| 1128 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 1128 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 1129 locs->set_in(0, Location::RequiresRegister()); | 1129 locs->set_in(0, Location::RequiresRegister()); |
| 1130 // The smi index is either untagged (element size == 1), or it is left smi | 1130 // The smi index is either untagged (element size == 1), or it is left smi |
| 1131 // tagged (for all element sizes > 1). | 1131 // tagged (for all element sizes > 1). |
| 1132 // TODO(regis): Revisit and see if the index can be immediate. | 1132 // TODO(regis): Revisit and see if the index can be immediate. |
| 1133 locs->set_in(1, Location::WritableRegister()); | 1133 locs->set_in(1, Location::WritableRegister()); |
| 1134 switch (class_id()) { | 1134 switch (class_id()) { |
| 1135 case kArrayCid: | 1135 case kArrayCid: |
| 1136 locs->set_in(2, ShouldEmitStoreBarrier() | 1136 locs->set_in(2, ShouldEmitStoreBarrier() |
| 1137 ? Location::WritableRegister() | 1137 ? Location::WritableRegister() |
| 1138 : Location::RegisterOrConstant(value())); | 1138 : Location::RegisterOrConstant(value())); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 __ b(value_is_smi, EQ); | 1329 __ b(value_is_smi, EQ); |
| 1330 } | 1330 } |
| 1331 __ LoadClassId(value_cid_reg, value_reg, PP); | 1331 __ LoadClassId(value_cid_reg, value_reg, PP); |
| 1332 __ Bind(&done); | 1332 __ Bind(&done); |
| 1333 } | 1333 } |
| 1334 | 1334 |
| 1335 | 1335 |
| 1336 LocationSummary* GuardFieldInstr::MakeLocationSummary(bool opt) const { | 1336 LocationSummary* GuardFieldInstr::MakeLocationSummary(bool opt) const { |
| 1337 const intptr_t kNumInputs = 1; | 1337 const intptr_t kNumInputs = 1; |
| 1338 LocationSummary* summary = | 1338 LocationSummary* summary = |
| 1339 new LocationSummary(kNumInputs, 0, LocationSummary::kNoCall); | 1339 new (isolate) LocationSummary(isolate, kNumInputs, 0, LocationSummary::kNo
Call); |
| 1340 summary->set_in(0, Location::RequiresRegister()); | 1340 summary->set_in(0, Location::RequiresRegister()); |
| 1341 const bool field_has_length = field().needs_length_check(); | 1341 const bool field_has_length = field().needs_length_check(); |
| 1342 summary->AddTemp(Location::RequiresRegister()); | 1342 summary->AddTemp(Location::RequiresRegister()); |
| 1343 summary->AddTemp(Location::RequiresRegister()); | 1343 summary->AddTemp(Location::RequiresRegister()); |
| 1344 const bool need_field_temp_reg = | 1344 const bool need_field_temp_reg = |
| 1345 field_has_length || (field().guarded_cid() == kIllegalCid); | 1345 field_has_length || (field().guarded_cid() == kIllegalCid); |
| 1346 if (need_field_temp_reg) { | 1346 if (need_field_temp_reg) { |
| 1347 summary->AddTemp(Location::RequiresRegister()); | 1347 summary->AddTemp(Location::RequiresRegister()); |
| 1348 } | 1348 } |
| 1349 return summary; | 1349 return summary; |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1683 private: | 1683 private: |
| 1684 StoreInstanceFieldInstr* instruction_; | 1684 StoreInstanceFieldInstr* instruction_; |
| 1685 const Class& cls_; | 1685 const Class& cls_; |
| 1686 }; | 1686 }; |
| 1687 | 1687 |
| 1688 | 1688 |
| 1689 LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary(bool opt) const { | 1689 LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary(bool opt) const { |
| 1690 const intptr_t kNumInputs = 2; | 1690 const intptr_t kNumInputs = 2; |
| 1691 const intptr_t kNumTemps = 0; | 1691 const intptr_t kNumTemps = 0; |
| 1692 LocationSummary* summary = | 1692 LocationSummary* summary = |
| 1693 new LocationSummary(kNumInputs, kNumTemps, | 1693 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, |
| 1694 !field().IsNull() && | 1694 !field().IsNull() && |
| 1695 ((field().guarded_cid() == kIllegalCid) || is_initialization_) | 1695 ((field().guarded_cid() == kIllegalCid) || is_initialization_) |
| 1696 ? LocationSummary::kCallOnSlowPath | 1696 ? LocationSummary::kCallOnSlowPath |
| 1697 : LocationSummary::kNoCall); | 1697 : LocationSummary::kNoCall); |
| 1698 | 1698 |
| 1699 summary->set_in(0, Location::RequiresRegister()); | 1699 summary->set_in(0, Location::RequiresRegister()); |
| 1700 if (IsUnboxedStore() && opt) { | 1700 if (IsUnboxedStore() && opt) { |
| 1701 summary->set_in(1, Location::RequiresFpuRegister()); | 1701 summary->set_in(1, Location::RequiresFpuRegister()); |
| 1702 summary->AddTemp(Location::RequiresRegister()); | 1702 summary->AddTemp(Location::RequiresRegister()); |
| 1703 summary->AddTemp(Location::RequiresRegister()); | 1703 summary->AddTemp(Location::RequiresRegister()); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1915 } | 1915 } |
| 1916 } | 1916 } |
| 1917 __ Bind(&skip_store); | 1917 __ Bind(&skip_store); |
| 1918 } | 1918 } |
| 1919 | 1919 |
| 1920 | 1920 |
| 1921 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary(bool opt) const { | 1921 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary(bool opt) const { |
| 1922 const intptr_t kNumInputs = 1; | 1922 const intptr_t kNumInputs = 1; |
| 1923 const intptr_t kNumTemps = 0; | 1923 const intptr_t kNumTemps = 0; |
| 1924 LocationSummary* summary = | 1924 LocationSummary* summary = |
| 1925 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 1925 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 1926 summary->set_in(0, Location::RequiresRegister()); | 1926 summary->set_in(0, Location::RequiresRegister()); |
| 1927 summary->set_out(0, Location::RequiresRegister()); | 1927 summary->set_out(0, Location::RequiresRegister()); |
| 1928 return summary; | 1928 return summary; |
| 1929 } | 1929 } |
| 1930 | 1930 |
| 1931 | 1931 |
| 1932 // When the parser is building an implicit static getter for optimization, | 1932 // When the parser is building an implicit static getter for optimization, |
| 1933 // it can generate a function body where deoptimization ids do not line up | 1933 // it can generate a function body where deoptimization ids do not line up |
| 1934 // with the unoptimized code. | 1934 // with the unoptimized code. |
| 1935 // | 1935 // |
| 1936 // This is safe only so long as LoadStaticFieldInstr cannot deoptimize. | 1936 // This is safe only so long as LoadStaticFieldInstr cannot deoptimize. |
| 1937 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1937 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1938 const Register field = locs()->in(0).reg(); | 1938 const Register field = locs()->in(0).reg(); |
| 1939 const Register result = locs()->out(0).reg(); | 1939 const Register result = locs()->out(0).reg(); |
| 1940 __ LoadFieldFromOffset(result, field, Field::value_offset(), PP); | 1940 __ LoadFieldFromOffset(result, field, Field::value_offset(), PP); |
| 1941 } | 1941 } |
| 1942 | 1942 |
| 1943 | 1943 |
| 1944 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary(bool opt) const { | 1944 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary(bool opt) const { |
| 1945 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); | 1945 LocationSummary* locs = new (isolate) LocationSummary(isolate, 1, 1, LocationS
ummary::kNoCall); |
| 1946 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() | 1946 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() |
| 1947 : Location::RequiresRegister()); | 1947 : Location::RequiresRegister()); |
| 1948 locs->set_temp(0, Location::RequiresRegister()); | 1948 locs->set_temp(0, Location::RequiresRegister()); |
| 1949 return locs; | 1949 return locs; |
| 1950 } | 1950 } |
| 1951 | 1951 |
| 1952 | 1952 |
| 1953 void StoreStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1953 void StoreStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1954 const Register value = locs()->in(0).reg(); | 1954 const Register value = locs()->in(0).reg(); |
| 1955 const Register temp = locs()->temp(0).reg(); | 1955 const Register temp = locs()->temp(0).reg(); |
| 1956 | 1956 |
| 1957 __ LoadObject(temp, field(), PP); | 1957 __ LoadObject(temp, field(), PP); |
| 1958 if (this->value()->NeedsStoreBuffer()) { | 1958 if (this->value()->NeedsStoreBuffer()) { |
| 1959 __ StoreIntoObjectOffset( | 1959 __ StoreIntoObjectOffset( |
| 1960 temp, Field::value_offset(), value, PP, CanValueBeSmi()); | 1960 temp, Field::value_offset(), value, PP, CanValueBeSmi()); |
| 1961 } else { | 1961 } else { |
| 1962 __ StoreIntoObjectOffsetNoBarrier(temp, Field::value_offset(), value, PP); | 1962 __ StoreIntoObjectOffsetNoBarrier(temp, Field::value_offset(), value, PP); |
| 1963 } | 1963 } |
| 1964 } | 1964 } |
| 1965 | 1965 |
| 1966 | 1966 |
| 1967 LocationSummary* InstanceOfInstr::MakeLocationSummary(bool opt) const { | 1967 LocationSummary* InstanceOfInstr::MakeLocationSummary(bool opt) const { |
| 1968 const intptr_t kNumInputs = 3; | 1968 const intptr_t kNumInputs = 3; |
| 1969 const intptr_t kNumTemps = 0; | 1969 const intptr_t kNumTemps = 0; |
| 1970 LocationSummary* summary = | 1970 LocationSummary* summary = |
| 1971 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 1971 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
| 1972 summary->set_in(0, Location::RegisterLocation(R0)); | 1972 summary->set_in(0, Location::RegisterLocation(R0)); |
| 1973 summary->set_in(1, Location::RegisterLocation(R2)); | 1973 summary->set_in(1, Location::RegisterLocation(R2)); |
| 1974 summary->set_in(2, Location::RegisterLocation(R1)); | 1974 summary->set_in(2, Location::RegisterLocation(R1)); |
| 1975 summary->set_out(0, Location::RegisterLocation(R0)); | 1975 summary->set_out(0, Location::RegisterLocation(R0)); |
| 1976 return summary; | 1976 return summary; |
| 1977 } | 1977 } |
| 1978 | 1978 |
| 1979 | 1979 |
| 1980 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1980 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1981 ASSERT(locs()->in(0).reg() == R0); // Value. | 1981 ASSERT(locs()->in(0).reg() == R0); // Value. |
| 1982 ASSERT(locs()->in(1).reg() == R2); // Instantiator. | 1982 ASSERT(locs()->in(1).reg() == R2); // Instantiator. |
| 1983 ASSERT(locs()->in(2).reg() == R1); // Instantiator type arguments. | 1983 ASSERT(locs()->in(2).reg() == R1); // Instantiator type arguments. |
| 1984 | 1984 |
| 1985 compiler->GenerateInstanceOf(token_pos(), | 1985 compiler->GenerateInstanceOf(token_pos(), |
| 1986 deopt_id(), | 1986 deopt_id(), |
| 1987 type(), | 1987 type(), |
| 1988 negate_result(), | 1988 negate_result(), |
| 1989 locs()); | 1989 locs()); |
| 1990 ASSERT(locs()->out(0).reg() == R0); | 1990 ASSERT(locs()->out(0).reg() == R0); |
| 1991 } | 1991 } |
| 1992 | 1992 |
| 1993 | 1993 |
| 1994 LocationSummary* CreateArrayInstr::MakeLocationSummary(bool opt) const { | 1994 LocationSummary* CreateArrayInstr::MakeLocationSummary(bool opt) const { |
| 1995 const intptr_t kNumInputs = 2; | 1995 const intptr_t kNumInputs = 2; |
| 1996 const intptr_t kNumTemps = 0; | 1996 const intptr_t kNumTemps = 0; |
| 1997 LocationSummary* locs = | 1997 LocationSummary* locs = |
| 1998 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 1998 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
| 1999 locs->set_in(kElementTypePos, Location::RegisterLocation(R1)); | 1999 locs->set_in(kElementTypePos, Location::RegisterLocation(R1)); |
| 2000 locs->set_in(kLengthPos, Location::RegisterLocation(R2)); | 2000 locs->set_in(kLengthPos, Location::RegisterLocation(R2)); |
| 2001 locs->set_out(0, Location::RegisterLocation(R0)); | 2001 locs->set_out(0, Location::RegisterLocation(R0)); |
| 2002 return locs; | 2002 return locs; |
| 2003 } | 2003 } |
| 2004 | 2004 |
| 2005 | 2005 |
| 2006 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2006 void CreateArrayInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2007 // Allocate the array. R2 = length, R1 = element type. | 2007 // Allocate the array. R2 = length, R1 = element type. |
| 2008 ASSERT(locs()->in(kElementTypePos).reg() == R1); | 2008 ASSERT(locs()->in(kElementTypePos).reg() == R1); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2108 | 2108 |
| 2109 private: | 2109 private: |
| 2110 Instruction* instruction_; | 2110 Instruction* instruction_; |
| 2111 }; | 2111 }; |
| 2112 | 2112 |
| 2113 | 2113 |
| 2114 LocationSummary* LoadFieldInstr::MakeLocationSummary(bool opt) const { | 2114 LocationSummary* LoadFieldInstr::MakeLocationSummary(bool opt) const { |
| 2115 const intptr_t kNumInputs = 1; | 2115 const intptr_t kNumInputs = 1; |
| 2116 const intptr_t kNumTemps = 0; | 2116 const intptr_t kNumTemps = 0; |
| 2117 LocationSummary* locs = | 2117 LocationSummary* locs = |
| 2118 new LocationSummary( | 2118 new (isolate) LocationSummary(isolate, |
| 2119 kNumInputs, kNumTemps, | 2119 kNumInputs, kNumTemps, |
| 2120 (opt && !IsPotentialUnboxedLoad()) | 2120 (opt && !IsPotentialUnboxedLoad()) |
| 2121 ? LocationSummary::kNoCall | 2121 ? LocationSummary::kNoCall |
| 2122 : LocationSummary::kCallOnSlowPath); | 2122 : LocationSummary::kCallOnSlowPath); |
| 2123 | 2123 |
| 2124 locs->set_in(0, Location::RequiresRegister()); | 2124 locs->set_in(0, Location::RequiresRegister()); |
| 2125 | 2125 |
| 2126 if (IsUnboxedLoad() && opt) { | 2126 if (IsUnboxedLoad() && opt) { |
| 2127 locs->AddTemp(Location::RequiresRegister()); | 2127 locs->AddTemp(Location::RequiresRegister()); |
| 2128 } else if (IsPotentialUnboxedLoad()) { | 2128 } else if (IsPotentialUnboxedLoad()) { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2248 } | 2248 } |
| 2249 __ LoadFieldFromOffset(result_reg, instance_reg, offset_in_bytes(), PP); | 2249 __ LoadFieldFromOffset(result_reg, instance_reg, offset_in_bytes(), PP); |
| 2250 __ Bind(&done); | 2250 __ Bind(&done); |
| 2251 } | 2251 } |
| 2252 | 2252 |
| 2253 | 2253 |
| 2254 LocationSummary* InstantiateTypeInstr::MakeLocationSummary(bool opt) const { | 2254 LocationSummary* InstantiateTypeInstr::MakeLocationSummary(bool opt) const { |
| 2255 const intptr_t kNumInputs = 1; | 2255 const intptr_t kNumInputs = 1; |
| 2256 const intptr_t kNumTemps = 0; | 2256 const intptr_t kNumTemps = 0; |
| 2257 LocationSummary* locs = | 2257 LocationSummary* locs = |
| 2258 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 2258 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
| 2259 locs->set_in(0, Location::RegisterLocation(R0)); | 2259 locs->set_in(0, Location::RegisterLocation(R0)); |
| 2260 locs->set_out(0, Location::RegisterLocation(R0)); | 2260 locs->set_out(0, Location::RegisterLocation(R0)); |
| 2261 return locs; | 2261 return locs; |
| 2262 } | 2262 } |
| 2263 | 2263 |
| 2264 | 2264 |
| 2265 void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2265 void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2266 const Register instantiator_reg = locs()->in(0).reg(); | 2266 const Register instantiator_reg = locs()->in(0).reg(); |
| 2267 const Register result_reg = locs()->out(0).reg(); | 2267 const Register result_reg = locs()->out(0).reg(); |
| 2268 | 2268 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 2280 __ Pop(result_reg); // Pop instantiated type. | 2280 __ Pop(result_reg); // Pop instantiated type. |
| 2281 ASSERT(instantiator_reg == result_reg); | 2281 ASSERT(instantiator_reg == result_reg); |
| 2282 } | 2282 } |
| 2283 | 2283 |
| 2284 | 2284 |
| 2285 LocationSummary* InstantiateTypeArgumentsInstr::MakeLocationSummary( | 2285 LocationSummary* InstantiateTypeArgumentsInstr::MakeLocationSummary( |
| 2286 bool opt) const { | 2286 bool opt) const { |
| 2287 const intptr_t kNumInputs = 1; | 2287 const intptr_t kNumInputs = 1; |
| 2288 const intptr_t kNumTemps = 0; | 2288 const intptr_t kNumTemps = 0; |
| 2289 LocationSummary* locs = | 2289 LocationSummary* locs = |
| 2290 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 2290 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
| 2291 locs->set_in(0, Location::RegisterLocation(R0)); | 2291 locs->set_in(0, Location::RegisterLocation(R0)); |
| 2292 locs->set_out(0, Location::RegisterLocation(R0)); | 2292 locs->set_out(0, Location::RegisterLocation(R0)); |
| 2293 return locs; | 2293 return locs; |
| 2294 } | 2294 } |
| 2295 | 2295 |
| 2296 | 2296 |
| 2297 void InstantiateTypeArgumentsInstr::EmitNativeCode( | 2297 void InstantiateTypeArgumentsInstr::EmitNativeCode( |
| 2298 FlowGraphCompiler* compiler) { | 2298 FlowGraphCompiler* compiler) { |
| 2299 const Register instantiator_reg = locs()->in(0).reg(); | 2299 const Register instantiator_reg = locs()->in(0).reg(); |
| 2300 const Register result_reg = locs()->out(0).reg(); | 2300 const Register result_reg = locs()->out(0).reg(); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2347 __ Drop(2); // Drop instantiator and uninstantiated type arguments. | 2347 __ Drop(2); // Drop instantiator and uninstantiated type arguments. |
| 2348 __ Pop(result_reg); // Pop instantiated type arguments. | 2348 __ Pop(result_reg); // Pop instantiated type arguments. |
| 2349 __ Bind(&type_arguments_instantiated); | 2349 __ Bind(&type_arguments_instantiated); |
| 2350 } | 2350 } |
| 2351 | 2351 |
| 2352 | 2352 |
| 2353 LocationSummary* AllocateContextInstr::MakeLocationSummary(bool opt) const { | 2353 LocationSummary* AllocateContextInstr::MakeLocationSummary(bool opt) const { |
| 2354 const intptr_t kNumInputs = 0; | 2354 const intptr_t kNumInputs = 0; |
| 2355 const intptr_t kNumTemps = 1; | 2355 const intptr_t kNumTemps = 1; |
| 2356 LocationSummary* locs = | 2356 LocationSummary* locs = |
| 2357 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 2357 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
| 2358 locs->set_temp(0, Location::RegisterLocation(R1)); | 2358 locs->set_temp(0, Location::RegisterLocation(R1)); |
| 2359 locs->set_out(0, Location::RegisterLocation(R0)); | 2359 locs->set_out(0, Location::RegisterLocation(R0)); |
| 2360 return locs; | 2360 return locs; |
| 2361 } | 2361 } |
| 2362 | 2362 |
| 2363 | 2363 |
| 2364 void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2364 void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2365 ASSERT(locs()->temp(0).reg() == R1); | 2365 ASSERT(locs()->temp(0).reg() == R1); |
| 2366 ASSERT(locs()->out(0).reg() == R0); | 2366 ASSERT(locs()->out(0).reg() == R0); |
| 2367 | 2367 |
| 2368 __ LoadImmediate(R1, num_context_variables(), PP); | 2368 __ LoadImmediate(R1, num_context_variables(), PP); |
| 2369 const ExternalLabel label("alloc_context", | 2369 const ExternalLabel label("alloc_context", |
| 2370 StubCode::AllocateContextEntryPoint()); | 2370 StubCode::AllocateContextEntryPoint()); |
| 2371 compiler->GenerateCall(token_pos(), | 2371 compiler->GenerateCall(token_pos(), |
| 2372 &label, | 2372 &label, |
| 2373 PcDescriptors::kOther, | 2373 PcDescriptors::kOther, |
| 2374 locs()); | 2374 locs()); |
| 2375 } | 2375 } |
| 2376 | 2376 |
| 2377 | 2377 |
| 2378 LocationSummary* CloneContextInstr::MakeLocationSummary(bool opt) const { | 2378 LocationSummary* CloneContextInstr::MakeLocationSummary(bool opt) const { |
| 2379 const intptr_t kNumInputs = 1; | 2379 const intptr_t kNumInputs = 1; |
| 2380 const intptr_t kNumTemps = 0; | 2380 const intptr_t kNumTemps = 0; |
| 2381 LocationSummary* locs = | 2381 LocationSummary* locs = |
| 2382 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 2382 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
| 2383 locs->set_in(0, Location::RegisterLocation(R0)); | 2383 locs->set_in(0, Location::RegisterLocation(R0)); |
| 2384 locs->set_out(0, Location::RegisterLocation(R0)); | 2384 locs->set_out(0, Location::RegisterLocation(R0)); |
| 2385 return locs; | 2385 return locs; |
| 2386 } | 2386 } |
| 2387 | 2387 |
| 2388 | 2388 |
| 2389 void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2389 void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2390 const Register context_value = locs()->in(0).reg(); | 2390 const Register context_value = locs()->in(0).reg(); |
| 2391 const Register result = locs()->out(0).reg(); | 2391 const Register result = locs()->out(0).reg(); |
| 2392 | 2392 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2436 FP, exception_var().index() * kWordSize, PP); | 2436 FP, exception_var().index() * kWordSize, PP); |
| 2437 __ StoreToOffset(kStackTraceObjectReg, | 2437 __ StoreToOffset(kStackTraceObjectReg, |
| 2438 FP, stacktrace_var().index() * kWordSize, PP); | 2438 FP, stacktrace_var().index() * kWordSize, PP); |
| 2439 } | 2439 } |
| 2440 | 2440 |
| 2441 | 2441 |
| 2442 LocationSummary* CheckStackOverflowInstr::MakeLocationSummary(bool opt) const { | 2442 LocationSummary* CheckStackOverflowInstr::MakeLocationSummary(bool opt) const { |
| 2443 const intptr_t kNumInputs = 0; | 2443 const intptr_t kNumInputs = 0; |
| 2444 const intptr_t kNumTemps = 1; | 2444 const intptr_t kNumTemps = 1; |
| 2445 LocationSummary* summary = | 2445 LocationSummary* summary = |
| 2446 new LocationSummary(kNumInputs, | 2446 new (isolate) LocationSummary(isolate, kNumInputs, |
| 2447 kNumTemps, | 2447 kNumTemps, |
| 2448 LocationSummary::kCallOnSlowPath); | 2448 LocationSummary::kCallOnSlowPath); |
| 2449 summary->set_temp(0, Location::RequiresRegister()); | 2449 summary->set_temp(0, Location::RequiresRegister()); |
| 2450 return summary; | 2450 return summary; |
| 2451 } | 2451 } |
| 2452 | 2452 |
| 2453 | 2453 |
| 2454 class CheckStackOverflowSlowPath : public SlowPathCode { | 2454 class CheckStackOverflowSlowPath : public SlowPathCode { |
| 2455 public: | 2455 public: |
| 2456 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) | 2456 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2663 if (FLAG_throw_on_javascript_int_overflow) { | 2663 if (FLAG_throw_on_javascript_int_overflow) { |
| 2664 EmitJavascriptOverflowCheck(compiler, shift_left->range(), deopt, result); | 2664 EmitJavascriptOverflowCheck(compiler, shift_left->range(), deopt, result); |
| 2665 } | 2665 } |
| 2666 } | 2666 } |
| 2667 | 2667 |
| 2668 | 2668 |
| 2669 LocationSummary* BinarySmiOpInstr::MakeLocationSummary(bool opt) const { | 2669 LocationSummary* BinarySmiOpInstr::MakeLocationSummary(bool opt) const { |
| 2670 const intptr_t kNumInputs = 2; | 2670 const intptr_t kNumInputs = 2; |
| 2671 const intptr_t kNumTemps = 0; | 2671 const intptr_t kNumTemps = 0; |
| 2672 LocationSummary* summary = | 2672 LocationSummary* summary = |
| 2673 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 2673 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 2674 if (op_kind() == Token::kTRUNCDIV) { | 2674 if (op_kind() == Token::kTRUNCDIV) { |
| 2675 summary->set_in(0, Location::RequiresRegister()); | 2675 summary->set_in(0, Location::RequiresRegister()); |
| 2676 if (RightIsPowerOfTwoConstant()) { | 2676 if (RightIsPowerOfTwoConstant()) { |
| 2677 ConstantInstr* right_constant = right()->definition()->AsConstant(); | 2677 ConstantInstr* right_constant = right()->definition()->AsConstant(); |
| 2678 summary->set_in(1, Location::Constant(right_constant->value())); | 2678 summary->set_in(1, Location::Constant(right_constant->value())); |
| 2679 } else { | 2679 } else { |
| 2680 summary->set_in(1, Location::RequiresRegister()); | 2680 summary->set_in(1, Location::RequiresRegister()); |
| 2681 } | 2681 } |
| 2682 summary->set_out(0, Location::RequiresRegister()); | 2682 summary->set_out(0, Location::RequiresRegister()); |
| 2683 return summary; | 2683 return summary; |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2988 } | 2988 } |
| 2989 | 2989 |
| 2990 | 2990 |
| 2991 LocationSummary* CheckEitherNonSmiInstr::MakeLocationSummary(bool opt) const { | 2991 LocationSummary* CheckEitherNonSmiInstr::MakeLocationSummary(bool opt) const { |
| 2992 intptr_t left_cid = left()->Type()->ToCid(); | 2992 intptr_t left_cid = left()->Type()->ToCid(); |
| 2993 intptr_t right_cid = right()->Type()->ToCid(); | 2993 intptr_t right_cid = right()->Type()->ToCid(); |
| 2994 ASSERT((left_cid != kDoubleCid) && (right_cid != kDoubleCid)); | 2994 ASSERT((left_cid != kDoubleCid) && (right_cid != kDoubleCid)); |
| 2995 const intptr_t kNumInputs = 2; | 2995 const intptr_t kNumInputs = 2; |
| 2996 const intptr_t kNumTemps = 0; | 2996 const intptr_t kNumTemps = 0; |
| 2997 LocationSummary* summary = | 2997 LocationSummary* summary = |
| 2998 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 2998 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSummar
y::kNoCall); |
| 2999 summary->set_in(0, Location::RequiresRegister()); | 2999 summary->set_in(0, Location::RequiresRegister()); |
| 3000 summary->set_in(1, Location::RequiresRegister()); | 3000 summary->set_in(1, Location::RequiresRegister()); |
| 3001 return summary; | 3001 return summary; |
| 3002 } | 3002 } |
| 3003 | 3003 |
| 3004 | 3004 |
| 3005 void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3005 void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3006 Label* deopt = compiler->AddDeoptStub(deopt_id(), | 3006 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
| 3007 ICData::kDeoptBinaryDoubleOp); | 3007 ICData::kDeoptBinaryDoubleOp); |
| 3008 intptr_t left_cid = left()->Type()->ToCid(); | 3008 intptr_t left_cid = left()->Type()->ToCid(); |
| 3009 intptr_t right_cid = right()->Type()->ToCid(); | 3009 intptr_t right_cid = right()->Type()->ToCid(); |
| 3010 const Register left = locs()->in(0).reg(); | 3010 const Register left = locs()->in(0).reg(); |
| 3011 const Register right = locs()->in(1).reg(); | 3011 const Register right = locs()->in(1).reg(); |
| 3012 if (left_cid == kSmiCid) { | 3012 if (left_cid == kSmiCid) { |
| 3013 __ tsti(right, kSmiTagMask); | 3013 __ tsti(right, kSmiTagMask); |
| 3014 } else if (right_cid == kSmiCid) { | 3014 } else if (right_cid == kSmiCid) { |
| 3015 __ tsti(left, kSmiTagMask); | 3015 __ tsti(left, kSmiTagMask); |
| 3016 } else { | 3016 } else { |
| 3017 __ orr(TMP, left, Operand(right)); | 3017 __ orr(TMP, left, Operand(right)); |
| 3018 __ tsti(TMP, kSmiTagMask); | 3018 __ tsti(TMP, kSmiTagMask); |
| 3019 } | 3019 } |
| 3020 __ b(deopt, EQ); | 3020 __ b(deopt, EQ); |
| 3021 } | 3021 } |
| 3022 | 3022 |
| 3023 | 3023 |
| 3024 LocationSummary* BoxDoubleInstr::MakeLocationSummary(bool opt) const { | 3024 LocationSummary* BoxDoubleInstr::MakeLocationSummary(bool opt) const { |
| 3025 const intptr_t kNumInputs = 1; | 3025 const intptr_t kNumInputs = 1; |
| 3026 const intptr_t kNumTemps = 0; | 3026 const intptr_t kNumTemps = 0; |
| 3027 LocationSummary* summary = | 3027 LocationSummary* summary = |
| 3028 new LocationSummary(kNumInputs, | 3028 new (isolate) LocationSummary(isolate, kNumInputs, |
| 3029 kNumTemps, | 3029 kNumTemps, |
| 3030 LocationSummary::kCallOnSlowPath); | 3030 LocationSummary::kCallOnSlowPath); |
| 3031 summary->set_in(0, Location::RequiresFpuRegister()); | 3031 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3032 summary->set_out(0, Location::RequiresRegister()); | 3032 summary->set_out(0, Location::RequiresRegister()); |
| 3033 return summary; | 3033 return summary; |
| 3034 } | 3034 } |
| 3035 | 3035 |
| 3036 | 3036 |
| 3037 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3037 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3038 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); | 3038 BoxDoubleSlowPath* slow_path = new BoxDoubleSlowPath(this); |
| 3039 compiler->AddSlowPathCode(slow_path); | 3039 compiler->AddSlowPathCode(slow_path); |
| 3040 | 3040 |
| 3041 const Register out_reg = locs()->out(0).reg(); | 3041 const Register out_reg = locs()->out(0).reg(); |
| 3042 const VRegister value = locs()->in(0).fpu_reg(); | 3042 const VRegister value = locs()->in(0).fpu_reg(); |
| 3043 | 3043 |
| 3044 __ TryAllocate(compiler->double_class(), | 3044 __ TryAllocate(compiler->double_class(), |
| 3045 slow_path->entry_label(), | 3045 slow_path->entry_label(), |
| 3046 out_reg, | 3046 out_reg, |
| 3047 PP); | 3047 PP); |
| 3048 __ Bind(slow_path->exit_label()); | 3048 __ Bind(slow_path->exit_label()); |
| 3049 __ StoreDFieldToOffset(value, out_reg, Double::value_offset(), PP); | 3049 __ StoreDFieldToOffset(value, out_reg, Double::value_offset(), PP); |
| 3050 } | 3050 } |
| 3051 | 3051 |
| 3052 | 3052 |
| 3053 LocationSummary* UnboxDoubleInstr::MakeLocationSummary(bool opt) const { | 3053 LocationSummary* UnboxDoubleInstr::MakeLocationSummary(bool opt) const { |
| 3054 const intptr_t kNumInputs = 1; | 3054 const intptr_t kNumInputs = 1; |
| 3055 const intptr_t kNumTemps = 0; | 3055 const intptr_t kNumTemps = 0; |
| 3056 LocationSummary* summary = | 3056 LocationSummary* summary = |
| 3057 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3057 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3058 summary->set_in(0, Location::RequiresRegister()); | 3058 summary->set_in(0, Location::RequiresRegister()); |
| 3059 summary->set_out(0, Location::RequiresFpuRegister()); | 3059 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3060 return summary; | 3060 return summary; |
| 3061 } | 3061 } |
| 3062 | 3062 |
| 3063 | 3063 |
| 3064 void UnboxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3064 void UnboxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3065 CompileType* value_type = value()->Type(); | 3065 CompileType* value_type = value()->Type(); |
| 3066 const intptr_t value_cid = value_type->ToCid(); | 3066 const intptr_t value_cid = value_type->ToCid(); |
| 3067 const Register value = locs()->in(0).reg(); | 3067 const Register value = locs()->in(0).reg(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 3095 __ Bind(&done); | 3095 __ Bind(&done); |
| 3096 } | 3096 } |
| 3097 } | 3097 } |
| 3098 } | 3098 } |
| 3099 | 3099 |
| 3100 | 3100 |
| 3101 LocationSummary* BoxFloat32x4Instr::MakeLocationSummary(bool opt) const { | 3101 LocationSummary* BoxFloat32x4Instr::MakeLocationSummary(bool opt) const { |
| 3102 const intptr_t kNumInputs = 1; | 3102 const intptr_t kNumInputs = 1; |
| 3103 const intptr_t kNumTemps = 0; | 3103 const intptr_t kNumTemps = 0; |
| 3104 LocationSummary* summary = | 3104 LocationSummary* summary = |
| 3105 new LocationSummary(kNumInputs, | 3105 new (isolate) LocationSummary(isolate, kNumInputs, |
| 3106 kNumTemps, | 3106 kNumTemps, |
| 3107 LocationSummary::kCallOnSlowPath); | 3107 LocationSummary::kCallOnSlowPath); |
| 3108 summary->set_in(0, Location::RequiresFpuRegister()); | 3108 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3109 summary->set_out(0, Location::RequiresRegister()); | 3109 summary->set_out(0, Location::RequiresRegister()); |
| 3110 return summary; | 3110 return summary; |
| 3111 } | 3111 } |
| 3112 | 3112 |
| 3113 | 3113 |
| 3114 void BoxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3114 void BoxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3115 BoxFloat32x4SlowPath* slow_path = new BoxFloat32x4SlowPath(this); | 3115 BoxFloat32x4SlowPath* slow_path = new BoxFloat32x4SlowPath(this); |
| 3116 compiler->AddSlowPathCode(slow_path); | 3116 compiler->AddSlowPathCode(slow_path); |
| 3117 | 3117 |
| 3118 const Register out_reg = locs()->out(0).reg(); | 3118 const Register out_reg = locs()->out(0).reg(); |
| 3119 const VRegister value = locs()->in(0).fpu_reg(); | 3119 const VRegister value = locs()->in(0).fpu_reg(); |
| 3120 | 3120 |
| 3121 __ TryAllocate(compiler->float32x4_class(), | 3121 __ TryAllocate(compiler->float32x4_class(), |
| 3122 slow_path->entry_label(), | 3122 slow_path->entry_label(), |
| 3123 out_reg, | 3123 out_reg, |
| 3124 PP); | 3124 PP); |
| 3125 __ Bind(slow_path->exit_label()); | 3125 __ Bind(slow_path->exit_label()); |
| 3126 | 3126 |
| 3127 __ StoreQFieldToOffset(value, out_reg, Float32x4::value_offset(), PP); | 3127 __ StoreQFieldToOffset(value, out_reg, Float32x4::value_offset(), PP); |
| 3128 } | 3128 } |
| 3129 | 3129 |
| 3130 | 3130 |
| 3131 LocationSummary* UnboxFloat32x4Instr::MakeLocationSummary(bool opt) const { | 3131 LocationSummary* UnboxFloat32x4Instr::MakeLocationSummary(bool opt) const { |
| 3132 const intptr_t kNumInputs = 1; | 3132 const intptr_t kNumInputs = 1; |
| 3133 const intptr_t kNumTemps = 0; | 3133 const intptr_t kNumTemps = 0; |
| 3134 LocationSummary* summary = | 3134 LocationSummary* summary = |
| 3135 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3135 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3136 summary->set_in(0, Location::RequiresRegister()); | 3136 summary->set_in(0, Location::RequiresRegister()); |
| 3137 summary->set_out(0, Location::RequiresFpuRegister()); | 3137 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3138 return summary; | 3138 return summary; |
| 3139 } | 3139 } |
| 3140 | 3140 |
| 3141 | 3141 |
| 3142 void UnboxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3142 void UnboxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3143 const intptr_t value_cid = value()->Type()->ToCid(); | 3143 const intptr_t value_cid = value()->Type()->ToCid(); |
| 3144 const Register value = locs()->in(0).reg(); | 3144 const Register value = locs()->in(0).reg(); |
| 3145 const VRegister result = locs()->out(0).fpu_reg(); | 3145 const VRegister result = locs()->out(0).fpu_reg(); |
| 3146 | 3146 |
| 3147 if (value_cid != kFloat32x4Cid) { | 3147 if (value_cid != kFloat32x4Cid) { |
| 3148 Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); | 3148 Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); |
| 3149 __ tsti(value, kSmiTagMask); | 3149 __ tsti(value, kSmiTagMask); |
| 3150 __ b(deopt, EQ); | 3150 __ b(deopt, EQ); |
| 3151 __ CompareClassId(value, kFloat32x4Cid, PP); | 3151 __ CompareClassId(value, kFloat32x4Cid, PP); |
| 3152 __ b(deopt, NE); | 3152 __ b(deopt, NE); |
| 3153 } | 3153 } |
| 3154 | 3154 |
| 3155 __ LoadQFieldFromOffset(result, value, Float32x4::value_offset(), PP); | 3155 __ LoadQFieldFromOffset(result, value, Float32x4::value_offset(), PP); |
| 3156 } | 3156 } |
| 3157 | 3157 |
| 3158 | 3158 |
| 3159 LocationSummary* BoxFloat64x2Instr::MakeLocationSummary(bool opt) const { | 3159 LocationSummary* BoxFloat64x2Instr::MakeLocationSummary(bool opt) const { |
| 3160 const intptr_t kNumInputs = 1; | 3160 const intptr_t kNumInputs = 1; |
| 3161 const intptr_t kNumTemps = 0; | 3161 const intptr_t kNumTemps = 0; |
| 3162 LocationSummary* summary = | 3162 LocationSummary* summary = |
| 3163 new LocationSummary(kNumInputs, | 3163 new (isolate) LocationSummary(isolate, kNumInputs, |
| 3164 kNumTemps, | 3164 kNumTemps, |
| 3165 LocationSummary::kCallOnSlowPath); | 3165 LocationSummary::kCallOnSlowPath); |
| 3166 summary->set_in(0, Location::RequiresFpuRegister()); | 3166 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3167 summary->set_out(0, Location::RequiresRegister()); | 3167 summary->set_out(0, Location::RequiresRegister()); |
| 3168 return summary; | 3168 return summary; |
| 3169 } | 3169 } |
| 3170 | 3170 |
| 3171 | 3171 |
| 3172 void BoxFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3172 void BoxFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3173 BoxFloat64x2SlowPath* slow_path = new BoxFloat64x2SlowPath(this); | 3173 BoxFloat64x2SlowPath* slow_path = new BoxFloat64x2SlowPath(this); |
| 3174 compiler->AddSlowPathCode(slow_path); | 3174 compiler->AddSlowPathCode(slow_path); |
| 3175 | 3175 |
| 3176 const Register out_reg = locs()->out(0).reg(); | 3176 const Register out_reg = locs()->out(0).reg(); |
| 3177 const VRegister value = locs()->in(0).fpu_reg(); | 3177 const VRegister value = locs()->in(0).fpu_reg(); |
| 3178 | 3178 |
| 3179 __ TryAllocate(compiler->float64x2_class(), | 3179 __ TryAllocate(compiler->float64x2_class(), |
| 3180 slow_path->entry_label(), | 3180 slow_path->entry_label(), |
| 3181 out_reg, | 3181 out_reg, |
| 3182 PP); | 3182 PP); |
| 3183 __ Bind(slow_path->exit_label()); | 3183 __ Bind(slow_path->exit_label()); |
| 3184 | 3184 |
| 3185 __ StoreQFieldToOffset(value, out_reg, Float64x2::value_offset(), PP); | 3185 __ StoreQFieldToOffset(value, out_reg, Float64x2::value_offset(), PP); |
| 3186 } | 3186 } |
| 3187 | 3187 |
| 3188 | 3188 |
| 3189 LocationSummary* UnboxFloat64x2Instr::MakeLocationSummary(bool opt) const { | 3189 LocationSummary* UnboxFloat64x2Instr::MakeLocationSummary(bool opt) const { |
| 3190 const intptr_t kNumInputs = 1; | 3190 const intptr_t kNumInputs = 1; |
| 3191 const intptr_t kNumTemps = 0; | 3191 const intptr_t kNumTemps = 0; |
| 3192 LocationSummary* summary = | 3192 LocationSummary* summary = |
| 3193 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3193 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3194 summary->set_in(0, Location::RequiresRegister()); | 3194 summary->set_in(0, Location::RequiresRegister()); |
| 3195 summary->set_out(0, Location::RequiresFpuRegister()); | 3195 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3196 return summary; | 3196 return summary; |
| 3197 } | 3197 } |
| 3198 | 3198 |
| 3199 | 3199 |
| 3200 void UnboxFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3200 void UnboxFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3201 const intptr_t value_cid = value()->Type()->ToCid(); | 3201 const intptr_t value_cid = value()->Type()->ToCid(); |
| 3202 const Register value = locs()->in(0).reg(); | 3202 const Register value = locs()->in(0).reg(); |
| 3203 const VRegister result = locs()->out(0).fpu_reg(); | 3203 const VRegister result = locs()->out(0).fpu_reg(); |
| 3204 | 3204 |
| 3205 if (value_cid != kFloat64x2Cid) { | 3205 if (value_cid != kFloat64x2Cid) { |
| 3206 Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); | 3206 Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); |
| 3207 __ tsti(value, kSmiTagMask); | 3207 __ tsti(value, kSmiTagMask); |
| 3208 __ b(deopt, EQ); | 3208 __ b(deopt, EQ); |
| 3209 __ CompareClassId(value, kFloat64x2Cid, PP); | 3209 __ CompareClassId(value, kFloat64x2Cid, PP); |
| 3210 __ b(deopt, NE); | 3210 __ b(deopt, NE); |
| 3211 } | 3211 } |
| 3212 | 3212 |
| 3213 __ LoadQFieldFromOffset(result, value, Float64x2::value_offset(), PP); | 3213 __ LoadQFieldFromOffset(result, value, Float64x2::value_offset(), PP); |
| 3214 } | 3214 } |
| 3215 | 3215 |
| 3216 | 3216 |
| 3217 LocationSummary* BoxInt32x4Instr::MakeLocationSummary(bool opt) const { | 3217 LocationSummary* BoxInt32x4Instr::MakeLocationSummary(bool opt) const { |
| 3218 const intptr_t kNumInputs = 1; | 3218 const intptr_t kNumInputs = 1; |
| 3219 const intptr_t kNumTemps = 0; | 3219 const intptr_t kNumTemps = 0; |
| 3220 LocationSummary* summary = | 3220 LocationSummary* summary = |
| 3221 new LocationSummary(kNumInputs, | 3221 new (isolate) LocationSummary(isolate, kNumInputs, |
| 3222 kNumTemps, | 3222 kNumTemps, |
| 3223 LocationSummary::kCallOnSlowPath); | 3223 LocationSummary::kCallOnSlowPath); |
| 3224 summary->set_in(0, Location::RequiresFpuRegister()); | 3224 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3225 summary->set_out(0, Location::RequiresRegister()); | 3225 summary->set_out(0, Location::RequiresRegister()); |
| 3226 return summary; | 3226 return summary; |
| 3227 } | 3227 } |
| 3228 | 3228 |
| 3229 | 3229 |
| 3230 class BoxInt32x4SlowPath : public SlowPathCode { | 3230 class BoxInt32x4SlowPath : public SlowPathCode { |
| 3231 public: | 3231 public: |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3273 __ Bind(slow_path->exit_label()); | 3273 __ Bind(slow_path->exit_label()); |
| 3274 | 3274 |
| 3275 __ StoreQFieldToOffset(value, out_reg, Int32x4::value_offset(), PP); | 3275 __ StoreQFieldToOffset(value, out_reg, Int32x4::value_offset(), PP); |
| 3276 } | 3276 } |
| 3277 | 3277 |
| 3278 | 3278 |
| 3279 LocationSummary* UnboxInt32x4Instr::MakeLocationSummary(bool opt) const { | 3279 LocationSummary* UnboxInt32x4Instr::MakeLocationSummary(bool opt) const { |
| 3280 const intptr_t kNumInputs = 1; | 3280 const intptr_t kNumInputs = 1; |
| 3281 const intptr_t kNumTemps = 0; | 3281 const intptr_t kNumTemps = 0; |
| 3282 LocationSummary* summary = | 3282 LocationSummary* summary = |
| 3283 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3283 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3284 summary->set_in(0, Location::RequiresRegister()); | 3284 summary->set_in(0, Location::RequiresRegister()); |
| 3285 summary->set_out(0, Location::RequiresFpuRegister()); | 3285 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3286 return summary; | 3286 return summary; |
| 3287 } | 3287 } |
| 3288 | 3288 |
| 3289 | 3289 |
| 3290 void UnboxInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3290 void UnboxInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3291 const intptr_t value_cid = value()->Type()->ToCid(); | 3291 const intptr_t value_cid = value()->Type()->ToCid(); |
| 3292 const Register value = locs()->in(0).reg(); | 3292 const Register value = locs()->in(0).reg(); |
| 3293 const VRegister result = locs()->out(0).fpu_reg(); | 3293 const VRegister result = locs()->out(0).fpu_reg(); |
| 3294 | 3294 |
| 3295 if (value_cid != kInt32x4Cid) { | 3295 if (value_cid != kInt32x4Cid) { |
| 3296 Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); | 3296 Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); |
| 3297 __ tsti(value, kSmiTagMask); | 3297 __ tsti(value, kSmiTagMask); |
| 3298 __ b(deopt, EQ); | 3298 __ b(deopt, EQ); |
| 3299 __ CompareClassId(value, kInt32x4Cid, PP); | 3299 __ CompareClassId(value, kInt32x4Cid, PP); |
| 3300 __ b(deopt, NE); | 3300 __ b(deopt, NE); |
| 3301 } | 3301 } |
| 3302 | 3302 |
| 3303 __ LoadQFieldFromOffset(result, value, Int32x4::value_offset(), PP); | 3303 __ LoadQFieldFromOffset(result, value, Int32x4::value_offset(), PP); |
| 3304 } | 3304 } |
| 3305 | 3305 |
| 3306 | 3306 |
| 3307 LocationSummary* BinaryDoubleOpInstr::MakeLocationSummary(bool opt) const { | 3307 LocationSummary* BinaryDoubleOpInstr::MakeLocationSummary(bool opt) const { |
| 3308 const intptr_t kNumInputs = 2; | 3308 const intptr_t kNumInputs = 2; |
| 3309 const intptr_t kNumTemps = 0; | 3309 const intptr_t kNumTemps = 0; |
| 3310 LocationSummary* summary = | 3310 LocationSummary* summary = |
| 3311 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3311 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3312 summary->set_in(0, Location::RequiresFpuRegister()); | 3312 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3313 summary->set_in(1, Location::RequiresFpuRegister()); | 3313 summary->set_in(1, Location::RequiresFpuRegister()); |
| 3314 summary->set_out(0, Location::RequiresFpuRegister()); | 3314 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3315 return summary; | 3315 return summary; |
| 3316 } | 3316 } |
| 3317 | 3317 |
| 3318 | 3318 |
| 3319 void BinaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3319 void BinaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3320 const VRegister left = locs()->in(0).fpu_reg(); | 3320 const VRegister left = locs()->in(0).fpu_reg(); |
| 3321 const VRegister right = locs()->in(1).fpu_reg(); | 3321 const VRegister right = locs()->in(1).fpu_reg(); |
| 3322 const VRegister result = locs()->out(0).fpu_reg(); | 3322 const VRegister result = locs()->out(0).fpu_reg(); |
| 3323 switch (op_kind()) { | 3323 switch (op_kind()) { |
| 3324 case Token::kADD: __ faddd(result, left, right); break; | 3324 case Token::kADD: __ faddd(result, left, right); break; |
| 3325 case Token::kSUB: __ fsubd(result, left, right); break; | 3325 case Token::kSUB: __ fsubd(result, left, right); break; |
| 3326 case Token::kMUL: __ fmuld(result, left, right); break; | 3326 case Token::kMUL: __ fmuld(result, left, right); break; |
| 3327 case Token::kDIV: __ fdivd(result, left, right); break; | 3327 case Token::kDIV: __ fdivd(result, left, right); break; |
| 3328 default: UNREACHABLE(); | 3328 default: UNREACHABLE(); |
| 3329 } | 3329 } |
| 3330 } | 3330 } |
| 3331 | 3331 |
| 3332 | 3332 |
| 3333 LocationSummary* BinaryFloat32x4OpInstr::MakeLocationSummary(bool opt) const { | 3333 LocationSummary* BinaryFloat32x4OpInstr::MakeLocationSummary(bool opt) const { |
| 3334 const intptr_t kNumInputs = 2; | 3334 const intptr_t kNumInputs = 2; |
| 3335 const intptr_t kNumTemps = 0; | 3335 const intptr_t kNumTemps = 0; |
| 3336 LocationSummary* summary = | 3336 LocationSummary* summary = |
| 3337 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3337 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3338 summary->set_in(0, Location::RequiresFpuRegister()); | 3338 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3339 summary->set_in(1, Location::RequiresFpuRegister()); | 3339 summary->set_in(1, Location::RequiresFpuRegister()); |
| 3340 summary->set_out(0, Location::RequiresFpuRegister()); | 3340 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3341 return summary; | 3341 return summary; |
| 3342 } | 3342 } |
| 3343 | 3343 |
| 3344 | 3344 |
| 3345 void BinaryFloat32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3345 void BinaryFloat32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3346 const VRegister left = locs()->in(0).fpu_reg(); | 3346 const VRegister left = locs()->in(0).fpu_reg(); |
| 3347 const VRegister right = locs()->in(1).fpu_reg(); | 3347 const VRegister right = locs()->in(1).fpu_reg(); |
| 3348 const VRegister result = locs()->out(0).fpu_reg(); | 3348 const VRegister result = locs()->out(0).fpu_reg(); |
| 3349 | 3349 |
| 3350 switch (op_kind()) { | 3350 switch (op_kind()) { |
| 3351 case Token::kADD: __ vadds(result, left, right); break; | 3351 case Token::kADD: __ vadds(result, left, right); break; |
| 3352 case Token::kSUB: __ vsubs(result, left, right); break; | 3352 case Token::kSUB: __ vsubs(result, left, right); break; |
| 3353 case Token::kMUL: __ vmuls(result, left, right); break; | 3353 case Token::kMUL: __ vmuls(result, left, right); break; |
| 3354 case Token::kDIV: __ vdivs(result, left, right); break; | 3354 case Token::kDIV: __ vdivs(result, left, right); break; |
| 3355 default: UNREACHABLE(); | 3355 default: UNREACHABLE(); |
| 3356 } | 3356 } |
| 3357 } | 3357 } |
| 3358 | 3358 |
| 3359 | 3359 |
| 3360 LocationSummary* BinaryFloat64x2OpInstr::MakeLocationSummary(bool opt) const { | 3360 LocationSummary* BinaryFloat64x2OpInstr::MakeLocationSummary(bool opt) const { |
| 3361 const intptr_t kNumInputs = 2; | 3361 const intptr_t kNumInputs = 2; |
| 3362 const intptr_t kNumTemps = 0; | 3362 const intptr_t kNumTemps = 0; |
| 3363 LocationSummary* summary = | 3363 LocationSummary* summary = |
| 3364 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3364 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3365 summary->set_in(0, Location::RequiresFpuRegister()); | 3365 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3366 summary->set_in(1, Location::RequiresFpuRegister()); | 3366 summary->set_in(1, Location::RequiresFpuRegister()); |
| 3367 summary->set_out(0, Location::RequiresFpuRegister()); | 3367 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3368 return summary; | 3368 return summary; |
| 3369 } | 3369 } |
| 3370 | 3370 |
| 3371 | 3371 |
| 3372 void BinaryFloat64x2OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3372 void BinaryFloat64x2OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3373 const VRegister left = locs()->in(0).fpu_reg(); | 3373 const VRegister left = locs()->in(0).fpu_reg(); |
| 3374 const VRegister right = locs()->in(1).fpu_reg(); | 3374 const VRegister right = locs()->in(1).fpu_reg(); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3415 void Simd32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3415 void Simd32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3416 UNIMPLEMENTED(); | 3416 UNIMPLEMENTED(); |
| 3417 } | 3417 } |
| 3418 | 3418 |
| 3419 | 3419 |
| 3420 LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary( | 3420 LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary( |
| 3421 bool opt) const { | 3421 bool opt) const { |
| 3422 const intptr_t kNumInputs = 4; | 3422 const intptr_t kNumInputs = 4; |
| 3423 const intptr_t kNumTemps = 0; | 3423 const intptr_t kNumTemps = 0; |
| 3424 LocationSummary* summary = | 3424 LocationSummary* summary = |
| 3425 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3425 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3426 summary->set_in(0, Location::RequiresFpuRegister()); | 3426 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3427 summary->set_in(1, Location::RequiresFpuRegister()); | 3427 summary->set_in(1, Location::RequiresFpuRegister()); |
| 3428 summary->set_in(2, Location::RequiresFpuRegister()); | 3428 summary->set_in(2, Location::RequiresFpuRegister()); |
| 3429 summary->set_in(3, Location::RequiresFpuRegister()); | 3429 summary->set_in(3, Location::RequiresFpuRegister()); |
| 3430 summary->set_out(0, Location::RequiresFpuRegister()); | 3430 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3431 return summary; | 3431 return summary; |
| 3432 } | 3432 } |
| 3433 | 3433 |
| 3434 | 3434 |
| 3435 void Float32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3435 void Float32x4ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 3447 __ vinss(r, 2, v2, 2); | 3447 __ vinss(r, 2, v2, 2); |
| 3448 __ fcvtsd(v3, v3); | 3448 __ fcvtsd(v3, v3); |
| 3449 __ vinss(r, 3, v3, 3); | 3449 __ vinss(r, 3, v3, 3); |
| 3450 } | 3450 } |
| 3451 | 3451 |
| 3452 | 3452 |
| 3453 LocationSummary* Float32x4ZeroInstr::MakeLocationSummary(bool opt) const { | 3453 LocationSummary* Float32x4ZeroInstr::MakeLocationSummary(bool opt) const { |
| 3454 const intptr_t kNumInputs = 0; | 3454 const intptr_t kNumInputs = 0; |
| 3455 const intptr_t kNumTemps = 0; | 3455 const intptr_t kNumTemps = 0; |
| 3456 LocationSummary* summary = | 3456 LocationSummary* summary = |
| 3457 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3457 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3458 summary->set_out(0, Location::RequiresFpuRegister()); | 3458 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3459 return summary; | 3459 return summary; |
| 3460 } | 3460 } |
| 3461 | 3461 |
| 3462 | 3462 |
| 3463 void Float32x4ZeroInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3463 void Float32x4ZeroInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3464 const VRegister v = locs()->out(0).fpu_reg(); | 3464 const VRegister v = locs()->out(0).fpu_reg(); |
| 3465 __ LoadDImmediate(v, 0.0, PP); | 3465 __ LoadDImmediate(v, 0.0, PP); |
| 3466 } | 3466 } |
| 3467 | 3467 |
| 3468 | 3468 |
| 3469 LocationSummary* Float32x4SplatInstr::MakeLocationSummary(bool opt) const { | 3469 LocationSummary* Float32x4SplatInstr::MakeLocationSummary(bool opt) const { |
| 3470 const intptr_t kNumInputs = 1; | 3470 const intptr_t kNumInputs = 1; |
| 3471 const intptr_t kNumTemps = 0; | 3471 const intptr_t kNumTemps = 0; |
| 3472 LocationSummary* summary = | 3472 LocationSummary* summary = |
| 3473 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3473 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3474 summary->set_in(0, Location::RequiresFpuRegister()); | 3474 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3475 summary->set_out(0, Location::RequiresFpuRegister()); | 3475 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3476 return summary; | 3476 return summary; |
| 3477 } | 3477 } |
| 3478 | 3478 |
| 3479 | 3479 |
| 3480 void Float32x4SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3480 void Float32x4SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3481 const VRegister value = locs()->in(0).fpu_reg(); | 3481 const VRegister value = locs()->in(0).fpu_reg(); |
| 3482 const VRegister result = locs()->out(0).fpu_reg(); | 3482 const VRegister result = locs()->out(0).fpu_reg(); |
| 3483 | 3483 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3519 | 3519 |
| 3520 void Float32x4SqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3520 void Float32x4SqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3521 UNIMPLEMENTED(); | 3521 UNIMPLEMENTED(); |
| 3522 } | 3522 } |
| 3523 | 3523 |
| 3524 | 3524 |
| 3525 LocationSummary* Float32x4ScaleInstr::MakeLocationSummary(bool opt) const { | 3525 LocationSummary* Float32x4ScaleInstr::MakeLocationSummary(bool opt) const { |
| 3526 const intptr_t kNumInputs = 2; | 3526 const intptr_t kNumInputs = 2; |
| 3527 const intptr_t kNumTemps = 0; | 3527 const intptr_t kNumTemps = 0; |
| 3528 LocationSummary* summary = | 3528 LocationSummary* summary = |
| 3529 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3529 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3530 summary->set_in(0, Location::RequiresFpuRegister()); | 3530 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3531 summary->set_in(1, Location::RequiresFpuRegister()); | 3531 summary->set_in(1, Location::RequiresFpuRegister()); |
| 3532 summary->set_out(0, Location::RequiresFpuRegister()); | 3532 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3533 return summary; | 3533 return summary; |
| 3534 } | 3534 } |
| 3535 | 3535 |
| 3536 | 3536 |
| 3537 void Float32x4ScaleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3537 void Float32x4ScaleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3538 const VRegister left = locs()->in(0).fpu_reg(); | 3538 const VRegister left = locs()->in(0).fpu_reg(); |
| 3539 const VRegister right = locs()->in(1).fpu_reg(); | 3539 const VRegister right = locs()->in(1).fpu_reg(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3591 | 3591 |
| 3592 void Float32x4ToInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3592 void Float32x4ToInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3593 UNIMPLEMENTED(); | 3593 UNIMPLEMENTED(); |
| 3594 } | 3594 } |
| 3595 | 3595 |
| 3596 | 3596 |
| 3597 LocationSummary* Simd64x2ShuffleInstr::MakeLocationSummary(bool opt) const { | 3597 LocationSummary* Simd64x2ShuffleInstr::MakeLocationSummary(bool opt) const { |
| 3598 const intptr_t kNumInputs = 1; | 3598 const intptr_t kNumInputs = 1; |
| 3599 const intptr_t kNumTemps = 0; | 3599 const intptr_t kNumTemps = 0; |
| 3600 LocationSummary* summary = | 3600 LocationSummary* summary = |
| 3601 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3601 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3602 summary->set_in(0, Location::RequiresFpuRegister()); | 3602 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3603 summary->set_out(0, Location::RequiresFpuRegister()); | 3603 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3604 return summary; | 3604 return summary; |
| 3605 } | 3605 } |
| 3606 | 3606 |
| 3607 | 3607 |
| 3608 void Simd64x2ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3608 void Simd64x2ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3609 const VRegister value = locs()->in(0).fpu_reg(); | 3609 const VRegister value = locs()->in(0).fpu_reg(); |
| 3610 const VRegister result = locs()->out(0).fpu_reg(); | 3610 const VRegister result = locs()->out(0).fpu_reg(); |
| 3611 | 3611 |
| 3612 switch (op_kind()) { | 3612 switch (op_kind()) { |
| 3613 case MethodRecognizer::kFloat64x2GetX: | 3613 case MethodRecognizer::kFloat64x2GetX: |
| 3614 __ vinsd(result, 0, value, 0); | 3614 __ vinsd(result, 0, value, 0); |
| 3615 break; | 3615 break; |
| 3616 case MethodRecognizer::kFloat64x2GetY: | 3616 case MethodRecognizer::kFloat64x2GetY: |
| 3617 __ vinsd(result, 0, value, 1); | 3617 __ vinsd(result, 0, value, 1); |
| 3618 break; | 3618 break; |
| 3619 default: UNREACHABLE(); | 3619 default: UNREACHABLE(); |
| 3620 } | 3620 } |
| 3621 } | 3621 } |
| 3622 | 3622 |
| 3623 | 3623 |
| 3624 LocationSummary* Float64x2ZeroInstr::MakeLocationSummary(bool opt) const { | 3624 LocationSummary* Float64x2ZeroInstr::MakeLocationSummary(bool opt) const { |
| 3625 const intptr_t kNumInputs = 0; | 3625 const intptr_t kNumInputs = 0; |
| 3626 const intptr_t kNumTemps = 0; | 3626 const intptr_t kNumTemps = 0; |
| 3627 LocationSummary* summary = | 3627 LocationSummary* summary = |
| 3628 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3628 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3629 summary->set_out(0, Location::RequiresFpuRegister()); | 3629 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3630 return summary; | 3630 return summary; |
| 3631 } | 3631 } |
| 3632 | 3632 |
| 3633 | 3633 |
| 3634 void Float64x2ZeroInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3634 void Float64x2ZeroInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3635 const VRegister v = locs()->out(0).fpu_reg(); | 3635 const VRegister v = locs()->out(0).fpu_reg(); |
| 3636 __ LoadDImmediate(v, 0.0, PP); | 3636 __ LoadDImmediate(v, 0.0, PP); |
| 3637 } | 3637 } |
| 3638 | 3638 |
| 3639 | 3639 |
| 3640 LocationSummary* Float64x2SplatInstr::MakeLocationSummary(bool opt) const { | 3640 LocationSummary* Float64x2SplatInstr::MakeLocationSummary(bool opt) const { |
| 3641 const intptr_t kNumInputs = 1; | 3641 const intptr_t kNumInputs = 1; |
| 3642 const intptr_t kNumTemps = 0; | 3642 const intptr_t kNumTemps = 0; |
| 3643 LocationSummary* summary = | 3643 LocationSummary* summary = |
| 3644 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3644 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3645 summary->set_in(0, Location::RequiresFpuRegister()); | 3645 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3646 summary->set_out(0, Location::RequiresFpuRegister()); | 3646 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3647 return summary; | 3647 return summary; |
| 3648 } | 3648 } |
| 3649 | 3649 |
| 3650 | 3650 |
| 3651 void Float64x2SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3651 void Float64x2SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3652 const VRegister value = locs()->in(0).fpu_reg(); | 3652 const VRegister value = locs()->in(0).fpu_reg(); |
| 3653 const VRegister result = locs()->out(0).fpu_reg(); | 3653 const VRegister result = locs()->out(0).fpu_reg(); |
| 3654 __ vdupd(result, value, 0); | 3654 __ vdupd(result, value, 0); |
| 3655 } | 3655 } |
| 3656 | 3656 |
| 3657 | 3657 |
| 3658 LocationSummary* Float64x2ConstructorInstr::MakeLocationSummary( | 3658 LocationSummary* Float64x2ConstructorInstr::MakeLocationSummary( |
| 3659 bool opt) const { | 3659 bool opt) const { |
| 3660 const intptr_t kNumInputs = 2; | 3660 const intptr_t kNumInputs = 2; |
| 3661 const intptr_t kNumTemps = 0; | 3661 const intptr_t kNumTemps = 0; |
| 3662 LocationSummary* summary = | 3662 LocationSummary* summary = |
| 3663 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3663 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3664 summary->set_in(0, Location::RequiresFpuRegister()); | 3664 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3665 summary->set_in(1, Location::RequiresFpuRegister()); | 3665 summary->set_in(1, Location::RequiresFpuRegister()); |
| 3666 summary->set_out(0, Location::RequiresFpuRegister()); | 3666 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3667 return summary; | 3667 return summary; |
| 3668 } | 3668 } |
| 3669 | 3669 |
| 3670 | 3670 |
| 3671 void Float64x2ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3671 void Float64x2ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3672 const VRegister v0 = locs()->in(0).fpu_reg(); | 3672 const VRegister v0 = locs()->in(0).fpu_reg(); |
| 3673 const VRegister v1 = locs()->in(1).fpu_reg(); | 3673 const VRegister v1 = locs()->in(1).fpu_reg(); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3788 void BinaryInt32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3788 void BinaryInt32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3789 UNIMPLEMENTED(); | 3789 UNIMPLEMENTED(); |
| 3790 } | 3790 } |
| 3791 | 3791 |
| 3792 | 3792 |
| 3793 LocationSummary* MathUnaryInstr::MakeLocationSummary(bool opt) const { | 3793 LocationSummary* MathUnaryInstr::MakeLocationSummary(bool opt) const { |
| 3794 if ((kind() == MathUnaryInstr::kSin) || (kind() == MathUnaryInstr::kCos)) { | 3794 if ((kind() == MathUnaryInstr::kSin) || (kind() == MathUnaryInstr::kCos)) { |
| 3795 const intptr_t kNumInputs = 1; | 3795 const intptr_t kNumInputs = 1; |
| 3796 const intptr_t kNumTemps = 0; | 3796 const intptr_t kNumTemps = 0; |
| 3797 LocationSummary* summary = | 3797 LocationSummary* summary = |
| 3798 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 3798 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kCall); |
| 3799 summary->set_in(0, Location::FpuRegisterLocation(V0)); | 3799 summary->set_in(0, Location::FpuRegisterLocation(V0)); |
| 3800 summary->set_out(0, Location::FpuRegisterLocation(V0)); | 3800 summary->set_out(0, Location::FpuRegisterLocation(V0)); |
| 3801 return summary; | 3801 return summary; |
| 3802 } | 3802 } |
| 3803 ASSERT((kind() == MathUnaryInstr::kSqrt) || | 3803 ASSERT((kind() == MathUnaryInstr::kSqrt) || |
| 3804 (kind() == MathUnaryInstr::kDoubleSquare)); | 3804 (kind() == MathUnaryInstr::kDoubleSquare)); |
| 3805 const intptr_t kNumInputs = 1; | 3805 const intptr_t kNumInputs = 1; |
| 3806 const intptr_t kNumTemps = 0; | 3806 const intptr_t kNumTemps = 0; |
| 3807 LocationSummary* summary = | 3807 LocationSummary* summary = |
| 3808 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3808 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3809 summary->set_in(0, Location::RequiresFpuRegister()); | 3809 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3810 summary->set_out(0, Location::RequiresFpuRegister()); | 3810 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3811 return summary; | 3811 return summary; |
| 3812 } | 3812 } |
| 3813 | 3813 |
| 3814 | 3814 |
| 3815 void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3815 void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3816 if (kind() == MathUnaryInstr::kSqrt) { | 3816 if (kind() == MathUnaryInstr::kSqrt) { |
| 3817 const VRegister val = locs()->in(0).fpu_reg(); | 3817 const VRegister val = locs()->in(0).fpu_reg(); |
| 3818 const VRegister result = locs()->out(0).fpu_reg(); | 3818 const VRegister result = locs()->out(0).fpu_reg(); |
| 3819 __ fsqrtd(result, val); | 3819 __ fsqrtd(result, val); |
| 3820 } else if (kind() == MathUnaryInstr::kDoubleSquare) { | 3820 } else if (kind() == MathUnaryInstr::kDoubleSquare) { |
| 3821 const VRegister val = locs()->in(0).fpu_reg(); | 3821 const VRegister val = locs()->in(0).fpu_reg(); |
| 3822 const VRegister result = locs()->out(0).fpu_reg(); | 3822 const VRegister result = locs()->out(0).fpu_reg(); |
| 3823 __ fmuld(result, val, val); | 3823 __ fmuld(result, val, val); |
| 3824 } else { | 3824 } else { |
| 3825 ASSERT((kind() == MathUnaryInstr::kSin) || | 3825 ASSERT((kind() == MathUnaryInstr::kSin) || |
| 3826 (kind() == MathUnaryInstr::kCos)); | 3826 (kind() == MathUnaryInstr::kCos)); |
| 3827 __ CallRuntime(TargetFunction(), InputCount()); | 3827 __ CallRuntime(TargetFunction(), InputCount()); |
| 3828 } | 3828 } |
| 3829 } | 3829 } |
| 3830 | 3830 |
| 3831 | 3831 |
| 3832 LocationSummary* MathMinMaxInstr::MakeLocationSummary(bool opt) const { | 3832 LocationSummary* MathMinMaxInstr::MakeLocationSummary(bool opt) const { |
| 3833 if (result_cid() == kDoubleCid) { | 3833 if (result_cid() == kDoubleCid) { |
| 3834 const intptr_t kNumInputs = 2; | 3834 const intptr_t kNumInputs = 2; |
| 3835 const intptr_t kNumTemps = 0; | 3835 const intptr_t kNumTemps = 0; |
| 3836 LocationSummary* summary = | 3836 LocationSummary* summary = |
| 3837 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3837 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kNoCall); |
| 3838 summary->set_in(0, Location::RequiresFpuRegister()); | 3838 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3839 summary->set_in(1, Location::RequiresFpuRegister()); | 3839 summary->set_in(1, Location::RequiresFpuRegister()); |
| 3840 // Reuse the left register so that code can be made shorter. | 3840 // Reuse the left register so that code can be made shorter. |
| 3841 summary->set_out(0, Location::SameAsFirstInput()); | 3841 summary->set_out(0, Location::SameAsFirstInput()); |
| 3842 return summary; | 3842 return summary; |
| 3843 } | 3843 } |
| 3844 ASSERT(result_cid() == kSmiCid); | 3844 ASSERT(result_cid() == kSmiCid); |
| 3845 const intptr_t kNumInputs = 2; | 3845 const intptr_t kNumInputs = 2; |
| 3846 const intptr_t kNumTemps = 0; | 3846 const intptr_t kNumTemps = 0; |
| 3847 LocationSummary* summary = | 3847 LocationSummary* summary = |
| 3848 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3848 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3849 summary->set_in(0, Location::RequiresRegister()); | 3849 summary->set_in(0, Location::RequiresRegister()); |
| 3850 summary->set_in(1, Location::RequiresRegister()); | 3850 summary->set_in(1, Location::RequiresRegister()); |
| 3851 // Reuse the left register so that code can be made shorter. | 3851 // Reuse the left register so that code can be made shorter. |
| 3852 summary->set_out(0, Location::SameAsFirstInput()); | 3852 summary->set_out(0, Location::SameAsFirstInput()); |
| 3853 return summary; | 3853 return summary; |
| 3854 } | 3854 } |
| 3855 | 3855 |
| 3856 | 3856 |
| 3857 void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3857 void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3858 ASSERT((op_kind() == MethodRecognizer::kMathMin) || | 3858 ASSERT((op_kind() == MethodRecognizer::kMathMin) || |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3911 } else { | 3911 } else { |
| 3912 __ csel(result, right, left, LT); | 3912 __ csel(result, right, left, LT); |
| 3913 } | 3913 } |
| 3914 } | 3914 } |
| 3915 | 3915 |
| 3916 | 3916 |
| 3917 LocationSummary* UnarySmiOpInstr::MakeLocationSummary(bool opt) const { | 3917 LocationSummary* UnarySmiOpInstr::MakeLocationSummary(bool opt) const { |
| 3918 const intptr_t kNumInputs = 1; | 3918 const intptr_t kNumInputs = 1; |
| 3919 const intptr_t kNumTemps = 0; | 3919 const intptr_t kNumTemps = 0; |
| 3920 LocationSummary* summary = | 3920 LocationSummary* summary = |
| 3921 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3921 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3922 summary->set_in(0, Location::RequiresRegister()); | 3922 summary->set_in(0, Location::RequiresRegister()); |
| 3923 // We make use of 3-operand instructions by not requiring result register | 3923 // We make use of 3-operand instructions by not requiring result register |
| 3924 // to be identical to first input register as on Intel. | 3924 // to be identical to first input register as on Intel. |
| 3925 summary->set_out(0, Location::RequiresRegister()); | 3925 summary->set_out(0, Location::RequiresRegister()); |
| 3926 return summary; | 3926 return summary; |
| 3927 } | 3927 } |
| 3928 | 3928 |
| 3929 | 3929 |
| 3930 void UnarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3930 void UnarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3931 const Register value = locs()->in(0).reg(); | 3931 const Register value = locs()->in(0).reg(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 3948 default: | 3948 default: |
| 3949 UNREACHABLE(); | 3949 UNREACHABLE(); |
| 3950 } | 3950 } |
| 3951 } | 3951 } |
| 3952 | 3952 |
| 3953 | 3953 |
| 3954 LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary(bool opt) const { | 3954 LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary(bool opt) const { |
| 3955 const intptr_t kNumInputs = 1; | 3955 const intptr_t kNumInputs = 1; |
| 3956 const intptr_t kNumTemps = 0; | 3956 const intptr_t kNumTemps = 0; |
| 3957 LocationSummary* summary = | 3957 LocationSummary* summary = |
| 3958 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3958 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3959 summary->set_in(0, Location::RequiresFpuRegister()); | 3959 summary->set_in(0, Location::RequiresFpuRegister()); |
| 3960 summary->set_out(0, Location::RequiresFpuRegister()); | 3960 summary->set_out(0, Location::RequiresFpuRegister()); |
| 3961 return summary; | 3961 return summary; |
| 3962 } | 3962 } |
| 3963 | 3963 |
| 3964 | 3964 |
| 3965 void UnaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3965 void UnaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3966 const VRegister result = locs()->out(0).fpu_reg(); | 3966 const VRegister result = locs()->out(0).fpu_reg(); |
| 3967 const VRegister value = locs()->in(0).fpu_reg(); | 3967 const VRegister value = locs()->in(0).fpu_reg(); |
| 3968 __ fnegd(result, value); | 3968 __ fnegd(result, value); |
| 3969 } | 3969 } |
| 3970 | 3970 |
| 3971 | 3971 |
| 3972 LocationSummary* SmiToDoubleInstr::MakeLocationSummary(bool opt) const { | 3972 LocationSummary* SmiToDoubleInstr::MakeLocationSummary(bool opt) const { |
| 3973 const intptr_t kNumInputs = 1; | 3973 const intptr_t kNumInputs = 1; |
| 3974 const intptr_t kNumTemps = 0; | 3974 const intptr_t kNumTemps = 0; |
| 3975 LocationSummary* result = | 3975 LocationSummary* result = |
| 3976 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3976 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 3977 result->set_in(0, Location::WritableRegister()); | 3977 result->set_in(0, Location::WritableRegister()); |
| 3978 result->set_out(0, Location::RequiresFpuRegister()); | 3978 result->set_out(0, Location::RequiresFpuRegister()); |
| 3979 return result; | 3979 return result; |
| 3980 } | 3980 } |
| 3981 | 3981 |
| 3982 | 3982 |
| 3983 void SmiToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3983 void SmiToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 3984 const Register value = locs()->in(0).reg(); | 3984 const Register value = locs()->in(0).reg(); |
| 3985 const VRegister result = locs()->out(0).fpu_reg(); | 3985 const VRegister result = locs()->out(0).fpu_reg(); |
| 3986 __ SmiUntag(value); | 3986 __ SmiUntag(value); |
| 3987 __ scvtfd(result, value); | 3987 __ scvtfd(result, value); |
| 3988 } | 3988 } |
| 3989 | 3989 |
| 3990 | 3990 |
| 3991 LocationSummary* DoubleToIntegerInstr::MakeLocationSummary(bool opt) const { | 3991 LocationSummary* DoubleToIntegerInstr::MakeLocationSummary(bool opt) const { |
| 3992 const intptr_t kNumInputs = 1; | 3992 const intptr_t kNumInputs = 1; |
| 3993 const intptr_t kNumTemps = 0; | 3993 const intptr_t kNumTemps = 0; |
| 3994 LocationSummary* result = | 3994 LocationSummary* result = |
| 3995 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 3995 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
| 3996 result->set_in(0, Location::RegisterLocation(R1)); | 3996 result->set_in(0, Location::RegisterLocation(R1)); |
| 3997 result->set_out(0, Location::RegisterLocation(R0)); | 3997 result->set_out(0, Location::RegisterLocation(R0)); |
| 3998 return result; | 3998 return result; |
| 3999 } | 3999 } |
| 4000 | 4000 |
| 4001 | 4001 |
| 4002 void DoubleToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4002 void DoubleToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4003 const Register result = locs()->out(0).reg(); | 4003 const Register result = locs()->out(0).reg(); |
| 4004 const Register value_obj = locs()->in(0).reg(); | 4004 const Register value_obj = locs()->in(0).reg(); |
| 4005 ASSERT(result == R0); | 4005 ASSERT(result == R0); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4037 kNumberOfArguments, | 4037 kNumberOfArguments, |
| 4038 Object::null_array(), // No argument names., | 4038 Object::null_array(), // No argument names., |
| 4039 locs()); | 4039 locs()); |
| 4040 __ Bind(&done); | 4040 __ Bind(&done); |
| 4041 } | 4041 } |
| 4042 | 4042 |
| 4043 | 4043 |
| 4044 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(bool opt) const { | 4044 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(bool opt) const { |
| 4045 const intptr_t kNumInputs = 1; | 4045 const intptr_t kNumInputs = 1; |
| 4046 const intptr_t kNumTemps = 0; | 4046 const intptr_t kNumTemps = 0; |
| 4047 LocationSummary* result = new LocationSummary( | 4047 LocationSummary* result = new (isolate) LocationSummary(isolate, |
| 4048 kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4048 kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 4049 result->set_in(0, Location::RequiresFpuRegister()); | 4049 result->set_in(0, Location::RequiresFpuRegister()); |
| 4050 result->set_out(0, Location::RequiresRegister()); | 4050 result->set_out(0, Location::RequiresRegister()); |
| 4051 return result; | 4051 return result; |
| 4052 } | 4052 } |
| 4053 | 4053 |
| 4054 | 4054 |
| 4055 void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4055 void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4056 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptDoubleToSmi); | 4056 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptDoubleToSmi); |
| 4057 const Register result = locs()->out(0).reg(); | 4057 const Register result = locs()->out(0).reg(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 4081 | 4081 |
| 4082 void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4082 void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4083 UNIMPLEMENTED(); | 4083 UNIMPLEMENTED(); |
| 4084 } | 4084 } |
| 4085 | 4085 |
| 4086 | 4086 |
| 4087 LocationSummary* DoubleToFloatInstr::MakeLocationSummary(bool opt) const { | 4087 LocationSummary* DoubleToFloatInstr::MakeLocationSummary(bool opt) const { |
| 4088 const intptr_t kNumInputs = 1; | 4088 const intptr_t kNumInputs = 1; |
| 4089 const intptr_t kNumTemps = 0; | 4089 const intptr_t kNumTemps = 0; |
| 4090 LocationSummary* result = | 4090 LocationSummary* result = |
| 4091 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4091 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 4092 result->set_in(0, Location::RequiresFpuRegister()); | 4092 result->set_in(0, Location::RequiresFpuRegister()); |
| 4093 result->set_out(0, Location::RequiresFpuRegister()); | 4093 result->set_out(0, Location::RequiresFpuRegister()); |
| 4094 return result; | 4094 return result; |
| 4095 } | 4095 } |
| 4096 | 4096 |
| 4097 | 4097 |
| 4098 void DoubleToFloatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4098 void DoubleToFloatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4099 const VRegister value = locs()->in(0).fpu_reg(); | 4099 const VRegister value = locs()->in(0).fpu_reg(); |
| 4100 const VRegister result = locs()->out(0).fpu_reg(); | 4100 const VRegister result = locs()->out(0).fpu_reg(); |
| 4101 __ fcvtsd(result, value); | 4101 __ fcvtsd(result, value); |
| 4102 } | 4102 } |
| 4103 | 4103 |
| 4104 | 4104 |
| 4105 LocationSummary* FloatToDoubleInstr::MakeLocationSummary(bool opt) const { | 4105 LocationSummary* FloatToDoubleInstr::MakeLocationSummary(bool opt) const { |
| 4106 const intptr_t kNumInputs = 1; | 4106 const intptr_t kNumInputs = 1; |
| 4107 const intptr_t kNumTemps = 0; | 4107 const intptr_t kNumTemps = 0; |
| 4108 LocationSummary* result = | 4108 LocationSummary* result = |
| 4109 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4109 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 4110 result->set_in(0, Location::RequiresFpuRegister()); | 4110 result->set_in(0, Location::RequiresFpuRegister()); |
| 4111 result->set_out(0, Location::RequiresFpuRegister()); | 4111 result->set_out(0, Location::RequiresFpuRegister()); |
| 4112 return result; | 4112 return result; |
| 4113 } | 4113 } |
| 4114 | 4114 |
| 4115 | 4115 |
| 4116 void FloatToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4116 void FloatToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4117 const VRegister value = locs()->in(0).fpu_reg(); | 4117 const VRegister value = locs()->in(0).fpu_reg(); |
| 4118 const VRegister result = locs()->out(0).fpu_reg(); | 4118 const VRegister result = locs()->out(0).fpu_reg(); |
| 4119 __ fcvtds(result, value); | 4119 __ fcvtds(result, value); |
| 4120 } | 4120 } |
| 4121 | 4121 |
| 4122 | 4122 |
| 4123 LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary(bool opt) const { | 4123 LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary(bool opt) const { |
| 4124 ASSERT((InputCount() == 1) || (InputCount() == 2)); | 4124 ASSERT((InputCount() == 1) || (InputCount() == 2)); |
| 4125 const intptr_t kNumTemps = 0; | 4125 const intptr_t kNumTemps = 0; |
| 4126 LocationSummary* result = | 4126 LocationSummary* result = |
| 4127 new LocationSummary(InputCount(), kNumTemps, LocationSummary::kCall); | 4127 new (isolate) LocationSummary(isolate, InputCount(), kNumTemps, LocationSu
mmary::kCall); |
| 4128 result->set_in(0, Location::FpuRegisterLocation(V0)); | 4128 result->set_in(0, Location::FpuRegisterLocation(V0)); |
| 4129 if (InputCount() == 2) { | 4129 if (InputCount() == 2) { |
| 4130 result->set_in(1, Location::FpuRegisterLocation(V1)); | 4130 result->set_in(1, Location::FpuRegisterLocation(V1)); |
| 4131 } | 4131 } |
| 4132 if (recognized_kind() == MethodRecognizer::kMathDoublePow) { | 4132 if (recognized_kind() == MethodRecognizer::kMathDoublePow) { |
| 4133 result->AddTemp(Location::FpuRegisterLocation(V30)); | 4133 result->AddTemp(Location::FpuRegisterLocation(V30)); |
| 4134 } | 4134 } |
| 4135 result->set_out(0, Location::FpuRegisterLocation(V0)); | 4135 result->set_out(0, Location::FpuRegisterLocation(V0)); |
| 4136 return result; | 4136 return result; |
| 4137 } | 4137 } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4257 } | 4257 } |
| 4258 __ CallRuntime(TargetFunction(), InputCount()); | 4258 __ CallRuntime(TargetFunction(), InputCount()); |
| 4259 } | 4259 } |
| 4260 | 4260 |
| 4261 | 4261 |
| 4262 LocationSummary* ExtractNthOutputInstr::MakeLocationSummary(bool opt) const { | 4262 LocationSummary* ExtractNthOutputInstr::MakeLocationSummary(bool opt) const { |
| 4263 // Only use this instruction in optimized code. | 4263 // Only use this instruction in optimized code. |
| 4264 ASSERT(opt); | 4264 ASSERT(opt); |
| 4265 const intptr_t kNumInputs = 1; | 4265 const intptr_t kNumInputs = 1; |
| 4266 LocationSummary* summary = | 4266 LocationSummary* summary = |
| 4267 new LocationSummary(kNumInputs, 0, LocationSummary::kNoCall); | 4267 new (isolate) LocationSummary(isolate, kNumInputs, 0, LocationSummary::kNo
Call); |
| 4268 if (representation() == kUnboxedDouble) { | 4268 if (representation() == kUnboxedDouble) { |
| 4269 if (index() == 0) { | 4269 if (index() == 0) { |
| 4270 summary->set_in(0, Location::Pair(Location::RequiresFpuRegister(), | 4270 summary->set_in(0, Location::Pair(Location::RequiresFpuRegister(), |
| 4271 Location::Any())); | 4271 Location::Any())); |
| 4272 } else { | 4272 } else { |
| 4273 ASSERT(index() == 1); | 4273 ASSERT(index() == 1); |
| 4274 summary->set_in(0, Location::Pair(Location::Any(), | 4274 summary->set_in(0, Location::Pair(Location::Any(), |
| 4275 Location::RequiresFpuRegister())); | 4275 Location::RequiresFpuRegister())); |
| 4276 } | 4276 } |
| 4277 summary->set_out(0, Location::RequiresFpuRegister()); | 4277 summary->set_out(0, Location::RequiresFpuRegister()); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 4306 __ mov(out, in); | 4306 __ mov(out, in); |
| 4307 } | 4307 } |
| 4308 } | 4308 } |
| 4309 | 4309 |
| 4310 | 4310 |
| 4311 LocationSummary* MergedMathInstr::MakeLocationSummary(bool opt) const { | 4311 LocationSummary* MergedMathInstr::MakeLocationSummary(bool opt) const { |
| 4312 if (kind() == MergedMathInstr::kTruncDivMod) { | 4312 if (kind() == MergedMathInstr::kTruncDivMod) { |
| 4313 const intptr_t kNumInputs = 2; | 4313 const intptr_t kNumInputs = 2; |
| 4314 const intptr_t kNumTemps = 0; | 4314 const intptr_t kNumTemps = 0; |
| 4315 LocationSummary* summary = | 4315 LocationSummary* summary = |
| 4316 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4316 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kNoCall); |
| 4317 summary->set_in(0, Location::RequiresRegister()); | 4317 summary->set_in(0, Location::RequiresRegister()); |
| 4318 summary->set_in(1, Location::RequiresRegister()); | 4318 summary->set_in(1, Location::RequiresRegister()); |
| 4319 // Output is a pair of registers. | 4319 // Output is a pair of registers. |
| 4320 summary->set_out(0, Location::Pair(Location::RequiresRegister(), | 4320 summary->set_out(0, Location::Pair(Location::RequiresRegister(), |
| 4321 Location::RequiresRegister())); | 4321 Location::RequiresRegister())); |
| 4322 return summary; | 4322 return summary; |
| 4323 } | 4323 } |
| 4324 UNIMPLEMENTED(); | 4324 UNIMPLEMENTED(); |
| 4325 return NULL; | 4325 return NULL; |
| 4326 } | 4326 } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4442 | 4442 |
| 4443 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4443 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4444 comparison()->EmitBranchCode(compiler, this); | 4444 comparison()->EmitBranchCode(compiler, this); |
| 4445 } | 4445 } |
| 4446 | 4446 |
| 4447 | 4447 |
| 4448 LocationSummary* CheckClassInstr::MakeLocationSummary(bool opt) const { | 4448 LocationSummary* CheckClassInstr::MakeLocationSummary(bool opt) const { |
| 4449 const intptr_t kNumInputs = 1; | 4449 const intptr_t kNumInputs = 1; |
| 4450 const intptr_t kNumTemps = 0; | 4450 const intptr_t kNumTemps = 0; |
| 4451 LocationSummary* summary = | 4451 LocationSummary* summary = |
| 4452 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4452 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 4453 summary->set_in(0, Location::RequiresRegister()); | 4453 summary->set_in(0, Location::RequiresRegister()); |
| 4454 if (!IsNullCheck()) { | 4454 if (!IsNullCheck()) { |
| 4455 summary->AddTemp(Location::RequiresRegister()); | 4455 summary->AddTemp(Location::RequiresRegister()); |
| 4456 } | 4456 } |
| 4457 return summary; | 4457 return summary; |
| 4458 } | 4458 } |
| 4459 | 4459 |
| 4460 | 4460 |
| 4461 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4461 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4462 const ICData::DeoptReasonId deopt_reason = licm_hoisted_ ? | 4462 const ICData::DeoptReasonId deopt_reason = licm_hoisted_ ? |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4495 } | 4495 } |
| 4496 } | 4496 } |
| 4497 __ Bind(&is_ok); | 4497 __ Bind(&is_ok); |
| 4498 } | 4498 } |
| 4499 | 4499 |
| 4500 | 4500 |
| 4501 LocationSummary* CheckSmiInstr::MakeLocationSummary(bool opt) const { | 4501 LocationSummary* CheckSmiInstr::MakeLocationSummary(bool opt) const { |
| 4502 const intptr_t kNumInputs = 1; | 4502 const intptr_t kNumInputs = 1; |
| 4503 const intptr_t kNumTemps = 0; | 4503 const intptr_t kNumTemps = 0; |
| 4504 LocationSummary* summary = | 4504 LocationSummary* summary = |
| 4505 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4505 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 4506 summary->set_in(0, Location::RequiresRegister()); | 4506 summary->set_in(0, Location::RequiresRegister()); |
| 4507 return summary; | 4507 return summary; |
| 4508 } | 4508 } |
| 4509 | 4509 |
| 4510 | 4510 |
| 4511 void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4511 void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4512 const Register value = locs()->in(0).reg(); | 4512 const Register value = locs()->in(0).reg(); |
| 4513 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi); | 4513 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi); |
| 4514 __ tsti(value, kSmiTagMask); | 4514 __ tsti(value, kSmiTagMask); |
| 4515 __ b(deopt, NE); | 4515 __ b(deopt, NE); |
| 4516 } | 4516 } |
| 4517 | 4517 |
| 4518 | 4518 |
| 4519 LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(bool opt) const { | 4519 LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(bool opt) const { |
| 4520 const intptr_t kNumInputs = 2; | 4520 const intptr_t kNumInputs = 2; |
| 4521 const intptr_t kNumTemps = 0; | 4521 const intptr_t kNumTemps = 0; |
| 4522 LocationSummary* locs = | 4522 LocationSummary* locs = |
| 4523 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4523 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 4524 locs->set_in(kLengthPos, Location::RegisterOrSmiConstant(length())); | 4524 locs->set_in(kLengthPos, Location::RegisterOrSmiConstant(length())); |
| 4525 locs->set_in(kIndexPos, Location::RegisterOrSmiConstant(index())); | 4525 locs->set_in(kIndexPos, Location::RegisterOrSmiConstant(index())); |
| 4526 return locs; | 4526 return locs; |
| 4527 } | 4527 } |
| 4528 | 4528 |
| 4529 | 4529 |
| 4530 void CheckArrayBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4530 void CheckArrayBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4531 Label* deopt = compiler->AddDeoptStub(deopt_id(), | 4531 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
| 4532 ICData::kDeoptCheckArrayBound); | 4532 ICData::kDeoptCheckArrayBound); |
| 4533 | 4533 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4619 return NULL; | 4619 return NULL; |
| 4620 } | 4620 } |
| 4621 | 4621 |
| 4622 | 4622 |
| 4623 void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4623 void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4624 UNIMPLEMENTED(); | 4624 UNIMPLEMENTED(); |
| 4625 } | 4625 } |
| 4626 | 4626 |
| 4627 | 4627 |
| 4628 LocationSummary* ThrowInstr::MakeLocationSummary(bool opt) const { | 4628 LocationSummary* ThrowInstr::MakeLocationSummary(bool opt) const { |
| 4629 return new LocationSummary(0, 0, LocationSummary::kCall); | 4629 return new (isolate) LocationSummary(isolate, 0, 0, LocationSummary::kCall); |
| 4630 } | 4630 } |
| 4631 | 4631 |
| 4632 | 4632 |
| 4633 void ThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4633 void ThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4634 compiler->GenerateRuntimeCall(token_pos(), | 4634 compiler->GenerateRuntimeCall(token_pos(), |
| 4635 deopt_id(), | 4635 deopt_id(), |
| 4636 kThrowRuntimeEntry, | 4636 kThrowRuntimeEntry, |
| 4637 1, | 4637 1, |
| 4638 locs()); | 4638 locs()); |
| 4639 __ hlt(0); | 4639 __ hlt(0); |
| 4640 } | 4640 } |
| 4641 | 4641 |
| 4642 | 4642 |
| 4643 LocationSummary* ReThrowInstr::MakeLocationSummary(bool opt) const { | 4643 LocationSummary* ReThrowInstr::MakeLocationSummary(bool opt) const { |
| 4644 return new LocationSummary(0, 0, LocationSummary::kCall); | 4644 return new (isolate) LocationSummary(isolate, 0, 0, LocationSummary::kCall); |
| 4645 } | 4645 } |
| 4646 | 4646 |
| 4647 | 4647 |
| 4648 void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4648 void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4649 compiler->SetNeedsStacktrace(catch_try_index()); | 4649 compiler->SetNeedsStacktrace(catch_try_index()); |
| 4650 compiler->GenerateRuntimeCall(token_pos(), | 4650 compiler->GenerateRuntimeCall(token_pos(), |
| 4651 deopt_id(), | 4651 deopt_id(), |
| 4652 kReThrowRuntimeEntry, | 4652 kReThrowRuntimeEntry, |
| 4653 2, | 4653 2, |
| 4654 locs()); | 4654 locs()); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 4675 deopt_id_, | 4675 deopt_id_, |
| 4676 Scanner::kNoSourcePos); | 4676 Scanner::kNoSourcePos); |
| 4677 } | 4677 } |
| 4678 if (HasParallelMove()) { | 4678 if (HasParallelMove()) { |
| 4679 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); | 4679 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| 4680 } | 4680 } |
| 4681 } | 4681 } |
| 4682 | 4682 |
| 4683 | 4683 |
| 4684 LocationSummary* GotoInstr::MakeLocationSummary(bool opt) const { | 4684 LocationSummary* GotoInstr::MakeLocationSummary(bool opt) const { |
| 4685 return new LocationSummary(0, 0, LocationSummary::kNoCall); | 4685 return new (isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall); |
| 4686 } | 4686 } |
| 4687 | 4687 |
| 4688 | 4688 |
| 4689 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4689 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4690 if (!compiler->is_optimizing()) { | 4690 if (!compiler->is_optimizing()) { |
| 4691 compiler->EmitEdgeCounter(); | 4691 compiler->EmitEdgeCounter(); |
| 4692 // Add a deoptimization descriptor for deoptimizing instructions that | 4692 // Add a deoptimization descriptor for deoptimizing instructions that |
| 4693 // may be inserted before this instruction. On ARM64 this descriptor | 4693 // may be inserted before this instruction. On ARM64 this descriptor |
| 4694 // points after the edge counter code so that we can reuse the same | 4694 // points after the edge counter code so that we can reuse the same |
| 4695 // pattern matching code as at call sites, which matches backwards from | 4695 // pattern matching code as at call sites, which matches backwards from |
| (...skipping 24 matching lines...) Expand all Loading... |
| 4720 void CurrentContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4720 void CurrentContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 4721 __ mov(locs()->out(0).reg(), CTX); | 4721 __ mov(locs()->out(0).reg(), CTX); |
| 4722 } | 4722 } |
| 4723 | 4723 |
| 4724 | 4724 |
| 4725 LocationSummary* StrictCompareInstr::MakeLocationSummary(bool opt) const { | 4725 LocationSummary* StrictCompareInstr::MakeLocationSummary(bool opt) const { |
| 4726 const intptr_t kNumInputs = 2; | 4726 const intptr_t kNumInputs = 2; |
| 4727 const intptr_t kNumTemps = 0; | 4727 const intptr_t kNumTemps = 0; |
| 4728 if (needs_number_check()) { | 4728 if (needs_number_check()) { |
| 4729 LocationSummary* locs = | 4729 LocationSummary* locs = |
| 4730 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 4730 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kCall); |
| 4731 locs->set_in(0, Location::RegisterLocation(R0)); | 4731 locs->set_in(0, Location::RegisterLocation(R0)); |
| 4732 locs->set_in(1, Location::RegisterLocation(R1)); | 4732 locs->set_in(1, Location::RegisterLocation(R1)); |
| 4733 locs->set_out(0, Location::RegisterLocation(R0)); | 4733 locs->set_out(0, Location::RegisterLocation(R0)); |
| 4734 return locs; | 4734 return locs; |
| 4735 } | 4735 } |
| 4736 LocationSummary* locs = | 4736 LocationSummary* locs = |
| 4737 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4737 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
| 4738 locs->set_in(0, Location::RegisterOrConstant(left())); | 4738 locs->set_in(0, Location::RegisterOrConstant(left())); |
| 4739 // Only one of the inputs can be a constant. Choose register if the first one | 4739 // Only one of the inputs can be a constant. Choose register if the first one |
| 4740 // is a constant. | 4740 // is a constant. |
| 4741 locs->set_in(1, locs->in(0).IsConstant() | 4741 locs->set_in(1, locs->in(0).IsConstant() |
| 4742 ? Location::RequiresRegister() | 4742 ? Location::RequiresRegister() |
| 4743 : Location::RegisterOrConstant(right())); | 4743 : Location::RegisterOrConstant(right())); |
| 4744 locs->set_out(0, Location::RequiresRegister()); | 4744 locs->set_out(0, Location::RequiresRegister()); |
| 4745 return locs; | 4745 return locs; |
| 4746 } | 4746 } |
| 4747 | 4747 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4831 compiler->GenerateCall(token_pos(), | 4831 compiler->GenerateCall(token_pos(), |
| 4832 &label, | 4832 &label, |
| 4833 PcDescriptors::kOther, | 4833 PcDescriptors::kOther, |
| 4834 locs()); | 4834 locs()); |
| 4835 __ Drop(ArgumentCount()); // Discard arguments. | 4835 __ Drop(ArgumentCount()); // Discard arguments. |
| 4836 } | 4836 } |
| 4837 | 4837 |
| 4838 } // namespace dart | 4838 } // namespace dart |
| 4839 | 4839 |
| 4840 #endif // defined TARGET_ARCH_ARM64 | 4840 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |