OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 LocationSummary* result = new LocationSummary(0, 0, LocationSummary::kCall); | 32 LocationSummary* result = new LocationSummary(0, 0, LocationSummary::kCall); |
33 result->set_out(0, Location::RegisterLocation(R0)); | 33 result->set_out(0, Location::RegisterLocation(R0)); |
34 return result; | 34 return result; |
35 } | 35 } |
36 | 36 |
37 | 37 |
38 LocationSummary* PushArgumentInstr::MakeLocationSummary(bool opt) const { | 38 LocationSummary* PushArgumentInstr::MakeLocationSummary(bool opt) const { |
39 const intptr_t kNumInputs = 1; | 39 const intptr_t kNumInputs = 1; |
40 const intptr_t kNumTemps= 0; | 40 const intptr_t kNumTemps= 0; |
41 LocationSummary* locs = | 41 LocationSummary* locs = |
42 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 42 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
43 locs->set_in(0, Location::AnyOrConstant(value())); | 43 locs->set_in(0, Location::AnyOrConstant(value())); |
44 return locs; | 44 return locs; |
45 } | 45 } |
46 | 46 |
47 | 47 |
48 void PushArgumentInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 48 void PushArgumentInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
49 // In SSA mode, we need an explicit push. Nothing to do in non-SSA mode | 49 // In SSA mode, we need an explicit push. Nothing to do in non-SSA mode |
50 // where PushArgument is handled by BindInstr::EmitNativeCode. | 50 // where PushArgument is handled by BindInstr::EmitNativeCode. |
51 if (compiler->is_optimizing()) { | 51 if (compiler->is_optimizing()) { |
52 Location value = locs()->in(0); | 52 Location value = locs()->in(0); |
53 if (value.IsRegister()) { | 53 if (value.IsRegister()) { |
54 __ Push(value.reg()); | 54 __ Push(value.reg()); |
55 } else if (value.IsConstant()) { | 55 } else if (value.IsConstant()) { |
56 __ PushObject(value.constant()); | 56 __ PushObject(value.constant()); |
57 } else { | 57 } else { |
58 ASSERT(value.IsStackSlot()); | 58 ASSERT(value.IsStackSlot()); |
59 const intptr_t value_offset = value.ToStackSlotOffset(); | 59 const intptr_t value_offset = value.ToStackSlotOffset(); |
60 __ LoadFromOffset(kWord, IP, FP, value_offset); | 60 __ LoadFromOffset(kWord, IP, FP, value_offset); |
61 __ Push(IP); | 61 __ Push(IP); |
62 } | 62 } |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 | 66 |
67 LocationSummary* ReturnInstr::MakeLocationSummary(bool opt) const { | 67 LocationSummary* ReturnInstr::MakeLocationSummary(bool opt) const { |
68 const intptr_t kNumInputs = 1; | 68 const intptr_t kNumInputs = 1; |
69 const intptr_t kNumTemps = 0; | 69 const intptr_t kNumTemps = 0; |
70 LocationSummary* locs = | 70 LocationSummary* locs = |
71 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 71 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
72 locs->set_in(0, Location::RegisterLocation(R0)); | 72 locs->set_in(0, Location::RegisterLocation(R0)); |
73 return locs; | 73 return locs; |
74 } | 74 } |
75 | 75 |
76 | 76 |
77 // Attempt optimized compilation at return instruction instead of at the entry. | 77 // Attempt optimized compilation at return instruction instead of at the entry. |
78 // The entry needs to be patchable, no inlined objects are allowed in the area | 78 // The entry needs to be patchable, no inlined objects are allowed in the area |
79 // that will be overwritten by the patch instructions: a branch macro sequence. | 79 // that will be overwritten by the patch instructions: a branch macro sequence. |
80 void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 80 void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
81 const Register result = locs()->in(0).reg(); | 81 const Register result = locs()->in(0).reg(); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 __ AddImmediate(result, Smi::RawValue(false_value)); | 179 __ AddImmediate(result, Smi::RawValue(false_value)); |
180 } | 180 } |
181 } | 181 } |
182 } | 182 } |
183 | 183 |
184 | 184 |
185 LocationSummary* ClosureCallInstr::MakeLocationSummary(bool opt) const { | 185 LocationSummary* ClosureCallInstr::MakeLocationSummary(bool opt) const { |
186 const intptr_t kNumInputs = 1; | 186 const intptr_t kNumInputs = 1; |
187 const intptr_t kNumTemps = 0; | 187 const intptr_t kNumTemps = 0; |
188 LocationSummary* summary = | 188 LocationSummary* summary = |
189 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 189 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
190 summary->set_in(0, Location::RegisterLocation(R0)); // Function. | 190 summary->set_in(0, Location::RegisterLocation(R0)); // Function. |
191 summary->set_out(0, Location::RegisterLocation(R0)); | 191 summary->set_out(0, Location::RegisterLocation(R0)); |
192 return summary; | 192 return summary; |
193 } | 193 } |
194 | 194 |
195 | 195 |
196 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 196 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
197 // Load arguments descriptor in R4. | 197 // Load arguments descriptor in R4. |
198 int argument_count = ArgumentCount(); | 198 int argument_count = ArgumentCount(); |
199 const Array& arguments_descriptor = | 199 const Array& arguments_descriptor = |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 const Register result = locs()->out(0).reg(); | 273 const Register result = locs()->out(0).reg(); |
274 __ LoadObject(result, value()); | 274 __ LoadObject(result, value()); |
275 } | 275 } |
276 } | 276 } |
277 | 277 |
278 | 278 |
279 LocationSummary* UnboxedConstantInstr::MakeLocationSummary(bool opt) const { | 279 LocationSummary* UnboxedConstantInstr::MakeLocationSummary(bool opt) const { |
280 const intptr_t kNumInputs = 0; | 280 const intptr_t kNumInputs = 0; |
281 const intptr_t kNumTemps = 1; | 281 const intptr_t kNumTemps = 1; |
282 LocationSummary* locs = | 282 LocationSummary* locs = |
283 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 283 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
284 locs->set_out(0, Location::RequiresFpuRegister()); | 284 locs->set_out(0, Location::RequiresFpuRegister()); |
285 locs->set_temp(0, Location::RequiresRegister()); | 285 locs->set_temp(0, Location::RequiresRegister()); |
286 return locs; | 286 return locs; |
287 } | 287 } |
288 | 288 |
289 | 289 |
290 void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 290 void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
291 // The register allocator drops constant definitions that have no uses. | 291 // The register allocator drops constant definitions that have no uses. |
292 if (!locs()->out(0).IsInvalid()) { | 292 if (!locs()->out(0).IsInvalid()) { |
293 if (Utils::DoublesBitEqual(Double::Cast(value()).value(), 0.0) && | 293 if (Utils::DoublesBitEqual(Double::Cast(value()).value(), 0.0) && |
294 TargetCPUFeatures::neon_supported()) { | 294 TargetCPUFeatures::neon_supported()) { |
295 const QRegister dst = locs()->out(0).fpu_reg(); | 295 const QRegister dst = locs()->out(0).fpu_reg(); |
296 __ veorq(dst, dst, dst); | 296 __ veorq(dst, dst, dst); |
297 } else { | 297 } else { |
298 const DRegister dst = EvenDRegisterOf(locs()->out(0).fpu_reg()); | 298 const DRegister dst = EvenDRegisterOf(locs()->out(0).fpu_reg()); |
299 const Register temp = locs()->temp(0).reg(); | 299 const Register temp = locs()->temp(0).reg(); |
300 __ LoadDImmediate(dst, Double::Cast(value()).value(), temp); | 300 __ LoadDImmediate(dst, Double::Cast(value()).value(), temp); |
301 } | 301 } |
302 } | 302 } |
303 } | 303 } |
304 | 304 |
305 | 305 |
306 LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const { | 306 LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const { |
307 const intptr_t kNumInputs = 3; | 307 const intptr_t kNumInputs = 3; |
308 const intptr_t kNumTemps = 0; | 308 const intptr_t kNumTemps = 0; |
309 LocationSummary* summary = | 309 LocationSummary* summary = |
310 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 310 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
311 summary->set_in(0, Location::RegisterLocation(R0)); // Value. | 311 summary->set_in(0, Location::RegisterLocation(R0)); // Value. |
312 summary->set_in(1, Location::RegisterLocation(R2)); // Instantiator. | 312 summary->set_in(1, Location::RegisterLocation(R2)); // Instantiator. |
313 summary->set_in(2, Location::RegisterLocation(R1)); // Type arguments. | 313 summary->set_in(2, Location::RegisterLocation(R1)); // Type arguments. |
314 summary->set_out(0, Location::RegisterLocation(R0)); | 314 summary->set_out(0, Location::RegisterLocation(R0)); |
315 return summary; | 315 return summary; |
316 } | 316 } |
317 | 317 |
318 | 318 |
319 LocationSummary* AssertBooleanInstr::MakeLocationSummary(bool opt) const { | 319 LocationSummary* AssertBooleanInstr::MakeLocationSummary(bool opt) const { |
320 const intptr_t kNumInputs = 1; | 320 const intptr_t kNumInputs = 1; |
321 const intptr_t kNumTemps = 0; | 321 const intptr_t kNumTemps = 0; |
322 LocationSummary* locs = | 322 LocationSummary* locs = |
323 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 323 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
324 locs->set_in(0, Location::RegisterLocation(R0)); | 324 locs->set_in(0, Location::RegisterLocation(R0)); |
325 locs->set_out(0, Location::RegisterLocation(R0)); | 325 locs->set_out(0, Location::RegisterLocation(R0)); |
326 return locs; | 326 return locs; |
327 } | 327 } |
328 | 328 |
329 | 329 |
330 static void EmitAssertBoolean(Register reg, | 330 static void EmitAssertBoolean(Register reg, |
331 intptr_t token_pos, | 331 intptr_t token_pos, |
332 intptr_t deopt_id, | 332 intptr_t deopt_id, |
333 LocationSummary* locs, | 333 LocationSummary* locs, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 return VS; | 375 return VS; |
376 } | 376 } |
377 } | 377 } |
378 | 378 |
379 | 379 |
380 LocationSummary* EqualityCompareInstr::MakeLocationSummary(bool opt) const { | 380 LocationSummary* EqualityCompareInstr::MakeLocationSummary(bool opt) const { |
381 const intptr_t kNumInputs = 2; | 381 const intptr_t kNumInputs = 2; |
382 if (operation_cid() == kMintCid) { | 382 if (operation_cid() == kMintCid) { |
383 const intptr_t kNumTemps = 0; | 383 const intptr_t kNumTemps = 0; |
384 LocationSummary* locs = | 384 LocationSummary* locs = |
385 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 385 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kNoCall); |
386 locs->set_in(0, Location::Pair(Location::RequiresRegister(), | 386 locs->set_in(0, Location::Pair(Location::RequiresRegister(), |
387 Location::RequiresRegister())); | 387 Location::RequiresRegister())); |
388 locs->set_in(1, Location::Pair(Location::RequiresRegister(), | 388 locs->set_in(1, Location::Pair(Location::RequiresRegister(), |
389 Location::RequiresRegister())); | 389 Location::RequiresRegister())); |
390 locs->set_out(0, Location::RequiresRegister()); | 390 locs->set_out(0, Location::RequiresRegister()); |
391 return locs; | 391 return locs; |
392 } | 392 } |
393 if (operation_cid() == kDoubleCid) { | 393 if (operation_cid() == kDoubleCid) { |
394 const intptr_t kNumTemps = 0; | 394 const intptr_t kNumTemps = 0; |
395 LocationSummary* locs = | 395 LocationSummary* locs = |
396 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 396 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kNoCall); |
397 locs->set_in(0, Location::RequiresFpuRegister()); | 397 locs->set_in(0, Location::RequiresFpuRegister()); |
398 locs->set_in(1, Location::RequiresFpuRegister()); | 398 locs->set_in(1, Location::RequiresFpuRegister()); |
399 locs->set_out(0, Location::RequiresRegister()); | 399 locs->set_out(0, Location::RequiresRegister()); |
400 return locs; | 400 return locs; |
401 } | 401 } |
402 if (operation_cid() == kSmiCid) { | 402 if (operation_cid() == kSmiCid) { |
403 const intptr_t kNumTemps = 0; | 403 const intptr_t kNumTemps = 0; |
404 LocationSummary* locs = | 404 LocationSummary* locs = |
405 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 405 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kNoCall); |
406 locs->set_in(0, Location::RegisterOrConstant(left())); | 406 locs->set_in(0, Location::RegisterOrConstant(left())); |
407 // Only one input can be a constant operand. The case of two constant | 407 // Only one input can be a constant operand. The case of two constant |
408 // operands should be handled by constant propagation. | 408 // operands should be handled by constant propagation. |
409 locs->set_in(1, locs->in(0).IsConstant() | 409 locs->set_in(1, locs->in(0).IsConstant() |
410 ? Location::RequiresRegister() | 410 ? Location::RequiresRegister() |
411 : Location::RegisterOrConstant(right())); | 411 : Location::RegisterOrConstant(right())); |
412 locs->set_out(0, Location::RequiresRegister()); | 412 locs->set_out(0, Location::RequiresRegister()); |
413 return locs; | 413 return locs; |
414 } | 414 } |
415 UNREACHABLE(); | 415 UNREACHABLE(); |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 __ b(nan_result, VS); | 657 __ b(nan_result, VS); |
658 } | 658 } |
659 EmitBranchOnCondition(compiler, true_condition, labels); | 659 EmitBranchOnCondition(compiler, true_condition, labels); |
660 } | 660 } |
661 | 661 |
662 | 662 |
663 LocationSummary* TestSmiInstr::MakeLocationSummary(bool opt) const { | 663 LocationSummary* TestSmiInstr::MakeLocationSummary(bool opt) const { |
664 const intptr_t kNumInputs = 2; | 664 const intptr_t kNumInputs = 2; |
665 const intptr_t kNumTemps = 0; | 665 const intptr_t kNumTemps = 0; |
666 LocationSummary* locs = | 666 LocationSummary* locs = |
667 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 667 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
668 locs->set_in(0, Location::RequiresRegister()); | 668 locs->set_in(0, Location::RequiresRegister()); |
669 // Only one input can be a constant operand. The case of two constant | 669 // Only one input can be a constant operand. The case of two constant |
670 // operands should be handled by constant propagation. | 670 // operands should be handled by constant propagation. |
671 locs->set_in(1, Location::RegisterOrConstant(right())); | 671 locs->set_in(1, Location::RegisterOrConstant(right())); |
672 return locs; | 672 return locs; |
673 } | 673 } |
674 | 674 |
675 | 675 |
676 Condition TestSmiInstr::EmitComparisonCode(FlowGraphCompiler* compiler, | 676 Condition TestSmiInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
677 BranchLabels labels) { | 677 BranchLabels labels) { |
(...skipping 23 matching lines...) Expand all Loading... |
701 BranchLabels labels = compiler->CreateBranchLabels(branch); | 701 BranchLabels labels = compiler->CreateBranchLabels(branch); |
702 Condition true_condition = EmitComparisonCode(compiler, labels); | 702 Condition true_condition = EmitComparisonCode(compiler, labels); |
703 EmitBranchOnCondition(compiler, true_condition, labels); | 703 EmitBranchOnCondition(compiler, true_condition, labels); |
704 } | 704 } |
705 | 705 |
706 | 706 |
707 LocationSummary* TestCidsInstr::MakeLocationSummary(bool opt) const { | 707 LocationSummary* TestCidsInstr::MakeLocationSummary(bool opt) const { |
708 const intptr_t kNumInputs = 1; | 708 const intptr_t kNumInputs = 1; |
709 const intptr_t kNumTemps = 1; | 709 const intptr_t kNumTemps = 1; |
710 LocationSummary* locs = | 710 LocationSummary* locs = |
711 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 711 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
712 locs->set_in(0, Location::RequiresRegister()); | 712 locs->set_in(0, Location::RequiresRegister()); |
713 locs->set_temp(0, Location::RequiresRegister()); | 713 locs->set_temp(0, Location::RequiresRegister()); |
714 locs->set_out(0, Location::RequiresRegister()); | 714 locs->set_out(0, Location::RequiresRegister()); |
715 return locs; | 715 return locs; |
716 } | 716 } |
717 | 717 |
718 | 718 |
719 Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler, | 719 Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler, |
720 BranchLabels labels) { | 720 BranchLabels labels) { |
721 ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT)); | 721 ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT)); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 __ Bind(&done); | 775 __ Bind(&done); |
776 } | 776 } |
777 | 777 |
778 | 778 |
779 LocationSummary* RelationalOpInstr::MakeLocationSummary(bool opt) const { | 779 LocationSummary* RelationalOpInstr::MakeLocationSummary(bool opt) const { |
780 const intptr_t kNumInputs = 2; | 780 const intptr_t kNumInputs = 2; |
781 const intptr_t kNumTemps = 0; | 781 const intptr_t kNumTemps = 0; |
782 if (operation_cid() == kMintCid) { | 782 if (operation_cid() == kMintCid) { |
783 const intptr_t kNumTemps = 1; | 783 const intptr_t kNumTemps = 1; |
784 LocationSummary* locs = | 784 LocationSummary* locs = |
785 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 785 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kNoCall); |
786 locs->set_in(0, Location::Pair(Location::RequiresRegister(), | 786 locs->set_in(0, Location::Pair(Location::RequiresRegister(), |
787 Location::RequiresRegister())); | 787 Location::RequiresRegister())); |
788 locs->set_in(1, Location::Pair(Location::RequiresRegister(), | 788 locs->set_in(1, Location::Pair(Location::RequiresRegister(), |
789 Location::RequiresRegister())); | 789 Location::RequiresRegister())); |
790 locs->set_temp(0, Location::RequiresRegister()); | 790 locs->set_temp(0, Location::RequiresRegister()); |
791 locs->set_out(0, Location::RequiresRegister()); | 791 locs->set_out(0, Location::RequiresRegister()); |
792 return locs; | 792 return locs; |
793 } | 793 } |
794 if (operation_cid() == kDoubleCid) { | 794 if (operation_cid() == kDoubleCid) { |
795 LocationSummary* summary = | 795 LocationSummary* summary = |
796 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 796 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kNoCall); |
797 summary->set_in(0, Location::RequiresFpuRegister()); | 797 summary->set_in(0, Location::RequiresFpuRegister()); |
798 summary->set_in(1, Location::RequiresFpuRegister()); | 798 summary->set_in(1, Location::RequiresFpuRegister()); |
799 summary->set_out(0, Location::RequiresRegister()); | 799 summary->set_out(0, Location::RequiresRegister()); |
800 return summary; | 800 return summary; |
801 } | 801 } |
802 ASSERT(operation_cid() == kSmiCid); | 802 ASSERT(operation_cid() == kSmiCid); |
803 LocationSummary* summary = | 803 LocationSummary* summary = |
804 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 804 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
805 summary->set_in(0, Location::RegisterOrConstant(left())); | 805 summary->set_in(0, Location::RegisterOrConstant(left())); |
806 // Only one input can be a constant operand. The case of two constant | 806 // Only one input can be a constant operand. The case of two constant |
807 // operands should be handled by constant propagation. | 807 // operands should be handled by constant propagation. |
808 summary->set_in(1, summary->in(0).IsConstant() | 808 summary->set_in(1, summary->in(0).IsConstant() |
809 ? Location::RequiresRegister() | 809 ? Location::RequiresRegister() |
810 : Location::RegisterOrConstant(right())); | 810 : Location::RegisterOrConstant(right())); |
811 summary->set_out(0, Location::RequiresRegister()); | 811 summary->set_out(0, Location::RequiresRegister()); |
812 return summary; | 812 return summary; |
813 } | 813 } |
814 | 814 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 __ b(nan_result, VS); | 871 __ b(nan_result, VS); |
872 EmitBranchOnCondition(compiler, true_condition, labels); | 872 EmitBranchOnCondition(compiler, true_condition, labels); |
873 } | 873 } |
874 } | 874 } |
875 | 875 |
876 | 876 |
877 LocationSummary* NativeCallInstr::MakeLocationSummary(bool opt) const { | 877 LocationSummary* NativeCallInstr::MakeLocationSummary(bool opt) const { |
878 const intptr_t kNumInputs = 0; | 878 const intptr_t kNumInputs = 0; |
879 const intptr_t kNumTemps = 3; | 879 const intptr_t kNumTemps = 3; |
880 LocationSummary* locs = | 880 LocationSummary* locs = |
881 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 881 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
882 locs->set_temp(0, Location::RegisterLocation(R1)); | 882 locs->set_temp(0, Location::RegisterLocation(R1)); |
883 locs->set_temp(1, Location::RegisterLocation(R2)); | 883 locs->set_temp(1, Location::RegisterLocation(R2)); |
884 locs->set_temp(2, Location::RegisterLocation(R5)); | 884 locs->set_temp(2, Location::RegisterLocation(R5)); |
885 locs->set_out(0, Location::RegisterLocation(R0)); | 885 locs->set_out(0, Location::RegisterLocation(R0)); |
886 return locs; | 886 return locs; |
887 } | 887 } |
888 | 888 |
889 | 889 |
890 void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 890 void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
891 ASSERT(locs()->temp(0).reg() == R1); | 891 ASSERT(locs()->temp(0).reg() == R1); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 __ LoadImmediate(result, -1, NE); | 971 __ LoadImmediate(result, -1, NE); |
972 __ ldrb(result, FieldAddress(str, OneByteString::data_offset()), EQ); | 972 __ ldrb(result, FieldAddress(str, OneByteString::data_offset()), EQ); |
973 __ SmiTag(result); | 973 __ SmiTag(result); |
974 } | 974 } |
975 | 975 |
976 | 976 |
977 LocationSummary* StringInterpolateInstr::MakeLocationSummary(bool opt) const { | 977 LocationSummary* StringInterpolateInstr::MakeLocationSummary(bool opt) const { |
978 const intptr_t kNumInputs = 1; | 978 const intptr_t kNumInputs = 1; |
979 const intptr_t kNumTemps = 0; | 979 const intptr_t kNumTemps = 0; |
980 LocationSummary* summary = | 980 LocationSummary* summary = |
981 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 981 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
982 summary->set_in(0, Location::RegisterLocation(R0)); | 982 summary->set_in(0, Location::RegisterLocation(R0)); |
983 summary->set_out(0, Location::RegisterLocation(R0)); | 983 summary->set_out(0, Location::RegisterLocation(R0)); |
984 return summary; | 984 return summary; |
985 } | 985 } |
986 | 986 |
987 | 987 |
988 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 988 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
989 const Register array = locs()->in(0).reg(); | 989 const Register array = locs()->in(0).reg(); |
990 __ Push(array); | 990 __ Push(array); |
991 const int kNumberOfArguments = 1; | 991 const int kNumberOfArguments = 1; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 UNREACHABLE(); | 1112 UNREACHABLE(); |
1113 return kTagged; | 1113 return kTagged; |
1114 } | 1114 } |
1115 } | 1115 } |
1116 | 1116 |
1117 | 1117 |
1118 LocationSummary* LoadIndexedInstr::MakeLocationSummary(bool opt) const { | 1118 LocationSummary* LoadIndexedInstr::MakeLocationSummary(bool opt) const { |
1119 const intptr_t kNumInputs = 2; | 1119 const intptr_t kNumInputs = 2; |
1120 const intptr_t kNumTemps = 0; | 1120 const intptr_t kNumTemps = 0; |
1121 LocationSummary* locs = | 1121 LocationSummary* locs = |
1122 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 1122 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
1123 locs->set_in(0, Location::RequiresRegister()); | 1123 locs->set_in(0, Location::RequiresRegister()); |
1124 // The smi index is either untagged (element size == 1), or it is left smi | 1124 // The smi index is either untagged (element size == 1), or it is left smi |
1125 // tagged (for all element sizes > 1). | 1125 // tagged (for all element sizes > 1). |
1126 // TODO(regis): Revisit and see if the index can be immediate. | 1126 // TODO(regis): Revisit and see if the index can be immediate. |
1127 if (index_scale() == 2 && IsExternal()) { | 1127 if (index_scale() == 2 && IsExternal()) { |
1128 locs->set_in(1, Location::RequiresRegister()); | 1128 locs->set_in(1, Location::RequiresRegister()); |
1129 } else { | 1129 } else { |
1130 locs->set_in(1, Location::WritableRegister()); | 1130 locs->set_in(1, Location::WritableRegister()); |
1131 } | 1131 } |
1132 if ((representation() == kUnboxedDouble) || | 1132 if ((representation() == kUnboxedDouble) || |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 UNREACHABLE(); | 1356 UNREACHABLE(); |
1357 return kTagged; | 1357 return kTagged; |
1358 } | 1358 } |
1359 } | 1359 } |
1360 | 1360 |
1361 | 1361 |
1362 LocationSummary* StoreIndexedInstr::MakeLocationSummary(bool opt) const { | 1362 LocationSummary* StoreIndexedInstr::MakeLocationSummary(bool opt) const { |
1363 const intptr_t kNumInputs = 3; | 1363 const intptr_t kNumInputs = 3; |
1364 const intptr_t kNumTemps = 0; | 1364 const intptr_t kNumTemps = 0; |
1365 LocationSummary* locs = | 1365 LocationSummary* locs = |
1366 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 1366 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
1367 locs->set_in(0, Location::RequiresRegister()); | 1367 locs->set_in(0, Location::RequiresRegister()); |
1368 // The smi index is either untagged (element size == 1), or it is left smi | 1368 // The smi index is either untagged (element size == 1), or it is left smi |
1369 // tagged (for all element sizes > 1). | 1369 // tagged (for all element sizes > 1). |
1370 // TODO(regis): Revisit and see if the index can be immediate. | 1370 // TODO(regis): Revisit and see if the index can be immediate. |
1371 locs->set_in(1, Location::WritableRegister()); | 1371 locs->set_in(1, Location::WritableRegister()); |
1372 switch (class_id()) { | 1372 switch (class_id()) { |
1373 case kArrayCid: | 1373 case kArrayCid: |
1374 locs->set_in(2, ShouldEmitStoreBarrier() | 1374 locs->set_in(2, ShouldEmitStoreBarrier() |
1375 ? Location::WritableRegister() | 1375 ? Location::WritableRegister() |
1376 : Location::RegisterOrConstant(value())); | 1376 : Location::RegisterOrConstant(value())); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1589 } | 1589 } |
1590 default: | 1590 default: |
1591 UNREACHABLE(); | 1591 UNREACHABLE(); |
1592 } | 1592 } |
1593 } | 1593 } |
1594 | 1594 |
1595 | 1595 |
1596 LocationSummary* GuardFieldInstr::MakeLocationSummary(bool opt) const { | 1596 LocationSummary* GuardFieldInstr::MakeLocationSummary(bool opt) const { |
1597 const intptr_t kNumInputs = 1; | 1597 const intptr_t kNumInputs = 1; |
1598 LocationSummary* summary = | 1598 LocationSummary* summary = |
1599 new LocationSummary(kNumInputs, 0, LocationSummary::kNoCall); | 1599 new (isolate) LocationSummary(isolate, kNumInputs, 0, LocationSummary::kNo
Call); |
1600 summary->set_in(0, Location::RequiresRegister()); | 1600 summary->set_in(0, Location::RequiresRegister()); |
1601 const bool field_has_length = field().needs_length_check(); | 1601 const bool field_has_length = field().needs_length_check(); |
1602 summary->AddTemp(Location::RequiresRegister()); | 1602 summary->AddTemp(Location::RequiresRegister()); |
1603 summary->AddTemp(Location::RequiresRegister()); | 1603 summary->AddTemp(Location::RequiresRegister()); |
1604 const bool need_field_temp_reg = | 1604 const bool need_field_temp_reg = |
1605 field_has_length || (field().guarded_cid() == kIllegalCid); | 1605 field_has_length || (field().guarded_cid() == kIllegalCid); |
1606 if (need_field_temp_reg) { | 1606 if (need_field_temp_reg) { |
1607 summary->AddTemp(Location::RequiresRegister()); | 1607 summary->AddTemp(Location::RequiresRegister()); |
1608 } | 1608 } |
1609 return summary; | 1609 return summary; |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1944 private: | 1944 private: |
1945 StoreInstanceFieldInstr* instruction_; | 1945 StoreInstanceFieldInstr* instruction_; |
1946 const Class& cls_; | 1946 const Class& cls_; |
1947 }; | 1947 }; |
1948 | 1948 |
1949 | 1949 |
1950 LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary(bool opt) const { | 1950 LocationSummary* StoreInstanceFieldInstr::MakeLocationSummary(bool opt) const { |
1951 const intptr_t kNumInputs = 2; | 1951 const intptr_t kNumInputs = 2; |
1952 const intptr_t kNumTemps = 0; | 1952 const intptr_t kNumTemps = 0; |
1953 LocationSummary* summary = | 1953 LocationSummary* summary = |
1954 new LocationSummary(kNumInputs, kNumTemps, | 1954 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, |
1955 !field().IsNull() && | 1955 !field().IsNull() && |
1956 ((field().guarded_cid() == kIllegalCid) || is_initialization_) | 1956 ((field().guarded_cid() == kIllegalCid) || is_initialization_) |
1957 ? LocationSummary::kCallOnSlowPath | 1957 ? LocationSummary::kCallOnSlowPath |
1958 : LocationSummary::kNoCall); | 1958 : LocationSummary::kNoCall); |
1959 | 1959 |
1960 summary->set_in(0, Location::RequiresRegister()); | 1960 summary->set_in(0, Location::RequiresRegister()); |
1961 if (IsUnboxedStore() && opt) { | 1961 if (IsUnboxedStore() && opt) { |
1962 summary->set_in(1, Location::RequiresFpuRegister()); | 1962 summary->set_in(1, Location::RequiresFpuRegister()); |
1963 summary->AddTemp(Location::RequiresRegister()); | 1963 summary->AddTemp(Location::RequiresRegister()); |
1964 summary->AddTemp(Location::RequiresRegister()); | 1964 summary->AddTemp(Location::RequiresRegister()); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2185 } | 2185 } |
2186 } | 2186 } |
2187 __ Bind(&skip_store); | 2187 __ Bind(&skip_store); |
2188 } | 2188 } |
2189 | 2189 |
2190 | 2190 |
2191 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary(bool opt) const { | 2191 LocationSummary* LoadStaticFieldInstr::MakeLocationSummary(bool opt) const { |
2192 const intptr_t kNumInputs = 1; | 2192 const intptr_t kNumInputs = 1; |
2193 const intptr_t kNumTemps = 0; | 2193 const intptr_t kNumTemps = 0; |
2194 LocationSummary* summary = | 2194 LocationSummary* summary = |
2195 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 2195 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
2196 summary->set_in(0, Location::RequiresRegister()); | 2196 summary->set_in(0, Location::RequiresRegister()); |
2197 summary->set_out(0, Location::RequiresRegister()); | 2197 summary->set_out(0, Location::RequiresRegister()); |
2198 return summary; | 2198 return summary; |
2199 } | 2199 } |
2200 | 2200 |
2201 | 2201 |
2202 // When the parser is building an implicit static getter for optimization, | 2202 // When the parser is building an implicit static getter for optimization, |
2203 // it can generate a function body where deoptimization ids do not line up | 2203 // it can generate a function body where deoptimization ids do not line up |
2204 // with the unoptimized code. | 2204 // with the unoptimized code. |
2205 // | 2205 // |
2206 // This is safe only so long as LoadStaticFieldInstr cannot deoptimize. | 2206 // This is safe only so long as LoadStaticFieldInstr cannot deoptimize. |
2207 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2207 void LoadStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2208 const Register field = locs()->in(0).reg(); | 2208 const Register field = locs()->in(0).reg(); |
2209 const Register result = locs()->out(0).reg(); | 2209 const Register result = locs()->out(0).reg(); |
2210 __ LoadFromOffset(kWord, result, | 2210 __ LoadFromOffset(kWord, result, |
2211 field, Field::value_offset() - kHeapObjectTag); | 2211 field, Field::value_offset() - kHeapObjectTag); |
2212 } | 2212 } |
2213 | 2213 |
2214 | 2214 |
2215 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary(bool opt) const { | 2215 LocationSummary* StoreStaticFieldInstr::MakeLocationSummary(bool opt) const { |
2216 LocationSummary* locs = new LocationSummary(1, 1, LocationSummary::kNoCall); | 2216 LocationSummary* locs = new (isolate) LocationSummary(isolate, 1, 1, LocationS
ummary::kNoCall); |
2217 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() | 2217 locs->set_in(0, value()->NeedsStoreBuffer() ? Location::WritableRegister() |
2218 : Location::RequiresRegister()); | 2218 : Location::RequiresRegister()); |
2219 locs->set_temp(0, Location::RequiresRegister()); | 2219 locs->set_temp(0, Location::RequiresRegister()); |
2220 return locs; | 2220 return locs; |
2221 } | 2221 } |
2222 | 2222 |
2223 | 2223 |
2224 void StoreStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2224 void StoreStaticFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2225 const Register value = locs()->in(0).reg(); | 2225 const Register value = locs()->in(0).reg(); |
2226 const Register temp = locs()->temp(0).reg(); | 2226 const Register temp = locs()->temp(0).reg(); |
2227 | 2227 |
2228 __ LoadObject(temp, field()); | 2228 __ LoadObject(temp, field()); |
2229 if (this->value()->NeedsStoreBuffer()) { | 2229 if (this->value()->NeedsStoreBuffer()) { |
2230 __ StoreIntoObject(temp, | 2230 __ StoreIntoObject(temp, |
2231 FieldAddress(temp, Field::value_offset()), value, CanValueBeSmi()); | 2231 FieldAddress(temp, Field::value_offset()), value, CanValueBeSmi()); |
2232 } else { | 2232 } else { |
2233 __ StoreIntoObjectNoBarrier( | 2233 __ StoreIntoObjectNoBarrier( |
2234 temp, FieldAddress(temp, Field::value_offset()), value); | 2234 temp, FieldAddress(temp, Field::value_offset()), value); |
2235 } | 2235 } |
2236 } | 2236 } |
2237 | 2237 |
2238 | 2238 |
2239 LocationSummary* InstanceOfInstr::MakeLocationSummary(bool opt) const { | 2239 LocationSummary* InstanceOfInstr::MakeLocationSummary(bool opt) const { |
2240 const intptr_t kNumInputs = 3; | 2240 const intptr_t kNumInputs = 3; |
2241 const intptr_t kNumTemps = 0; | 2241 const intptr_t kNumTemps = 0; |
2242 LocationSummary* summary = | 2242 LocationSummary* summary = |
2243 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 2243 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
2244 summary->set_in(0, Location::RegisterLocation(R0)); | 2244 summary->set_in(0, Location::RegisterLocation(R0)); |
2245 summary->set_in(1, Location::RegisterLocation(R2)); | 2245 summary->set_in(1, Location::RegisterLocation(R2)); |
2246 summary->set_in(2, Location::RegisterLocation(R1)); | 2246 summary->set_in(2, Location::RegisterLocation(R1)); |
2247 summary->set_out(0, Location::RegisterLocation(R0)); | 2247 summary->set_out(0, Location::RegisterLocation(R0)); |
2248 return summary; | 2248 return summary; |
2249 } | 2249 } |
2250 | 2250 |
2251 | 2251 |
2252 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2252 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2253 ASSERT(locs()->in(0).reg() == R0); // Value. | 2253 ASSERT(locs()->in(0).reg() == R0); // Value. |
2254 ASSERT(locs()->in(1).reg() == R2); // Instantiator. | 2254 ASSERT(locs()->in(1).reg() == R2); // Instantiator. |
2255 ASSERT(locs()->in(2).reg() == R1); // Instantiator type arguments. | 2255 ASSERT(locs()->in(2).reg() == R1); // Instantiator type arguments. |
2256 | 2256 |
2257 compiler->GenerateInstanceOf(token_pos(), | 2257 compiler->GenerateInstanceOf(token_pos(), |
2258 deopt_id(), | 2258 deopt_id(), |
2259 type(), | 2259 type(), |
2260 negate_result(), | 2260 negate_result(), |
2261 locs()); | 2261 locs()); |
2262 ASSERT(locs()->out(0).reg() == R0); | 2262 ASSERT(locs()->out(0).reg() == R0); |
2263 } | 2263 } |
2264 | 2264 |
2265 | 2265 |
2266 LocationSummary* CreateArrayInstr::MakeLocationSummary(bool opt) const { | 2266 LocationSummary* CreateArrayInstr::MakeLocationSummary(bool opt) const { |
2267 const intptr_t kNumInputs = 2; | 2267 const intptr_t kNumInputs = 2; |
2268 const intptr_t kNumTemps = 0; | 2268 const intptr_t kNumTemps = 0; |
2269 LocationSummary* locs = | 2269 LocationSummary* locs = |
2270 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 2270 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
2271 locs->set_in(kElementTypePos, Location::RegisterLocation(R1)); | 2271 locs->set_in(kElementTypePos, Location::RegisterLocation(R1)); |
2272 locs->set_in(kLengthPos, Location::RegisterLocation(R2)); | 2272 locs->set_in(kLengthPos, Location::RegisterLocation(R2)); |
2273 locs->set_out(0, Location::RegisterLocation(R0)); | 2273 locs->set_out(0, Location::RegisterLocation(R0)); |
2274 return locs; | 2274 return locs; |
2275 } | 2275 } |
2276 | 2276 |
2277 | 2277 |
2278 // Inlines array allocation for known constant values. | 2278 // Inlines array allocation for known constant values. |
2279 static void InlineArrayAllocation(FlowGraphCompiler* compiler, | 2279 static void InlineArrayAllocation(FlowGraphCompiler* compiler, |
2280 intptr_t num_elements, | 2280 intptr_t num_elements, |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2480 | 2480 |
2481 private: | 2481 private: |
2482 Instruction* instruction_; | 2482 Instruction* instruction_; |
2483 }; | 2483 }; |
2484 | 2484 |
2485 | 2485 |
2486 LocationSummary* LoadFieldInstr::MakeLocationSummary(bool opt) const { | 2486 LocationSummary* LoadFieldInstr::MakeLocationSummary(bool opt) const { |
2487 const intptr_t kNumInputs = 1; | 2487 const intptr_t kNumInputs = 1; |
2488 const intptr_t kNumTemps = 0; | 2488 const intptr_t kNumTemps = 0; |
2489 LocationSummary* locs = | 2489 LocationSummary* locs = |
2490 new LocationSummary( | 2490 new (isolate) LocationSummary(isolate, |
2491 kNumInputs, kNumTemps, | 2491 kNumInputs, kNumTemps, |
2492 (opt && !IsPotentialUnboxedLoad()) | 2492 (opt && !IsPotentialUnboxedLoad()) |
2493 ? LocationSummary::kNoCall | 2493 ? LocationSummary::kNoCall |
2494 : LocationSummary::kCallOnSlowPath); | 2494 : LocationSummary::kCallOnSlowPath); |
2495 | 2495 |
2496 locs->set_in(0, Location::RequiresRegister()); | 2496 locs->set_in(0, Location::RequiresRegister()); |
2497 | 2497 |
2498 if (IsUnboxedLoad() && opt) { | 2498 if (IsUnboxedLoad() && opt) { |
2499 locs->AddTemp(Location::RequiresRegister()); | 2499 locs->AddTemp(Location::RequiresRegister()); |
2500 } else if (IsPotentialUnboxedLoad()) { | 2500 } else if (IsPotentialUnboxedLoad()) { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2628 __ LoadFromOffset(kWord, result_reg, | 2628 __ LoadFromOffset(kWord, result_reg, |
2629 instance_reg, offset_in_bytes() - kHeapObjectTag); | 2629 instance_reg, offset_in_bytes() - kHeapObjectTag); |
2630 __ Bind(&done); | 2630 __ Bind(&done); |
2631 } | 2631 } |
2632 | 2632 |
2633 | 2633 |
2634 LocationSummary* InstantiateTypeInstr::MakeLocationSummary(bool opt) const { | 2634 LocationSummary* InstantiateTypeInstr::MakeLocationSummary(bool opt) const { |
2635 const intptr_t kNumInputs = 1; | 2635 const intptr_t kNumInputs = 1; |
2636 const intptr_t kNumTemps = 0; | 2636 const intptr_t kNumTemps = 0; |
2637 LocationSummary* locs = | 2637 LocationSummary* locs = |
2638 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 2638 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
2639 locs->set_in(0, Location::RegisterLocation(R0)); | 2639 locs->set_in(0, Location::RegisterLocation(R0)); |
2640 locs->set_out(0, Location::RegisterLocation(R0)); | 2640 locs->set_out(0, Location::RegisterLocation(R0)); |
2641 return locs; | 2641 return locs; |
2642 } | 2642 } |
2643 | 2643 |
2644 | 2644 |
2645 void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2645 void InstantiateTypeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2646 const Register instantiator_reg = locs()->in(0).reg(); | 2646 const Register instantiator_reg = locs()->in(0).reg(); |
2647 const Register result_reg = locs()->out(0).reg(); | 2647 const Register result_reg = locs()->out(0).reg(); |
2648 | 2648 |
(...skipping 11 matching lines...) Expand all Loading... |
2660 __ Pop(result_reg); // Pop instantiated type. | 2660 __ Pop(result_reg); // Pop instantiated type. |
2661 ASSERT(instantiator_reg == result_reg); | 2661 ASSERT(instantiator_reg == result_reg); |
2662 } | 2662 } |
2663 | 2663 |
2664 | 2664 |
2665 LocationSummary* InstantiateTypeArgumentsInstr::MakeLocationSummary( | 2665 LocationSummary* InstantiateTypeArgumentsInstr::MakeLocationSummary( |
2666 bool opt) const { | 2666 bool opt) const { |
2667 const intptr_t kNumInputs = 1; | 2667 const intptr_t kNumInputs = 1; |
2668 const intptr_t kNumTemps = 0; | 2668 const intptr_t kNumTemps = 0; |
2669 LocationSummary* locs = | 2669 LocationSummary* locs = |
2670 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 2670 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
2671 locs->set_in(0, Location::RegisterLocation(R0)); | 2671 locs->set_in(0, Location::RegisterLocation(R0)); |
2672 locs->set_out(0, Location::RegisterLocation(R0)); | 2672 locs->set_out(0, Location::RegisterLocation(R0)); |
2673 return locs; | 2673 return locs; |
2674 } | 2674 } |
2675 | 2675 |
2676 | 2676 |
2677 void InstantiateTypeArgumentsInstr::EmitNativeCode( | 2677 void InstantiateTypeArgumentsInstr::EmitNativeCode( |
2678 FlowGraphCompiler* compiler) { | 2678 FlowGraphCompiler* compiler) { |
2679 const Register instantiator_reg = locs()->in(0).reg(); | 2679 const Register instantiator_reg = locs()->in(0).reg(); |
2680 const Register result_reg = locs()->out(0).reg(); | 2680 const Register result_reg = locs()->out(0).reg(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2728 __ Drop(2); // Drop instantiator and uninstantiated type arguments. | 2728 __ Drop(2); // Drop instantiator and uninstantiated type arguments. |
2729 __ Pop(result_reg); // Pop instantiated type arguments. | 2729 __ Pop(result_reg); // Pop instantiated type arguments. |
2730 __ Bind(&type_arguments_instantiated); | 2730 __ Bind(&type_arguments_instantiated); |
2731 } | 2731 } |
2732 | 2732 |
2733 | 2733 |
2734 LocationSummary* AllocateContextInstr::MakeLocationSummary(bool opt) const { | 2734 LocationSummary* AllocateContextInstr::MakeLocationSummary(bool opt) const { |
2735 const intptr_t kNumInputs = 0; | 2735 const intptr_t kNumInputs = 0; |
2736 const intptr_t kNumTemps = 1; | 2736 const intptr_t kNumTemps = 1; |
2737 LocationSummary* locs = | 2737 LocationSummary* locs = |
2738 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 2738 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
2739 locs->set_temp(0, Location::RegisterLocation(R1)); | 2739 locs->set_temp(0, Location::RegisterLocation(R1)); |
2740 locs->set_out(0, Location::RegisterLocation(R0)); | 2740 locs->set_out(0, Location::RegisterLocation(R0)); |
2741 return locs; | 2741 return locs; |
2742 } | 2742 } |
2743 | 2743 |
2744 | 2744 |
2745 void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2745 void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2746 ASSERT(locs()->temp(0).reg() == R1); | 2746 ASSERT(locs()->temp(0).reg() == R1); |
2747 ASSERT(locs()->out(0).reg() == R0); | 2747 ASSERT(locs()->out(0).reg() == R0); |
2748 | 2748 |
2749 __ LoadImmediate(R1, num_context_variables()); | 2749 __ LoadImmediate(R1, num_context_variables()); |
2750 const ExternalLabel label("alloc_context", | 2750 const ExternalLabel label("alloc_context", |
2751 StubCode::AllocateContextEntryPoint()); | 2751 StubCode::AllocateContextEntryPoint()); |
2752 compiler->GenerateCall(token_pos(), | 2752 compiler->GenerateCall(token_pos(), |
2753 &label, | 2753 &label, |
2754 PcDescriptors::kOther, | 2754 PcDescriptors::kOther, |
2755 locs()); | 2755 locs()); |
2756 } | 2756 } |
2757 | 2757 |
2758 | 2758 |
2759 LocationSummary* CloneContextInstr::MakeLocationSummary(bool opt) const { | 2759 LocationSummary* CloneContextInstr::MakeLocationSummary(bool opt) const { |
2760 const intptr_t kNumInputs = 1; | 2760 const intptr_t kNumInputs = 1; |
2761 const intptr_t kNumTemps = 0; | 2761 const intptr_t kNumTemps = 0; |
2762 LocationSummary* locs = | 2762 LocationSummary* locs = |
2763 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 2763 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
2764 locs->set_in(0, Location::RegisterLocation(R0)); | 2764 locs->set_in(0, Location::RegisterLocation(R0)); |
2765 locs->set_out(0, Location::RegisterLocation(R0)); | 2765 locs->set_out(0, Location::RegisterLocation(R0)); |
2766 return locs; | 2766 return locs; |
2767 } | 2767 } |
2768 | 2768 |
2769 | 2769 |
2770 void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2770 void CloneContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2771 const Register context_value = locs()->in(0).reg(); | 2771 const Register context_value = locs()->in(0).reg(); |
2772 const Register result = locs()->out(0).reg(); | 2772 const Register result = locs()->out(0).reg(); |
2773 | 2773 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2817 FP, exception_var().index() * kWordSize); | 2817 FP, exception_var().index() * kWordSize); |
2818 __ StoreToOffset(kWord, kStackTraceObjectReg, | 2818 __ StoreToOffset(kWord, kStackTraceObjectReg, |
2819 FP, stacktrace_var().index() * kWordSize); | 2819 FP, stacktrace_var().index() * kWordSize); |
2820 } | 2820 } |
2821 | 2821 |
2822 | 2822 |
2823 LocationSummary* CheckStackOverflowInstr::MakeLocationSummary(bool opt) const { | 2823 LocationSummary* CheckStackOverflowInstr::MakeLocationSummary(bool opt) const { |
2824 const intptr_t kNumInputs = 0; | 2824 const intptr_t kNumInputs = 0; |
2825 const intptr_t kNumTemps = 1; | 2825 const intptr_t kNumTemps = 1; |
2826 LocationSummary* summary = | 2826 LocationSummary* summary = |
2827 new LocationSummary(kNumInputs, | 2827 new (isolate) LocationSummary(isolate, kNumInputs, |
2828 kNumTemps, | 2828 kNumTemps, |
2829 LocationSummary::kCallOnSlowPath); | 2829 LocationSummary::kCallOnSlowPath); |
2830 summary->set_temp(0, Location::RequiresRegister()); | 2830 summary->set_temp(0, Location::RequiresRegister()); |
2831 return summary; | 2831 return summary; |
2832 } | 2832 } |
2833 | 2833 |
2834 | 2834 |
2835 class CheckStackOverflowSlowPath : public SlowPathCode { | 2835 class CheckStackOverflowSlowPath : public SlowPathCode { |
2836 public: | 2836 public: |
2837 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) | 2837 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3019 // Shift for result now we know there is no overflow. | 3019 // Shift for result now we know there is no overflow. |
3020 __ Lsl(result, left, IP); | 3020 __ Lsl(result, left, IP); |
3021 } | 3021 } |
3022 } | 3022 } |
3023 | 3023 |
3024 | 3024 |
3025 LocationSummary* BinarySmiOpInstr::MakeLocationSummary(bool opt) const { | 3025 LocationSummary* BinarySmiOpInstr::MakeLocationSummary(bool opt) const { |
3026 const intptr_t kNumInputs = 2; | 3026 const intptr_t kNumInputs = 2; |
3027 const intptr_t kNumTemps = 0; | 3027 const intptr_t kNumTemps = 0; |
3028 LocationSummary* summary = | 3028 LocationSummary* summary = |
3029 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3029 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
3030 if (op_kind() == Token::kTRUNCDIV) { | 3030 if (op_kind() == Token::kTRUNCDIV) { |
3031 summary->set_in(0, Location::RequiresRegister()); | 3031 summary->set_in(0, Location::RequiresRegister()); |
3032 if (RightIsPowerOfTwoConstant()) { | 3032 if (RightIsPowerOfTwoConstant()) { |
3033 ConstantInstr* right_constant = right()->definition()->AsConstant(); | 3033 ConstantInstr* right_constant = right()->definition()->AsConstant(); |
3034 summary->set_in(1, Location::Constant(right_constant->value())); | 3034 summary->set_in(1, Location::Constant(right_constant->value())); |
3035 summary->AddTemp(Location::RequiresRegister()); | 3035 summary->AddTemp(Location::RequiresRegister()); |
3036 } else { | 3036 } else { |
3037 summary->set_in(1, Location::RequiresRegister()); | 3037 summary->set_in(1, Location::RequiresRegister()); |
3038 summary->AddTemp(Location::RequiresRegister()); | 3038 summary->AddTemp(Location::RequiresRegister()); |
3039 summary->AddTemp(Location::RequiresFpuRegister()); | 3039 summary->AddTemp(Location::RequiresFpuRegister()); |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3387 } | 3387 } |
3388 | 3388 |
3389 | 3389 |
3390 LocationSummary* CheckEitherNonSmiInstr::MakeLocationSummary(bool opt) const { | 3390 LocationSummary* CheckEitherNonSmiInstr::MakeLocationSummary(bool opt) const { |
3391 intptr_t left_cid = left()->Type()->ToCid(); | 3391 intptr_t left_cid = left()->Type()->ToCid(); |
3392 intptr_t right_cid = right()->Type()->ToCid(); | 3392 intptr_t right_cid = right()->Type()->ToCid(); |
3393 ASSERT((left_cid != kDoubleCid) && (right_cid != kDoubleCid)); | 3393 ASSERT((left_cid != kDoubleCid) && (right_cid != kDoubleCid)); |
3394 const intptr_t kNumInputs = 2; | 3394 const intptr_t kNumInputs = 2; |
3395 const intptr_t kNumTemps = 0; | 3395 const intptr_t kNumTemps = 0; |
3396 LocationSummary* summary = | 3396 LocationSummary* summary = |
3397 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3397 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSummar
y::kNoCall); |
3398 summary->set_in(0, Location::RequiresRegister()); | 3398 summary->set_in(0, Location::RequiresRegister()); |
3399 summary->set_in(1, Location::RequiresRegister()); | 3399 summary->set_in(1, Location::RequiresRegister()); |
3400 return summary; | 3400 return summary; |
3401 } | 3401 } |
3402 | 3402 |
3403 | 3403 |
3404 void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3404 void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
3405 Label* deopt = compiler->AddDeoptStub(deopt_id(), | 3405 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
3406 ICData::kDeoptBinaryDoubleOp); | 3406 ICData::kDeoptBinaryDoubleOp); |
3407 intptr_t left_cid = left()->Type()->ToCid(); | 3407 intptr_t left_cid = left()->Type()->ToCid(); |
(...skipping 11 matching lines...) Expand all Loading... |
3419 __ tst(IP, ShifterOperand(kSmiTagMask)); | 3419 __ tst(IP, ShifterOperand(kSmiTagMask)); |
3420 } | 3420 } |
3421 __ b(deopt, EQ); | 3421 __ b(deopt, EQ); |
3422 } | 3422 } |
3423 | 3423 |
3424 | 3424 |
3425 LocationSummary* BoxDoubleInstr::MakeLocationSummary(bool opt) const { | 3425 LocationSummary* BoxDoubleInstr::MakeLocationSummary(bool opt) const { |
3426 const intptr_t kNumInputs = 1; | 3426 const intptr_t kNumInputs = 1; |
3427 const intptr_t kNumTemps = 1; | 3427 const intptr_t kNumTemps = 1; |
3428 LocationSummary* summary = | 3428 LocationSummary* summary = |
3429 new LocationSummary(kNumInputs, | 3429 new (isolate) LocationSummary(isolate, kNumInputs, |
3430 kNumTemps, | 3430 kNumTemps, |
3431 LocationSummary::kCallOnSlowPath); | 3431 LocationSummary::kCallOnSlowPath); |
3432 summary->set_in(0, Location::RequiresFpuRegister()); | 3432 summary->set_in(0, Location::RequiresFpuRegister()); |
3433 summary->set_temp(0, Location::RequiresRegister()); | 3433 summary->set_temp(0, Location::RequiresRegister()); |
3434 summary->set_out(0, Location::RequiresRegister()); | 3434 summary->set_out(0, Location::RequiresRegister()); |
3435 return summary; | 3435 return summary; |
3436 } | 3436 } |
3437 | 3437 |
3438 | 3438 |
3439 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3439 void BoxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
(...skipping 12 matching lines...) Expand all Loading... |
3452 } | 3452 } |
3453 | 3453 |
3454 | 3454 |
3455 LocationSummary* UnboxDoubleInstr::MakeLocationSummary(bool opt) const { | 3455 LocationSummary* UnboxDoubleInstr::MakeLocationSummary(bool opt) const { |
3456 const intptr_t kNumInputs = 1; | 3456 const intptr_t kNumInputs = 1; |
3457 const intptr_t value_cid = value()->Type()->ToCid(); | 3457 const intptr_t value_cid = value()->Type()->ToCid(); |
3458 const bool needs_temp = ((value_cid != kSmiCid) && (value_cid != kDoubleCid)); | 3458 const bool needs_temp = ((value_cid != kSmiCid) && (value_cid != kDoubleCid)); |
3459 const bool needs_writable_input = (value_cid == kSmiCid); | 3459 const bool needs_writable_input = (value_cid == kSmiCid); |
3460 const intptr_t kNumTemps = needs_temp ? 1 : 0; | 3460 const intptr_t kNumTemps = needs_temp ? 1 : 0; |
3461 LocationSummary* summary = | 3461 LocationSummary* summary = |
3462 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3462 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
3463 summary->set_in(0, needs_writable_input | 3463 summary->set_in(0, needs_writable_input |
3464 ? Location::WritableRegister() | 3464 ? Location::WritableRegister() |
3465 : Location::RequiresRegister()); | 3465 : Location::RequiresRegister()); |
3466 if (needs_temp) summary->set_temp(0, Location::RequiresRegister()); | 3466 if (needs_temp) summary->set_temp(0, Location::RequiresRegister()); |
3467 summary->set_out(0, Location::RequiresFpuRegister()); | 3467 summary->set_out(0, Location::RequiresFpuRegister()); |
3468 return summary; | 3468 return summary; |
3469 } | 3469 } |
3470 | 3470 |
3471 | 3471 |
3472 void UnboxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3472 void UnboxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3509 __ Bind(&done); | 3509 __ Bind(&done); |
3510 } | 3510 } |
3511 } | 3511 } |
3512 } | 3512 } |
3513 | 3513 |
3514 | 3514 |
3515 LocationSummary* BoxFloat32x4Instr::MakeLocationSummary(bool opt) const { | 3515 LocationSummary* BoxFloat32x4Instr::MakeLocationSummary(bool opt) const { |
3516 const intptr_t kNumInputs = 1; | 3516 const intptr_t kNumInputs = 1; |
3517 const intptr_t kNumTemps = 1; | 3517 const intptr_t kNumTemps = 1; |
3518 LocationSummary* summary = | 3518 LocationSummary* summary = |
3519 new LocationSummary(kNumInputs, | 3519 new (isolate) LocationSummary(isolate, kNumInputs, |
3520 kNumTemps, | 3520 kNumTemps, |
3521 LocationSummary::kCallOnSlowPath); | 3521 LocationSummary::kCallOnSlowPath); |
3522 summary->set_in(0, Location::RequiresFpuRegister()); | 3522 summary->set_in(0, Location::RequiresFpuRegister()); |
3523 summary->set_temp(0, Location::RequiresRegister()); | 3523 summary->set_temp(0, Location::RequiresRegister()); |
3524 summary->set_out(0, Location::RequiresRegister()); | 3524 summary->set_out(0, Location::RequiresRegister()); |
3525 return summary; | 3525 return summary; |
3526 } | 3526 } |
3527 | 3527 |
3528 | 3528 |
3529 void BoxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3529 void BoxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
(...skipping 13 matching lines...) Expand all Loading... |
3543 __ StoreMultipleDToOffset(dvalue0, 2, out_reg, | 3543 __ StoreMultipleDToOffset(dvalue0, 2, out_reg, |
3544 Float32x4::value_offset() - kHeapObjectTag); | 3544 Float32x4::value_offset() - kHeapObjectTag); |
3545 } | 3545 } |
3546 | 3546 |
3547 | 3547 |
3548 LocationSummary* UnboxFloat32x4Instr::MakeLocationSummary(bool opt) const { | 3548 LocationSummary* UnboxFloat32x4Instr::MakeLocationSummary(bool opt) const { |
3549 const intptr_t value_cid = value()->Type()->ToCid(); | 3549 const intptr_t value_cid = value()->Type()->ToCid(); |
3550 const intptr_t kNumInputs = 1; | 3550 const intptr_t kNumInputs = 1; |
3551 const intptr_t kNumTemps = value_cid == kFloat32x4Cid ? 0 : 1; | 3551 const intptr_t kNumTemps = value_cid == kFloat32x4Cid ? 0 : 1; |
3552 LocationSummary* summary = | 3552 LocationSummary* summary = |
3553 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3553 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
3554 summary->set_in(0, Location::RequiresRegister()); | 3554 summary->set_in(0, Location::RequiresRegister()); |
3555 if (kNumTemps > 0) { | 3555 if (kNumTemps > 0) { |
3556 ASSERT(kNumTemps == 1); | 3556 ASSERT(kNumTemps == 1); |
3557 summary->set_temp(0, Location::RequiresRegister()); | 3557 summary->set_temp(0, Location::RequiresRegister()); |
3558 } | 3558 } |
3559 summary->set_out(0, Location::RequiresFpuRegister()); | 3559 summary->set_out(0, Location::RequiresFpuRegister()); |
3560 return summary; | 3560 return summary; |
3561 } | 3561 } |
3562 | 3562 |
3563 | 3563 |
(...skipping 14 matching lines...) Expand all Loading... |
3578 const DRegister dresult0 = EvenDRegisterOf(result); | 3578 const DRegister dresult0 = EvenDRegisterOf(result); |
3579 __ LoadMultipleDFromOffset(dresult0, 2, value, | 3579 __ LoadMultipleDFromOffset(dresult0, 2, value, |
3580 Float32x4::value_offset() - kHeapObjectTag); | 3580 Float32x4::value_offset() - kHeapObjectTag); |
3581 } | 3581 } |
3582 | 3582 |
3583 | 3583 |
3584 LocationSummary* BoxFloat64x2Instr::MakeLocationSummary(bool opt) const { | 3584 LocationSummary* BoxFloat64x2Instr::MakeLocationSummary(bool opt) const { |
3585 const intptr_t kNumInputs = 1; | 3585 const intptr_t kNumInputs = 1; |
3586 const intptr_t kNumTemps = 1; | 3586 const intptr_t kNumTemps = 1; |
3587 LocationSummary* summary = | 3587 LocationSummary* summary = |
3588 new LocationSummary(kNumInputs, | 3588 new (isolate) LocationSummary(isolate, kNumInputs, |
3589 kNumTemps, | 3589 kNumTemps, |
3590 LocationSummary::kCallOnSlowPath); | 3590 LocationSummary::kCallOnSlowPath); |
3591 summary->set_in(0, Location::RequiresFpuRegister()); | 3591 summary->set_in(0, Location::RequiresFpuRegister()); |
3592 summary->set_temp(0, Location::RequiresRegister()); | 3592 summary->set_temp(0, Location::RequiresRegister()); |
3593 summary->set_out(0, Location::RequiresRegister()); | 3593 summary->set_out(0, Location::RequiresRegister()); |
3594 return summary; | 3594 return summary; |
3595 } | 3595 } |
3596 | 3596 |
3597 | 3597 |
3598 void BoxFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3598 void BoxFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
(...skipping 13 matching lines...) Expand all Loading... |
3612 __ StoreMultipleDToOffset(dvalue0, 2, out_reg, | 3612 __ StoreMultipleDToOffset(dvalue0, 2, out_reg, |
3613 Float64x2::value_offset() - kHeapObjectTag); | 3613 Float64x2::value_offset() - kHeapObjectTag); |
3614 } | 3614 } |
3615 | 3615 |
3616 | 3616 |
3617 LocationSummary* UnboxFloat64x2Instr::MakeLocationSummary(bool opt) const { | 3617 LocationSummary* UnboxFloat64x2Instr::MakeLocationSummary(bool opt) const { |
3618 const intptr_t value_cid = value()->Type()->ToCid(); | 3618 const intptr_t value_cid = value()->Type()->ToCid(); |
3619 const intptr_t kNumInputs = 1; | 3619 const intptr_t kNumInputs = 1; |
3620 const intptr_t kNumTemps = value_cid == kFloat64x2Cid ? 0 : 1; | 3620 const intptr_t kNumTemps = value_cid == kFloat64x2Cid ? 0 : 1; |
3621 LocationSummary* summary = | 3621 LocationSummary* summary = |
3622 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3622 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
3623 summary->set_in(0, Location::RequiresRegister()); | 3623 summary->set_in(0, Location::RequiresRegister()); |
3624 if (kNumTemps > 0) { | 3624 if (kNumTemps > 0) { |
3625 ASSERT(kNumTemps == 1); | 3625 ASSERT(kNumTemps == 1); |
3626 summary->set_temp(0, Location::RequiresRegister()); | 3626 summary->set_temp(0, Location::RequiresRegister()); |
3627 } | 3627 } |
3628 summary->set_out(0, Location::RequiresFpuRegister()); | 3628 summary->set_out(0, Location::RequiresFpuRegister()); |
3629 return summary; | 3629 return summary; |
3630 } | 3630 } |
3631 | 3631 |
3632 | 3632 |
(...skipping 14 matching lines...) Expand all Loading... |
3647 const DRegister dresult0 = EvenDRegisterOf(result); | 3647 const DRegister dresult0 = EvenDRegisterOf(result); |
3648 __ LoadMultipleDFromOffset(dresult0, 2, value, | 3648 __ LoadMultipleDFromOffset(dresult0, 2, value, |
3649 Float64x2::value_offset() - kHeapObjectTag); | 3649 Float64x2::value_offset() - kHeapObjectTag); |
3650 } | 3650 } |
3651 | 3651 |
3652 | 3652 |
3653 LocationSummary* BoxInt32x4Instr::MakeLocationSummary(bool opt) const { | 3653 LocationSummary* BoxInt32x4Instr::MakeLocationSummary(bool opt) const { |
3654 const intptr_t kNumInputs = 1; | 3654 const intptr_t kNumInputs = 1; |
3655 const intptr_t kNumTemps = 1; | 3655 const intptr_t kNumTemps = 1; |
3656 LocationSummary* summary = | 3656 LocationSummary* summary = |
3657 new LocationSummary(kNumInputs, | 3657 new (isolate) LocationSummary(isolate, kNumInputs, |
3658 kNumTemps, | 3658 kNumTemps, |
3659 LocationSummary::kCallOnSlowPath); | 3659 LocationSummary::kCallOnSlowPath); |
3660 summary->set_in(0, Location::RequiresFpuRegister()); | 3660 summary->set_in(0, Location::RequiresFpuRegister()); |
3661 summary->set_temp(0, Location::RequiresRegister()); | 3661 summary->set_temp(0, Location::RequiresRegister()); |
3662 summary->set_out(0, Location::RequiresRegister()); | 3662 summary->set_out(0, Location::RequiresRegister()); |
3663 return summary; | 3663 return summary; |
3664 } | 3664 } |
3665 | 3665 |
3666 | 3666 |
3667 class BoxInt32x4SlowPath : public SlowPathCode { | 3667 class BoxInt32x4SlowPath : public SlowPathCode { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3712 __ StoreMultipleDToOffset(dvalue0, 2, out_reg, | 3712 __ StoreMultipleDToOffset(dvalue0, 2, out_reg, |
3713 Int32x4::value_offset() - kHeapObjectTag); | 3713 Int32x4::value_offset() - kHeapObjectTag); |
3714 } | 3714 } |
3715 | 3715 |
3716 | 3716 |
3717 LocationSummary* UnboxInt32x4Instr::MakeLocationSummary(bool opt) const { | 3717 LocationSummary* UnboxInt32x4Instr::MakeLocationSummary(bool opt) const { |
3718 const intptr_t value_cid = value()->Type()->ToCid(); | 3718 const intptr_t value_cid = value()->Type()->ToCid(); |
3719 const intptr_t kNumInputs = 1; | 3719 const intptr_t kNumInputs = 1; |
3720 const intptr_t kNumTemps = value_cid == kInt32x4Cid ? 0 : 1; | 3720 const intptr_t kNumTemps = value_cid == kInt32x4Cid ? 0 : 1; |
3721 LocationSummary* summary = | 3721 LocationSummary* summary = |
3722 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3722 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
3723 summary->set_in(0, Location::RequiresRegister()); | 3723 summary->set_in(0, Location::RequiresRegister()); |
3724 if (kNumTemps > 0) { | 3724 if (kNumTemps > 0) { |
3725 ASSERT(kNumTemps == 1); | 3725 ASSERT(kNumTemps == 1); |
3726 summary->set_temp(0, Location::RequiresRegister()); | 3726 summary->set_temp(0, Location::RequiresRegister()); |
3727 } | 3727 } |
3728 summary->set_out(0, Location::RequiresFpuRegister()); | 3728 summary->set_out(0, Location::RequiresFpuRegister()); |
3729 return summary; | 3729 return summary; |
3730 } | 3730 } |
3731 | 3731 |
3732 | 3732 |
(...skipping 14 matching lines...) Expand all Loading... |
3747 const DRegister dresult0 = EvenDRegisterOf(result); | 3747 const DRegister dresult0 = EvenDRegisterOf(result); |
3748 __ LoadMultipleDFromOffset(dresult0, 2, value, | 3748 __ LoadMultipleDFromOffset(dresult0, 2, value, |
3749 Int32x4::value_offset() - kHeapObjectTag); | 3749 Int32x4::value_offset() - kHeapObjectTag); |
3750 } | 3750 } |
3751 | 3751 |
3752 | 3752 |
3753 LocationSummary* BinaryDoubleOpInstr::MakeLocationSummary(bool opt) const { | 3753 LocationSummary* BinaryDoubleOpInstr::MakeLocationSummary(bool opt) const { |
3754 const intptr_t kNumInputs = 2; | 3754 const intptr_t kNumInputs = 2; |
3755 const intptr_t kNumTemps = 0; | 3755 const intptr_t kNumTemps = 0; |
3756 LocationSummary* summary = | 3756 LocationSummary* summary = |
3757 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3757 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
3758 summary->set_in(0, Location::RequiresFpuRegister()); | 3758 summary->set_in(0, Location::RequiresFpuRegister()); |
3759 summary->set_in(1, Location::RequiresFpuRegister()); | 3759 summary->set_in(1, Location::RequiresFpuRegister()); |
3760 summary->set_out(0, Location::RequiresFpuRegister()); | 3760 summary->set_out(0, Location::RequiresFpuRegister()); |
3761 return summary; | 3761 return summary; |
3762 } | 3762 } |
3763 | 3763 |
3764 | 3764 |
3765 void BinaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3765 void BinaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
3766 const DRegister left = EvenDRegisterOf(locs()->in(0).fpu_reg()); | 3766 const DRegister left = EvenDRegisterOf(locs()->in(0).fpu_reg()); |
3767 const DRegister right = EvenDRegisterOf(locs()->in(1).fpu_reg()); | 3767 const DRegister right = EvenDRegisterOf(locs()->in(1).fpu_reg()); |
3768 const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg()); | 3768 const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg()); |
3769 switch (op_kind()) { | 3769 switch (op_kind()) { |
3770 case Token::kADD: __ vaddd(result, left, right); break; | 3770 case Token::kADD: __ vaddd(result, left, right); break; |
3771 case Token::kSUB: __ vsubd(result, left, right); break; | 3771 case Token::kSUB: __ vsubd(result, left, right); break; |
3772 case Token::kMUL: __ vmuld(result, left, right); break; | 3772 case Token::kMUL: __ vmuld(result, left, right); break; |
3773 case Token::kDIV: __ vdivd(result, left, right); break; | 3773 case Token::kDIV: __ vdivd(result, left, right); break; |
3774 default: UNREACHABLE(); | 3774 default: UNREACHABLE(); |
3775 } | 3775 } |
3776 } | 3776 } |
3777 | 3777 |
3778 | 3778 |
3779 LocationSummary* BinaryFloat32x4OpInstr::MakeLocationSummary(bool opt) const { | 3779 LocationSummary* BinaryFloat32x4OpInstr::MakeLocationSummary(bool opt) const { |
3780 const intptr_t kNumInputs = 2; | 3780 const intptr_t kNumInputs = 2; |
3781 const intptr_t kNumTemps = 0; | 3781 const intptr_t kNumTemps = 0; |
3782 LocationSummary* summary = | 3782 LocationSummary* summary = |
3783 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3783 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
3784 summary->set_in(0, Location::RequiresFpuRegister()); | 3784 summary->set_in(0, Location::RequiresFpuRegister()); |
3785 summary->set_in(1, Location::RequiresFpuRegister()); | 3785 summary->set_in(1, Location::RequiresFpuRegister()); |
3786 summary->set_out(0, Location::RequiresFpuRegister()); | 3786 summary->set_out(0, Location::RequiresFpuRegister()); |
3787 return summary; | 3787 return summary; |
3788 } | 3788 } |
3789 | 3789 |
3790 | 3790 |
3791 void BinaryFloat32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3791 void BinaryFloat32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
3792 const QRegister left = locs()->in(0).fpu_reg(); | 3792 const QRegister left = locs()->in(0).fpu_reg(); |
3793 const QRegister right = locs()->in(1).fpu_reg(); | 3793 const QRegister right = locs()->in(1).fpu_reg(); |
3794 const QRegister result = locs()->out(0).fpu_reg(); | 3794 const QRegister result = locs()->out(0).fpu_reg(); |
3795 | 3795 |
3796 switch (op_kind()) { | 3796 switch (op_kind()) { |
3797 case Token::kADD: __ vaddqs(result, left, right); break; | 3797 case Token::kADD: __ vaddqs(result, left, right); break; |
3798 case Token::kSUB: __ vsubqs(result, left, right); break; | 3798 case Token::kSUB: __ vsubqs(result, left, right); break; |
3799 case Token::kMUL: __ vmulqs(result, left, right); break; | 3799 case Token::kMUL: __ vmulqs(result, left, right); break; |
3800 case Token::kDIV: __ Vdivqs(result, left, right); break; | 3800 case Token::kDIV: __ Vdivqs(result, left, right); break; |
3801 default: UNREACHABLE(); | 3801 default: UNREACHABLE(); |
3802 } | 3802 } |
3803 } | 3803 } |
3804 | 3804 |
3805 | 3805 |
3806 LocationSummary* BinaryFloat64x2OpInstr::MakeLocationSummary(bool opt) const { | 3806 LocationSummary* BinaryFloat64x2OpInstr::MakeLocationSummary(bool opt) const { |
3807 const intptr_t kNumInputs = 2; | 3807 const intptr_t kNumInputs = 2; |
3808 const intptr_t kNumTemps = 0; | 3808 const intptr_t kNumTemps = 0; |
3809 LocationSummary* summary = | 3809 LocationSummary* summary = |
3810 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3810 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
3811 summary->set_in(0, Location::RequiresFpuRegister()); | 3811 summary->set_in(0, Location::RequiresFpuRegister()); |
3812 summary->set_in(1, Location::RequiresFpuRegister()); | 3812 summary->set_in(1, Location::RequiresFpuRegister()); |
3813 summary->set_out(0, Location::RequiresFpuRegister()); | 3813 summary->set_out(0, Location::RequiresFpuRegister()); |
3814 return summary; | 3814 return summary; |
3815 } | 3815 } |
3816 | 3816 |
3817 | 3817 |
3818 void BinaryFloat64x2OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3818 void BinaryFloat64x2OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
3819 const QRegister left = locs()->in(0).fpu_reg(); | 3819 const QRegister left = locs()->in(0).fpu_reg(); |
3820 const QRegister right = locs()->in(1).fpu_reg(); | 3820 const QRegister right = locs()->in(1).fpu_reg(); |
(...skipping 27 matching lines...) Expand all Loading... |
3848 break; | 3848 break; |
3849 default: UNREACHABLE(); | 3849 default: UNREACHABLE(); |
3850 } | 3850 } |
3851 } | 3851 } |
3852 | 3852 |
3853 | 3853 |
3854 LocationSummary* Simd32x4ShuffleInstr::MakeLocationSummary(bool opt) const { | 3854 LocationSummary* Simd32x4ShuffleInstr::MakeLocationSummary(bool opt) const { |
3855 const intptr_t kNumInputs = 1; | 3855 const intptr_t kNumInputs = 1; |
3856 const intptr_t kNumTemps = 0; | 3856 const intptr_t kNumTemps = 0; |
3857 LocationSummary* summary = | 3857 LocationSummary* summary = |
3858 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3858 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
3859 // Low (< Q7) Q registers are needed for the vcvtds and vmovs instructions. | 3859 // Low (< Q7) Q registers are needed for the vcvtds and vmovs instructions. |
3860 summary->set_in(0, Location::FpuRegisterLocation(Q5)); | 3860 summary->set_in(0, Location::FpuRegisterLocation(Q5)); |
3861 summary->set_out(0, Location::FpuRegisterLocation(Q6)); | 3861 summary->set_out(0, Location::FpuRegisterLocation(Q6)); |
3862 return summary; | 3862 return summary; |
3863 } | 3863 } |
3864 | 3864 |
3865 | 3865 |
3866 void Simd32x4ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3866 void Simd32x4ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
3867 const QRegister value = locs()->in(0).fpu_reg(); | 3867 const QRegister value = locs()->in(0).fpu_reg(); |
3868 const QRegister result = locs()->out(0).fpu_reg(); | 3868 const QRegister result = locs()->out(0).fpu_reg(); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3928 break; | 3928 break; |
3929 default: UNREACHABLE(); | 3929 default: UNREACHABLE(); |
3930 } | 3930 } |
3931 } | 3931 } |
3932 | 3932 |
3933 | 3933 |
3934 LocationSummary* Simd32x4ShuffleMixInstr::MakeLocationSummary(bool opt) const { | 3934 LocationSummary* Simd32x4ShuffleMixInstr::MakeLocationSummary(bool opt) const { |
3935 const intptr_t kNumInputs = 2; | 3935 const intptr_t kNumInputs = 2; |
3936 const intptr_t kNumTemps = 0; | 3936 const intptr_t kNumTemps = 0; |
3937 LocationSummary* summary = | 3937 LocationSummary* summary = |
3938 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3938 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
3939 // Low (< Q7) Q registers are needed for the vcvtds and vmovs instructions. | 3939 // Low (< Q7) Q registers are needed for the vcvtds and vmovs instructions. |
3940 summary->set_in(0, Location::FpuRegisterLocation(Q4)); | 3940 summary->set_in(0, Location::FpuRegisterLocation(Q4)); |
3941 summary->set_in(1, Location::FpuRegisterLocation(Q5)); | 3941 summary->set_in(1, Location::FpuRegisterLocation(Q5)); |
3942 summary->set_out(0, Location::FpuRegisterLocation(Q6)); | 3942 summary->set_out(0, Location::FpuRegisterLocation(Q6)); |
3943 return summary; | 3943 return summary; |
3944 } | 3944 } |
3945 | 3945 |
3946 | 3946 |
3947 void Simd32x4ShuffleMixInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 3947 void Simd32x4ShuffleMixInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
3948 const QRegister left = locs()->in(0).fpu_reg(); | 3948 const QRegister left = locs()->in(0).fpu_reg(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3984 break; | 3984 break; |
3985 default: UNREACHABLE(); | 3985 default: UNREACHABLE(); |
3986 } | 3986 } |
3987 } | 3987 } |
3988 | 3988 |
3989 | 3989 |
3990 LocationSummary* Simd32x4GetSignMaskInstr::MakeLocationSummary(bool opt) const { | 3990 LocationSummary* Simd32x4GetSignMaskInstr::MakeLocationSummary(bool opt) const { |
3991 const intptr_t kNumInputs = 1; | 3991 const intptr_t kNumInputs = 1; |
3992 const intptr_t kNumTemps = 1; | 3992 const intptr_t kNumTemps = 1; |
3993 LocationSummary* summary = | 3993 LocationSummary* summary = |
3994 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 3994 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
3995 summary->set_in(0, Location::FpuRegisterLocation(Q5)); | 3995 summary->set_in(0, Location::FpuRegisterLocation(Q5)); |
3996 summary->set_temp(0, Location::RequiresRegister()); | 3996 summary->set_temp(0, Location::RequiresRegister()); |
3997 summary->set_out(0, Location::RequiresRegister()); | 3997 summary->set_out(0, Location::RequiresRegister()); |
3998 return summary; | 3998 return summary; |
3999 } | 3999 } |
4000 | 4000 |
4001 | 4001 |
4002 void Simd32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4002 void Simd32x4GetSignMaskInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4003 const QRegister value = locs()->in(0).fpu_reg(); | 4003 const QRegister value = locs()->in(0).fpu_reg(); |
4004 const DRegister dvalue0 = EvenDRegisterOf(value); | 4004 const DRegister dvalue0 = EvenDRegisterOf(value); |
(...skipping 20 matching lines...) Expand all Loading... |
4025 // Tag. | 4025 // Tag. |
4026 __ SmiTag(out); | 4026 __ SmiTag(out); |
4027 } | 4027 } |
4028 | 4028 |
4029 | 4029 |
4030 LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary( | 4030 LocationSummary* Float32x4ConstructorInstr::MakeLocationSummary( |
4031 bool opt) const { | 4031 bool opt) const { |
4032 const intptr_t kNumInputs = 4; | 4032 const intptr_t kNumInputs = 4; |
4033 const intptr_t kNumTemps = 0; | 4033 const intptr_t kNumTemps = 0; |
4034 LocationSummary* summary = | 4034 LocationSummary* summary = |
4035 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4035 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4036 summary->set_in(0, Location::RequiresFpuRegister()); | 4036 summary->set_in(0, Location::RequiresFpuRegister()); |
4037 summary->set_in(1, Location::RequiresFpuRegister()); | 4037 summary->set_in(1, Location::RequiresFpuRegister()); |
4038 summary->set_in(2, Location::RequiresFpuRegister()); | 4038 summary->set_in(2, Location::RequiresFpuRegister()); |
4039 summary->set_in(3, Location::RequiresFpuRegister()); | 4039 summary->set_in(3, Location::RequiresFpuRegister()); |
4040 // Low (< 7) Q registers are needed for the vcvtsd instruction. | 4040 // Low (< 7) Q registers are needed for the vcvtsd instruction. |
4041 summary->set_out(0, Location::FpuRegisterLocation(Q6)); | 4041 summary->set_out(0, Location::FpuRegisterLocation(Q6)); |
4042 return summary; | 4042 return summary; |
4043 } | 4043 } |
4044 | 4044 |
4045 | 4045 |
(...skipping 11 matching lines...) Expand all Loading... |
4057 __ vcvtsd(OddSRegisterOf(dr0), EvenDRegisterOf(q1)); | 4057 __ vcvtsd(OddSRegisterOf(dr0), EvenDRegisterOf(q1)); |
4058 __ vcvtsd(EvenSRegisterOf(dr1), EvenDRegisterOf(q2)); | 4058 __ vcvtsd(EvenSRegisterOf(dr1), EvenDRegisterOf(q2)); |
4059 __ vcvtsd(OddSRegisterOf(dr1), EvenDRegisterOf(q3)); | 4059 __ vcvtsd(OddSRegisterOf(dr1), EvenDRegisterOf(q3)); |
4060 } | 4060 } |
4061 | 4061 |
4062 | 4062 |
4063 LocationSummary* Float32x4ZeroInstr::MakeLocationSummary(bool opt) const { | 4063 LocationSummary* Float32x4ZeroInstr::MakeLocationSummary(bool opt) const { |
4064 const intptr_t kNumInputs = 0; | 4064 const intptr_t kNumInputs = 0; |
4065 const intptr_t kNumTemps = 0; | 4065 const intptr_t kNumTemps = 0; |
4066 LocationSummary* summary = | 4066 LocationSummary* summary = |
4067 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4067 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4068 summary->set_out(0, Location::RequiresFpuRegister()); | 4068 summary->set_out(0, Location::RequiresFpuRegister()); |
4069 return summary; | 4069 return summary; |
4070 } | 4070 } |
4071 | 4071 |
4072 | 4072 |
4073 void Float32x4ZeroInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4073 void Float32x4ZeroInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4074 const QRegister q = locs()->out(0).fpu_reg(); | 4074 const QRegister q = locs()->out(0).fpu_reg(); |
4075 __ veorq(q, q, q); | 4075 __ veorq(q, q, q); |
4076 } | 4076 } |
4077 | 4077 |
4078 | 4078 |
4079 LocationSummary* Float32x4SplatInstr::MakeLocationSummary(bool opt) const { | 4079 LocationSummary* Float32x4SplatInstr::MakeLocationSummary(bool opt) const { |
4080 const intptr_t kNumInputs = 1; | 4080 const intptr_t kNumInputs = 1; |
4081 const intptr_t kNumTemps = 0; | 4081 const intptr_t kNumTemps = 0; |
4082 LocationSummary* summary = | 4082 LocationSummary* summary = |
4083 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4083 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4084 summary->set_in(0, Location::RequiresFpuRegister()); | 4084 summary->set_in(0, Location::RequiresFpuRegister()); |
4085 summary->set_out(0, Location::RequiresFpuRegister()); | 4085 summary->set_out(0, Location::RequiresFpuRegister()); |
4086 return summary; | 4086 return summary; |
4087 } | 4087 } |
4088 | 4088 |
4089 | 4089 |
4090 void Float32x4SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4090 void Float32x4SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4091 const QRegister value = locs()->in(0).fpu_reg(); | 4091 const QRegister value = locs()->in(0).fpu_reg(); |
4092 const QRegister result = locs()->out(0).fpu_reg(); | 4092 const QRegister result = locs()->out(0).fpu_reg(); |
4093 | 4093 |
4094 const DRegister dvalue0 = EvenDRegisterOf(value); | 4094 const DRegister dvalue0 = EvenDRegisterOf(value); |
4095 | 4095 |
4096 // Convert to Float32. | 4096 // Convert to Float32. |
4097 __ vcvtsd(STMP, dvalue0); | 4097 __ vcvtsd(STMP, dvalue0); |
4098 | 4098 |
4099 // Splat across all lanes. | 4099 // Splat across all lanes. |
4100 __ vdup(kWord, result, DTMP, 0); | 4100 __ vdup(kWord, result, DTMP, 0); |
4101 } | 4101 } |
4102 | 4102 |
4103 | 4103 |
4104 LocationSummary* Float32x4ComparisonInstr::MakeLocationSummary(bool opt) const { | 4104 LocationSummary* Float32x4ComparisonInstr::MakeLocationSummary(bool opt) const { |
4105 const intptr_t kNumInputs = 2; | 4105 const intptr_t kNumInputs = 2; |
4106 const intptr_t kNumTemps = 0; | 4106 const intptr_t kNumTemps = 0; |
4107 LocationSummary* summary = | 4107 LocationSummary* summary = |
4108 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4108 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4109 summary->set_in(0, Location::RequiresFpuRegister()); | 4109 summary->set_in(0, Location::RequiresFpuRegister()); |
4110 summary->set_in(1, Location::RequiresFpuRegister()); | 4110 summary->set_in(1, Location::RequiresFpuRegister()); |
4111 summary->set_out(0, Location::RequiresFpuRegister()); | 4111 summary->set_out(0, Location::RequiresFpuRegister()); |
4112 return summary; | 4112 return summary; |
4113 } | 4113 } |
4114 | 4114 |
4115 | 4115 |
4116 void Float32x4ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4116 void Float32x4ComparisonInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4117 const QRegister left = locs()->in(0).fpu_reg(); | 4117 const QRegister left = locs()->in(0).fpu_reg(); |
4118 const QRegister right = locs()->in(1).fpu_reg(); | 4118 const QRegister right = locs()->in(1).fpu_reg(); |
(...skipping 23 matching lines...) Expand all Loading... |
4142 | 4142 |
4143 default: UNREACHABLE(); | 4143 default: UNREACHABLE(); |
4144 } | 4144 } |
4145 } | 4145 } |
4146 | 4146 |
4147 | 4147 |
4148 LocationSummary* Float32x4MinMaxInstr::MakeLocationSummary(bool opt) const { | 4148 LocationSummary* Float32x4MinMaxInstr::MakeLocationSummary(bool opt) const { |
4149 const intptr_t kNumInputs = 2; | 4149 const intptr_t kNumInputs = 2; |
4150 const intptr_t kNumTemps = 0; | 4150 const intptr_t kNumTemps = 0; |
4151 LocationSummary* summary = | 4151 LocationSummary* summary = |
4152 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4152 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4153 summary->set_in(0, Location::RequiresFpuRegister()); | 4153 summary->set_in(0, Location::RequiresFpuRegister()); |
4154 summary->set_in(1, Location::RequiresFpuRegister()); | 4154 summary->set_in(1, Location::RequiresFpuRegister()); |
4155 summary->set_out(0, Location::RequiresFpuRegister()); | 4155 summary->set_out(0, Location::RequiresFpuRegister()); |
4156 return summary; | 4156 return summary; |
4157 } | 4157 } |
4158 | 4158 |
4159 | 4159 |
4160 void Float32x4MinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4160 void Float32x4MinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4161 const QRegister left = locs()->in(0).fpu_reg(); | 4161 const QRegister left = locs()->in(0).fpu_reg(); |
4162 const QRegister right = locs()->in(1).fpu_reg(); | 4162 const QRegister right = locs()->in(1).fpu_reg(); |
4163 const QRegister result = locs()->out(0).fpu_reg(); | 4163 const QRegister result = locs()->out(0).fpu_reg(); |
4164 | 4164 |
4165 switch (op_kind()) { | 4165 switch (op_kind()) { |
4166 case MethodRecognizer::kFloat32x4Min: | 4166 case MethodRecognizer::kFloat32x4Min: |
4167 __ vminqs(result, left, right); | 4167 __ vminqs(result, left, right); |
4168 break; | 4168 break; |
4169 case MethodRecognizer::kFloat32x4Max: | 4169 case MethodRecognizer::kFloat32x4Max: |
4170 __ vmaxqs(result, left, right); | 4170 __ vmaxqs(result, left, right); |
4171 break; | 4171 break; |
4172 default: UNREACHABLE(); | 4172 default: UNREACHABLE(); |
4173 } | 4173 } |
4174 } | 4174 } |
4175 | 4175 |
4176 | 4176 |
4177 LocationSummary* Float32x4SqrtInstr::MakeLocationSummary(bool opt) const { | 4177 LocationSummary* Float32x4SqrtInstr::MakeLocationSummary(bool opt) const { |
4178 const intptr_t kNumInputs = 1; | 4178 const intptr_t kNumInputs = 1; |
4179 const intptr_t kNumTemps = 1; | 4179 const intptr_t kNumTemps = 1; |
4180 LocationSummary* summary = | 4180 LocationSummary* summary = |
4181 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4181 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4182 summary->set_in(0, Location::RequiresFpuRegister()); | 4182 summary->set_in(0, Location::RequiresFpuRegister()); |
4183 summary->set_out(0, Location::RequiresFpuRegister()); | 4183 summary->set_out(0, Location::RequiresFpuRegister()); |
4184 summary->set_temp(0, Location::RequiresFpuRegister()); | 4184 summary->set_temp(0, Location::RequiresFpuRegister()); |
4185 return summary; | 4185 return summary; |
4186 } | 4186 } |
4187 | 4187 |
4188 | 4188 |
4189 void Float32x4SqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4189 void Float32x4SqrtInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4190 const QRegister left = locs()->in(0).fpu_reg(); | 4190 const QRegister left = locs()->in(0).fpu_reg(); |
4191 const QRegister result = locs()->out(0).fpu_reg(); | 4191 const QRegister result = locs()->out(0).fpu_reg(); |
(...skipping 11 matching lines...) Expand all Loading... |
4203 break; | 4203 break; |
4204 default: UNREACHABLE(); | 4204 default: UNREACHABLE(); |
4205 } | 4205 } |
4206 } | 4206 } |
4207 | 4207 |
4208 | 4208 |
4209 LocationSummary* Float32x4ScaleInstr::MakeLocationSummary(bool opt) const { | 4209 LocationSummary* Float32x4ScaleInstr::MakeLocationSummary(bool opt) const { |
4210 const intptr_t kNumInputs = 2; | 4210 const intptr_t kNumInputs = 2; |
4211 const intptr_t kNumTemps = 0; | 4211 const intptr_t kNumTemps = 0; |
4212 LocationSummary* summary = | 4212 LocationSummary* summary = |
4213 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4213 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4214 summary->set_in(0, Location::RequiresFpuRegister()); | 4214 summary->set_in(0, Location::RequiresFpuRegister()); |
4215 summary->set_in(1, Location::RequiresFpuRegister()); | 4215 summary->set_in(1, Location::RequiresFpuRegister()); |
4216 summary->set_out(0, Location::RequiresFpuRegister()); | 4216 summary->set_out(0, Location::RequiresFpuRegister()); |
4217 return summary; | 4217 return summary; |
4218 } | 4218 } |
4219 | 4219 |
4220 | 4220 |
4221 void Float32x4ScaleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4221 void Float32x4ScaleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4222 const QRegister left = locs()->in(0).fpu_reg(); | 4222 const QRegister left = locs()->in(0).fpu_reg(); |
4223 const QRegister right = locs()->in(1).fpu_reg(); | 4223 const QRegister right = locs()->in(1).fpu_reg(); |
4224 const QRegister result = locs()->out(0).fpu_reg(); | 4224 const QRegister result = locs()->out(0).fpu_reg(); |
4225 | 4225 |
4226 switch (op_kind()) { | 4226 switch (op_kind()) { |
4227 case MethodRecognizer::kFloat32x4Scale: | 4227 case MethodRecognizer::kFloat32x4Scale: |
4228 __ vcvtsd(STMP, EvenDRegisterOf(left)); | 4228 __ vcvtsd(STMP, EvenDRegisterOf(left)); |
4229 __ vdup(kWord, result, DTMP, 0); | 4229 __ vdup(kWord, result, DTMP, 0); |
4230 __ vmulqs(result, result, right); | 4230 __ vmulqs(result, result, right); |
4231 break; | 4231 break; |
4232 default: UNREACHABLE(); | 4232 default: UNREACHABLE(); |
4233 } | 4233 } |
4234 } | 4234 } |
4235 | 4235 |
4236 | 4236 |
4237 LocationSummary* Float32x4ZeroArgInstr::MakeLocationSummary(bool opt) const { | 4237 LocationSummary* Float32x4ZeroArgInstr::MakeLocationSummary(bool opt) const { |
4238 const intptr_t kNumInputs = 1; | 4238 const intptr_t kNumInputs = 1; |
4239 const intptr_t kNumTemps = 0; | 4239 const intptr_t kNumTemps = 0; |
4240 LocationSummary* summary = | 4240 LocationSummary* summary = |
4241 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4241 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4242 summary->set_in(0, Location::RequiresFpuRegister()); | 4242 summary->set_in(0, Location::RequiresFpuRegister()); |
4243 summary->set_out(0, Location::RequiresFpuRegister()); | 4243 summary->set_out(0, Location::RequiresFpuRegister()); |
4244 return summary; | 4244 return summary; |
4245 } | 4245 } |
4246 | 4246 |
4247 | 4247 |
4248 void Float32x4ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4248 void Float32x4ZeroArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4249 const QRegister left = locs()->in(0).fpu_reg(); | 4249 const QRegister left = locs()->in(0).fpu_reg(); |
4250 const QRegister result = locs()->out(0).fpu_reg(); | 4250 const QRegister result = locs()->out(0).fpu_reg(); |
4251 | 4251 |
4252 switch (op_kind()) { | 4252 switch (op_kind()) { |
4253 case MethodRecognizer::kFloat32x4Negate: | 4253 case MethodRecognizer::kFloat32x4Negate: |
4254 __ vnegqs(result, left); | 4254 __ vnegqs(result, left); |
4255 break; | 4255 break; |
4256 case MethodRecognizer::kFloat32x4Absolute: | 4256 case MethodRecognizer::kFloat32x4Absolute: |
4257 __ vabsqs(result, left); | 4257 __ vabsqs(result, left); |
4258 break; | 4258 break; |
4259 default: UNREACHABLE(); | 4259 default: UNREACHABLE(); |
4260 } | 4260 } |
4261 } | 4261 } |
4262 | 4262 |
4263 | 4263 |
4264 LocationSummary* Float32x4ClampInstr::MakeLocationSummary(bool opt) const { | 4264 LocationSummary* Float32x4ClampInstr::MakeLocationSummary(bool opt) const { |
4265 const intptr_t kNumInputs = 3; | 4265 const intptr_t kNumInputs = 3; |
4266 const intptr_t kNumTemps = 0; | 4266 const intptr_t kNumTemps = 0; |
4267 LocationSummary* summary = | 4267 LocationSummary* summary = |
4268 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4268 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4269 summary->set_in(0, Location::RequiresFpuRegister()); | 4269 summary->set_in(0, Location::RequiresFpuRegister()); |
4270 summary->set_in(1, Location::RequiresFpuRegister()); | 4270 summary->set_in(1, Location::RequiresFpuRegister()); |
4271 summary->set_in(2, Location::RequiresFpuRegister()); | 4271 summary->set_in(2, Location::RequiresFpuRegister()); |
4272 summary->set_out(0, Location::RequiresFpuRegister()); | 4272 summary->set_out(0, Location::RequiresFpuRegister()); |
4273 return summary; | 4273 return summary; |
4274 } | 4274 } |
4275 | 4275 |
4276 | 4276 |
4277 void Float32x4ClampInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4277 void Float32x4ClampInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4278 const QRegister left = locs()->in(0).fpu_reg(); | 4278 const QRegister left = locs()->in(0).fpu_reg(); |
4279 const QRegister lower = locs()->in(1).fpu_reg(); | 4279 const QRegister lower = locs()->in(1).fpu_reg(); |
4280 const QRegister upper = locs()->in(2).fpu_reg(); | 4280 const QRegister upper = locs()->in(2).fpu_reg(); |
4281 const QRegister result = locs()->out(0).fpu_reg(); | 4281 const QRegister result = locs()->out(0).fpu_reg(); |
4282 __ vminqs(result, left, upper); | 4282 __ vminqs(result, left, upper); |
4283 __ vmaxqs(result, result, lower); | 4283 __ vmaxqs(result, result, lower); |
4284 } | 4284 } |
4285 | 4285 |
4286 | 4286 |
4287 LocationSummary* Float32x4WithInstr::MakeLocationSummary(bool opt) const { | 4287 LocationSummary* Float32x4WithInstr::MakeLocationSummary(bool opt) const { |
4288 const intptr_t kNumInputs = 2; | 4288 const intptr_t kNumInputs = 2; |
4289 const intptr_t kNumTemps = 0; | 4289 const intptr_t kNumTemps = 0; |
4290 LocationSummary* summary = | 4290 LocationSummary* summary = |
4291 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4291 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4292 summary->set_in(0, Location::RequiresFpuRegister()); | 4292 summary->set_in(0, Location::RequiresFpuRegister()); |
4293 summary->set_in(1, Location::RequiresFpuRegister()); | 4293 summary->set_in(1, Location::RequiresFpuRegister()); |
4294 // Low (< 7) Q registers are needed for the vmovs instruction. | 4294 // Low (< 7) Q registers are needed for the vmovs instruction. |
4295 summary->set_out(0, Location::FpuRegisterLocation(Q6)); | 4295 summary->set_out(0, Location::FpuRegisterLocation(Q6)); |
4296 return summary; | 4296 return summary; |
4297 } | 4297 } |
4298 | 4298 |
4299 | 4299 |
4300 void Float32x4WithInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4300 void Float32x4WithInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4301 const QRegister replacement = locs()->in(0).fpu_reg(); | 4301 const QRegister replacement = locs()->in(0).fpu_reg(); |
(...skipping 27 matching lines...) Expand all Loading... |
4329 break; | 4329 break; |
4330 default: UNREACHABLE(); | 4330 default: UNREACHABLE(); |
4331 } | 4331 } |
4332 } | 4332 } |
4333 | 4333 |
4334 | 4334 |
4335 LocationSummary* Float32x4ToInt32x4Instr::MakeLocationSummary(bool opt) const { | 4335 LocationSummary* Float32x4ToInt32x4Instr::MakeLocationSummary(bool opt) const { |
4336 const intptr_t kNumInputs = 1; | 4336 const intptr_t kNumInputs = 1; |
4337 const intptr_t kNumTemps = 0; | 4337 const intptr_t kNumTemps = 0; |
4338 LocationSummary* summary = | 4338 LocationSummary* summary = |
4339 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4339 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4340 summary->set_in(0, Location::RequiresFpuRegister()); | 4340 summary->set_in(0, Location::RequiresFpuRegister()); |
4341 summary->set_out(0, Location::RequiresFpuRegister()); | 4341 summary->set_out(0, Location::RequiresFpuRegister()); |
4342 return summary; | 4342 return summary; |
4343 } | 4343 } |
4344 | 4344 |
4345 | 4345 |
4346 void Float32x4ToInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4346 void Float32x4ToInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4347 const QRegister value = locs()->in(0).fpu_reg(); | 4347 const QRegister value = locs()->in(0).fpu_reg(); |
4348 const QRegister result = locs()->out(0).fpu_reg(); | 4348 const QRegister result = locs()->out(0).fpu_reg(); |
4349 | 4349 |
4350 if (value != result) { | 4350 if (value != result) { |
4351 __ vmovq(result, value); | 4351 __ vmovq(result, value); |
4352 } | 4352 } |
4353 } | 4353 } |
4354 | 4354 |
4355 | 4355 |
4356 LocationSummary* Simd64x2ShuffleInstr::MakeLocationSummary(bool opt) const { | 4356 LocationSummary* Simd64x2ShuffleInstr::MakeLocationSummary(bool opt) const { |
4357 const intptr_t kNumInputs = 1; | 4357 const intptr_t kNumInputs = 1; |
4358 const intptr_t kNumTemps = 0; | 4358 const intptr_t kNumTemps = 0; |
4359 LocationSummary* summary = | 4359 LocationSummary* summary = |
4360 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4360 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4361 summary->set_in(0, Location::RequiresFpuRegister()); | 4361 summary->set_in(0, Location::RequiresFpuRegister()); |
4362 summary->set_out(0, Location::RequiresFpuRegister()); | 4362 summary->set_out(0, Location::RequiresFpuRegister()); |
4363 return summary; | 4363 return summary; |
4364 } | 4364 } |
4365 | 4365 |
4366 | 4366 |
4367 void Simd64x2ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4367 void Simd64x2ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4368 const QRegister value = locs()->in(0).fpu_reg(); | 4368 const QRegister value = locs()->in(0).fpu_reg(); |
4369 | 4369 |
4370 const DRegister dvalue0 = EvenDRegisterOf(value); | 4370 const DRegister dvalue0 = EvenDRegisterOf(value); |
(...skipping 12 matching lines...) Expand all Loading... |
4383 break; | 4383 break; |
4384 default: UNREACHABLE(); | 4384 default: UNREACHABLE(); |
4385 } | 4385 } |
4386 } | 4386 } |
4387 | 4387 |
4388 | 4388 |
4389 LocationSummary* Float64x2ZeroInstr::MakeLocationSummary(bool opt) const { | 4389 LocationSummary* Float64x2ZeroInstr::MakeLocationSummary(bool opt) const { |
4390 const intptr_t kNumInputs = 0; | 4390 const intptr_t kNumInputs = 0; |
4391 const intptr_t kNumTemps = 0; | 4391 const intptr_t kNumTemps = 0; |
4392 LocationSummary* summary = | 4392 LocationSummary* summary = |
4393 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4393 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4394 summary->set_out(0, Location::RequiresFpuRegister()); | 4394 summary->set_out(0, Location::RequiresFpuRegister()); |
4395 return summary; | 4395 return summary; |
4396 } | 4396 } |
4397 | 4397 |
4398 | 4398 |
4399 void Float64x2ZeroInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4399 void Float64x2ZeroInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4400 const QRegister q = locs()->out(0).fpu_reg(); | 4400 const QRegister q = locs()->out(0).fpu_reg(); |
4401 __ veorq(q, q, q); | 4401 __ veorq(q, q, q); |
4402 } | 4402 } |
4403 | 4403 |
4404 | 4404 |
4405 LocationSummary* Float64x2SplatInstr::MakeLocationSummary(bool opt) const { | 4405 LocationSummary* Float64x2SplatInstr::MakeLocationSummary(bool opt) const { |
4406 const intptr_t kNumInputs = 1; | 4406 const intptr_t kNumInputs = 1; |
4407 const intptr_t kNumTemps = 0; | 4407 const intptr_t kNumTemps = 0; |
4408 LocationSummary* summary = | 4408 LocationSummary* summary = |
4409 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4409 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4410 summary->set_in(0, Location::RequiresFpuRegister()); | 4410 summary->set_in(0, Location::RequiresFpuRegister()); |
4411 summary->set_out(0, Location::RequiresFpuRegister()); | 4411 summary->set_out(0, Location::RequiresFpuRegister()); |
4412 return summary; | 4412 return summary; |
4413 } | 4413 } |
4414 | 4414 |
4415 | 4415 |
4416 void Float64x2SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4416 void Float64x2SplatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4417 const QRegister value = locs()->in(0).fpu_reg(); | 4417 const QRegister value = locs()->in(0).fpu_reg(); |
4418 | 4418 |
4419 const DRegister dvalue = EvenDRegisterOf(value); | 4419 const DRegister dvalue = EvenDRegisterOf(value); |
4420 | 4420 |
4421 const QRegister result = locs()->out(0).fpu_reg(); | 4421 const QRegister result = locs()->out(0).fpu_reg(); |
4422 | 4422 |
4423 const DRegister dresult0 = EvenDRegisterOf(result); | 4423 const DRegister dresult0 = EvenDRegisterOf(result); |
4424 const DRegister dresult1 = OddDRegisterOf(result); | 4424 const DRegister dresult1 = OddDRegisterOf(result); |
4425 | 4425 |
4426 // Splat across all lanes. | 4426 // Splat across all lanes. |
4427 __ vmovd(dresult0, dvalue); | 4427 __ vmovd(dresult0, dvalue); |
4428 __ vmovd(dresult1, dvalue); | 4428 __ vmovd(dresult1, dvalue); |
4429 } | 4429 } |
4430 | 4430 |
4431 | 4431 |
4432 LocationSummary* Float64x2ConstructorInstr::MakeLocationSummary( | 4432 LocationSummary* Float64x2ConstructorInstr::MakeLocationSummary( |
4433 bool opt) const { | 4433 bool opt) const { |
4434 const intptr_t kNumInputs = 2; | 4434 const intptr_t kNumInputs = 2; |
4435 const intptr_t kNumTemps = 0; | 4435 const intptr_t kNumTemps = 0; |
4436 LocationSummary* summary = | 4436 LocationSummary* summary = |
4437 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4437 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4438 summary->set_in(0, Location::RequiresFpuRegister()); | 4438 summary->set_in(0, Location::RequiresFpuRegister()); |
4439 summary->set_in(1, Location::RequiresFpuRegister()); | 4439 summary->set_in(1, Location::RequiresFpuRegister()); |
4440 summary->set_out(0, Location::RequiresFpuRegister()); | 4440 summary->set_out(0, Location::RequiresFpuRegister()); |
4441 return summary; | 4441 return summary; |
4442 } | 4442 } |
4443 | 4443 |
4444 | 4444 |
4445 void Float64x2ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4445 void Float64x2ConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4446 const QRegister q0 = locs()->in(0).fpu_reg(); | 4446 const QRegister q0 = locs()->in(0).fpu_reg(); |
4447 const QRegister q1 = locs()->in(1).fpu_reg(); | 4447 const QRegister q1 = locs()->in(1).fpu_reg(); |
4448 const QRegister r = locs()->out(0).fpu_reg(); | 4448 const QRegister r = locs()->out(0).fpu_reg(); |
4449 | 4449 |
4450 const DRegister d0 = EvenDRegisterOf(q0); | 4450 const DRegister d0 = EvenDRegisterOf(q0); |
4451 const DRegister d1 = EvenDRegisterOf(q1); | 4451 const DRegister d1 = EvenDRegisterOf(q1); |
4452 | 4452 |
4453 const DRegister dr0 = EvenDRegisterOf(r); | 4453 const DRegister dr0 = EvenDRegisterOf(r); |
4454 const DRegister dr1 = OddDRegisterOf(r); | 4454 const DRegister dr1 = OddDRegisterOf(r); |
4455 | 4455 |
4456 __ vmovd(dr0, d0); | 4456 __ vmovd(dr0, d0); |
4457 __ vmovd(dr1, d1); | 4457 __ vmovd(dr1, d1); |
4458 } | 4458 } |
4459 | 4459 |
4460 | 4460 |
4461 LocationSummary* Float64x2ToFloat32x4Instr::MakeLocationSummary( | 4461 LocationSummary* Float64x2ToFloat32x4Instr::MakeLocationSummary( |
4462 bool opt) const { | 4462 bool opt) const { |
4463 const intptr_t kNumInputs = 1; | 4463 const intptr_t kNumInputs = 1; |
4464 const intptr_t kNumTemps = 0; | 4464 const intptr_t kNumTemps = 0; |
4465 LocationSummary* summary = | 4465 LocationSummary* summary = |
4466 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4466 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4467 summary->set_in(0, Location::RequiresFpuRegister()); | 4467 summary->set_in(0, Location::RequiresFpuRegister()); |
4468 // Low (< 7) Q registers are needed for the vcvtsd instruction. | 4468 // Low (< 7) Q registers are needed for the vcvtsd instruction. |
4469 summary->set_out(0, Location::FpuRegisterLocation(Q6)); | 4469 summary->set_out(0, Location::FpuRegisterLocation(Q6)); |
4470 return summary; | 4470 return summary; |
4471 } | 4471 } |
4472 | 4472 |
4473 | 4473 |
4474 void Float64x2ToFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4474 void Float64x2ToFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4475 const QRegister q = locs()->in(0).fpu_reg(); | 4475 const QRegister q = locs()->in(0).fpu_reg(); |
4476 const QRegister r = locs()->out(0).fpu_reg(); | 4476 const QRegister r = locs()->out(0).fpu_reg(); |
(...skipping 10 matching lines...) Expand all Loading... |
4487 // Set Y lane. | 4487 // Set Y lane. |
4488 __ vcvtsd(OddSRegisterOf(dr0), dq1); | 4488 __ vcvtsd(OddSRegisterOf(dr0), dq1); |
4489 } | 4489 } |
4490 | 4490 |
4491 | 4491 |
4492 LocationSummary* Float32x4ToFloat64x2Instr::MakeLocationSummary( | 4492 LocationSummary* Float32x4ToFloat64x2Instr::MakeLocationSummary( |
4493 bool opt) const { | 4493 bool opt) const { |
4494 const intptr_t kNumInputs = 1; | 4494 const intptr_t kNumInputs = 1; |
4495 const intptr_t kNumTemps = 0; | 4495 const intptr_t kNumTemps = 0; |
4496 LocationSummary* summary = | 4496 LocationSummary* summary = |
4497 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4497 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4498 summary->set_in(0, Location::RequiresFpuRegister()); | 4498 summary->set_in(0, Location::RequiresFpuRegister()); |
4499 // Low (< 7) Q registers are needed for the vcvtsd instruction. | 4499 // Low (< 7) Q registers are needed for the vcvtsd instruction. |
4500 summary->set_out(0, Location::FpuRegisterLocation(Q6)); | 4500 summary->set_out(0, Location::FpuRegisterLocation(Q6)); |
4501 return summary; | 4501 return summary; |
4502 } | 4502 } |
4503 | 4503 |
4504 | 4504 |
4505 void Float32x4ToFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4505 void Float32x4ToFloat64x2Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4506 const QRegister q = locs()->in(0).fpu_reg(); | 4506 const QRegister q = locs()->in(0).fpu_reg(); |
4507 const QRegister r = locs()->out(0).fpu_reg(); | 4507 const QRegister r = locs()->out(0).fpu_reg(); |
4508 | 4508 |
4509 const DRegister dq0 = EvenDRegisterOf(q); | 4509 const DRegister dq0 = EvenDRegisterOf(q); |
4510 | 4510 |
4511 const DRegister dr0 = EvenDRegisterOf(r); | 4511 const DRegister dr0 = EvenDRegisterOf(r); |
4512 const DRegister dr1 = OddDRegisterOf(r); | 4512 const DRegister dr1 = OddDRegisterOf(r); |
4513 | 4513 |
4514 // Set X. | 4514 // Set X. |
4515 __ vcvtds(dr0, EvenSRegisterOf(dq0)); | 4515 __ vcvtds(dr0, EvenSRegisterOf(dq0)); |
4516 // Set Y. | 4516 // Set Y. |
4517 __ vcvtds(dr1, OddSRegisterOf(dq0)); | 4517 __ vcvtds(dr1, OddSRegisterOf(dq0)); |
4518 } | 4518 } |
4519 | 4519 |
4520 | 4520 |
4521 LocationSummary* Float64x2ZeroArgInstr::MakeLocationSummary(bool opt) const { | 4521 LocationSummary* Float64x2ZeroArgInstr::MakeLocationSummary(bool opt) const { |
4522 const intptr_t kNumInputs = 1; | 4522 const intptr_t kNumInputs = 1; |
4523 const intptr_t kNumTemps = 0; | 4523 const intptr_t kNumTemps = 0; |
4524 LocationSummary* summary = | 4524 LocationSummary* summary = |
4525 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4525 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4526 | 4526 |
4527 if (representation() == kTagged) { | 4527 if (representation() == kTagged) { |
4528 ASSERT(op_kind() == MethodRecognizer::kFloat64x2GetSignMask); | 4528 ASSERT(op_kind() == MethodRecognizer::kFloat64x2GetSignMask); |
4529 // Grabbing the S components means we need a low (< 7) Q. | 4529 // Grabbing the S components means we need a low (< 7) Q. |
4530 summary->set_in(0, Location::FpuRegisterLocation(Q6)); | 4530 summary->set_in(0, Location::FpuRegisterLocation(Q6)); |
4531 summary->set_out(0, Location::RequiresRegister()); | 4531 summary->set_out(0, Location::RequiresRegister()); |
4532 summary->AddTemp(Location::RequiresRegister()); | 4532 summary->AddTemp(Location::RequiresRegister()); |
4533 } else { | 4533 } else { |
4534 summary->set_in(0, Location::RequiresFpuRegister()); | 4534 summary->set_in(0, Location::RequiresFpuRegister()); |
4535 summary->set_out(0, Location::RequiresFpuRegister()); | 4535 summary->set_out(0, Location::RequiresFpuRegister()); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4582 break; | 4582 break; |
4583 default: UNREACHABLE(); | 4583 default: UNREACHABLE(); |
4584 } | 4584 } |
4585 } | 4585 } |
4586 | 4586 |
4587 | 4587 |
4588 LocationSummary* Float64x2OneArgInstr::MakeLocationSummary(bool opt) const { | 4588 LocationSummary* Float64x2OneArgInstr::MakeLocationSummary(bool opt) const { |
4589 const intptr_t kNumInputs = 2; | 4589 const intptr_t kNumInputs = 2; |
4590 const intptr_t kNumTemps = 0; | 4590 const intptr_t kNumTemps = 0; |
4591 LocationSummary* summary = | 4591 LocationSummary* summary = |
4592 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4592 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4593 summary->set_in(0, Location::RequiresFpuRegister()); | 4593 summary->set_in(0, Location::RequiresFpuRegister()); |
4594 summary->set_in(1, Location::RequiresFpuRegister()); | 4594 summary->set_in(1, Location::RequiresFpuRegister()); |
4595 summary->set_out(0, Location::SameAsFirstInput()); | 4595 summary->set_out(0, Location::SameAsFirstInput()); |
4596 return summary; | 4596 return summary; |
4597 } | 4597 } |
4598 | 4598 |
4599 | 4599 |
4600 void Float64x2OneArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4600 void Float64x2OneArgInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4601 const QRegister left = locs()->in(0).fpu_reg(); | 4601 const QRegister left = locs()->in(0).fpu_reg(); |
4602 const DRegister left0 = EvenDRegisterOf(left); | 4602 const DRegister left0 = EvenDRegisterOf(left); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4655 default: UNREACHABLE(); | 4655 default: UNREACHABLE(); |
4656 } | 4656 } |
4657 } | 4657 } |
4658 | 4658 |
4659 | 4659 |
4660 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( | 4660 LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary( |
4661 bool opt) const { | 4661 bool opt) const { |
4662 const intptr_t kNumInputs = 4; | 4662 const intptr_t kNumInputs = 4; |
4663 const intptr_t kNumTemps = 1; | 4663 const intptr_t kNumTemps = 1; |
4664 LocationSummary* summary = | 4664 LocationSummary* summary = |
4665 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4665 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4666 summary->set_in(0, Location::RequiresRegister()); | 4666 summary->set_in(0, Location::RequiresRegister()); |
4667 summary->set_in(1, Location::RequiresRegister()); | 4667 summary->set_in(1, Location::RequiresRegister()); |
4668 summary->set_in(2, Location::RequiresRegister()); | 4668 summary->set_in(2, Location::RequiresRegister()); |
4669 summary->set_in(3, Location::RequiresRegister()); | 4669 summary->set_in(3, Location::RequiresRegister()); |
4670 summary->set_temp(0, Location::RequiresRegister()); | 4670 summary->set_temp(0, Location::RequiresRegister()); |
4671 // Low (< 7) Q register needed for the vmovsr instruction. | 4671 // Low (< 7) Q register needed for the vmovsr instruction. |
4672 summary->set_out(0, Location::FpuRegisterLocation(Q6)); | 4672 summary->set_out(0, Location::FpuRegisterLocation(Q6)); |
4673 return summary; | 4673 return summary; |
4674 } | 4674 } |
4675 | 4675 |
(...skipping 26 matching lines...) Expand all Loading... |
4702 | 4702 |
4703 __ CompareObject(v3, Bool::True()); | 4703 __ CompareObject(v3, Bool::True()); |
4704 __ vmovsr(sresult3, temp, EQ); | 4704 __ vmovsr(sresult3, temp, EQ); |
4705 } | 4705 } |
4706 | 4706 |
4707 | 4707 |
4708 LocationSummary* Int32x4GetFlagInstr::MakeLocationSummary(bool opt) const { | 4708 LocationSummary* Int32x4GetFlagInstr::MakeLocationSummary(bool opt) const { |
4709 const intptr_t kNumInputs = 1; | 4709 const intptr_t kNumInputs = 1; |
4710 const intptr_t kNumTemps = 0; | 4710 const intptr_t kNumTemps = 0; |
4711 LocationSummary* summary = | 4711 LocationSummary* summary = |
4712 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4712 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4713 // Low (< 7) Q registers are needed for the vmovrs instruction. | 4713 // Low (< 7) Q registers are needed for the vmovrs instruction. |
4714 summary->set_in(0, Location::FpuRegisterLocation(Q6)); | 4714 summary->set_in(0, Location::FpuRegisterLocation(Q6)); |
4715 summary->set_out(0, Location::RequiresRegister()); | 4715 summary->set_out(0, Location::RequiresRegister()); |
4716 return summary; | 4716 return summary; |
4717 } | 4717 } |
4718 | 4718 |
4719 | 4719 |
4720 void Int32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4720 void Int32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4721 const QRegister value = locs()->in(0).fpu_reg(); | 4721 const QRegister value = locs()->in(0).fpu_reg(); |
4722 const Register result = locs()->out(0).reg(); | 4722 const Register result = locs()->out(0).reg(); |
(...skipping 24 matching lines...) Expand all Loading... |
4747 __ tst(result, ShifterOperand(result)); | 4747 __ tst(result, ShifterOperand(result)); |
4748 __ LoadObject(result, Bool::True(), NE); | 4748 __ LoadObject(result, Bool::True(), NE); |
4749 __ LoadObject(result, Bool::False(), EQ); | 4749 __ LoadObject(result, Bool::False(), EQ); |
4750 } | 4750 } |
4751 | 4751 |
4752 | 4752 |
4753 LocationSummary* Int32x4SelectInstr::MakeLocationSummary(bool opt) const { | 4753 LocationSummary* Int32x4SelectInstr::MakeLocationSummary(bool opt) const { |
4754 const intptr_t kNumInputs = 3; | 4754 const intptr_t kNumInputs = 3; |
4755 const intptr_t kNumTemps = 1; | 4755 const intptr_t kNumTemps = 1; |
4756 LocationSummary* summary = | 4756 LocationSummary* summary = |
4757 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4757 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4758 summary->set_in(0, Location::RequiresFpuRegister()); | 4758 summary->set_in(0, Location::RequiresFpuRegister()); |
4759 summary->set_in(1, Location::RequiresFpuRegister()); | 4759 summary->set_in(1, Location::RequiresFpuRegister()); |
4760 summary->set_in(2, Location::RequiresFpuRegister()); | 4760 summary->set_in(2, Location::RequiresFpuRegister()); |
4761 summary->set_temp(0, Location::RequiresFpuRegister()); | 4761 summary->set_temp(0, Location::RequiresFpuRegister()); |
4762 summary->set_out(0, Location::RequiresFpuRegister()); | 4762 summary->set_out(0, Location::RequiresFpuRegister()); |
4763 return summary; | 4763 return summary; |
4764 } | 4764 } |
4765 | 4765 |
4766 | 4766 |
4767 void Int32x4SelectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4767 void Int32x4SelectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
(...skipping 13 matching lines...) Expand all Loading... |
4781 __ vandq(temp, temp, falseValue); | 4781 __ vandq(temp, temp, falseValue); |
4782 // out = mask | temp. | 4782 // out = mask | temp. |
4783 __ vorrq(out, mask, temp); | 4783 __ vorrq(out, mask, temp); |
4784 } | 4784 } |
4785 | 4785 |
4786 | 4786 |
4787 LocationSummary* Int32x4SetFlagInstr::MakeLocationSummary(bool opt) const { | 4787 LocationSummary* Int32x4SetFlagInstr::MakeLocationSummary(bool opt) const { |
4788 const intptr_t kNumInputs = 2; | 4788 const intptr_t kNumInputs = 2; |
4789 const intptr_t kNumTemps = 0; | 4789 const intptr_t kNumTemps = 0; |
4790 LocationSummary* summary = | 4790 LocationSummary* summary = |
4791 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4791 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4792 summary->set_in(0, Location::RequiresFpuRegister()); | 4792 summary->set_in(0, Location::RequiresFpuRegister()); |
4793 summary->set_in(1, Location::RequiresRegister()); | 4793 summary->set_in(1, Location::RequiresRegister()); |
4794 // Low (< 7) Q register needed for the vmovsr instruction. | 4794 // Low (< 7) Q register needed for the vmovsr instruction. |
4795 summary->set_out(0, Location::FpuRegisterLocation(Q6)); | 4795 summary->set_out(0, Location::FpuRegisterLocation(Q6)); |
4796 return summary; | 4796 return summary; |
4797 } | 4797 } |
4798 | 4798 |
4799 | 4799 |
4800 void Int32x4SetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4800 void Int32x4SetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4801 const QRegister mask = locs()->in(0).fpu_reg(); | 4801 const QRegister mask = locs()->in(0).fpu_reg(); |
(...skipping 29 matching lines...) Expand all Loading... |
4831 break; | 4831 break; |
4832 default: UNREACHABLE(); | 4832 default: UNREACHABLE(); |
4833 } | 4833 } |
4834 } | 4834 } |
4835 | 4835 |
4836 | 4836 |
4837 LocationSummary* Int32x4ToFloat32x4Instr::MakeLocationSummary(bool opt) const { | 4837 LocationSummary* Int32x4ToFloat32x4Instr::MakeLocationSummary(bool opt) const { |
4838 const intptr_t kNumInputs = 1; | 4838 const intptr_t kNumInputs = 1; |
4839 const intptr_t kNumTemps = 0; | 4839 const intptr_t kNumTemps = 0; |
4840 LocationSummary* summary = | 4840 LocationSummary* summary = |
4841 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4841 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4842 summary->set_in(0, Location::RequiresFpuRegister()); | 4842 summary->set_in(0, Location::RequiresFpuRegister()); |
4843 summary->set_out(0, Location::RequiresFpuRegister()); | 4843 summary->set_out(0, Location::RequiresFpuRegister()); |
4844 return summary; | 4844 return summary; |
4845 } | 4845 } |
4846 | 4846 |
4847 | 4847 |
4848 void Int32x4ToFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4848 void Int32x4ToFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4849 const QRegister value = locs()->in(0).fpu_reg(); | 4849 const QRegister value = locs()->in(0).fpu_reg(); |
4850 const QRegister result = locs()->out(0).fpu_reg(); | 4850 const QRegister result = locs()->out(0).fpu_reg(); |
4851 | 4851 |
4852 if (value != result) { | 4852 if (value != result) { |
4853 __ vmovq(result, value); | 4853 __ vmovq(result, value); |
4854 } | 4854 } |
4855 } | 4855 } |
4856 | 4856 |
4857 | 4857 |
4858 LocationSummary* BinaryInt32x4OpInstr::MakeLocationSummary(bool opt) const { | 4858 LocationSummary* BinaryInt32x4OpInstr::MakeLocationSummary(bool opt) const { |
4859 const intptr_t kNumInputs = 2; | 4859 const intptr_t kNumInputs = 2; |
4860 const intptr_t kNumTemps = 0; | 4860 const intptr_t kNumTemps = 0; |
4861 LocationSummary* summary = | 4861 LocationSummary* summary = |
4862 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4862 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4863 summary->set_in(0, Location::RequiresFpuRegister()); | 4863 summary->set_in(0, Location::RequiresFpuRegister()); |
4864 summary->set_in(1, Location::RequiresFpuRegister()); | 4864 summary->set_in(1, Location::RequiresFpuRegister()); |
4865 summary->set_out(0, Location::RequiresFpuRegister()); | 4865 summary->set_out(0, Location::RequiresFpuRegister()); |
4866 return summary; | 4866 return summary; |
4867 } | 4867 } |
4868 | 4868 |
4869 | 4869 |
4870 void BinaryInt32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4870 void BinaryInt32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4871 const QRegister left = locs()->in(0).fpu_reg(); | 4871 const QRegister left = locs()->in(0).fpu_reg(); |
4872 const QRegister right = locs()->in(1).fpu_reg(); | 4872 const QRegister right = locs()->in(1).fpu_reg(); |
(...skipping 20 matching lines...) Expand all Loading... |
4893 default: UNREACHABLE(); | 4893 default: UNREACHABLE(); |
4894 } | 4894 } |
4895 } | 4895 } |
4896 | 4896 |
4897 | 4897 |
4898 LocationSummary* MathUnaryInstr::MakeLocationSummary(bool opt) const { | 4898 LocationSummary* MathUnaryInstr::MakeLocationSummary(bool opt) const { |
4899 if ((kind() == MathUnaryInstr::kSin) || (kind() == MathUnaryInstr::kCos)) { | 4899 if ((kind() == MathUnaryInstr::kSin) || (kind() == MathUnaryInstr::kCos)) { |
4900 const intptr_t kNumInputs = 1; | 4900 const intptr_t kNumInputs = 1; |
4901 const intptr_t kNumTemps = 0; | 4901 const intptr_t kNumTemps = 0; |
4902 LocationSummary* summary = | 4902 LocationSummary* summary = |
4903 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 4903 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kCall); |
4904 summary->set_in(0, Location::FpuRegisterLocation(Q0)); | 4904 summary->set_in(0, Location::FpuRegisterLocation(Q0)); |
4905 summary->set_out(0, Location::FpuRegisterLocation(Q0)); | 4905 summary->set_out(0, Location::FpuRegisterLocation(Q0)); |
4906 if (!TargetCPUFeatures::hardfp_supported()) { | 4906 if (!TargetCPUFeatures::hardfp_supported()) { |
4907 summary->AddTemp(Location::RegisterLocation(R0)); | 4907 summary->AddTemp(Location::RegisterLocation(R0)); |
4908 summary->AddTemp(Location::RegisterLocation(R1)); | 4908 summary->AddTemp(Location::RegisterLocation(R1)); |
4909 summary->AddTemp(Location::RegisterLocation(R2)); | 4909 summary->AddTemp(Location::RegisterLocation(R2)); |
4910 summary->AddTemp(Location::RegisterLocation(R3)); | 4910 summary->AddTemp(Location::RegisterLocation(R3)); |
4911 } | 4911 } |
4912 return summary; | 4912 return summary; |
4913 } | 4913 } |
4914 ASSERT((kind() == MathUnaryInstr::kSqrt) || | 4914 ASSERT((kind() == MathUnaryInstr::kSqrt) || |
4915 (kind() == MathUnaryInstr::kDoubleSquare)); | 4915 (kind() == MathUnaryInstr::kDoubleSquare)); |
4916 const intptr_t kNumInputs = 1; | 4916 const intptr_t kNumInputs = 1; |
4917 const intptr_t kNumTemps = 0; | 4917 const intptr_t kNumTemps = 0; |
4918 LocationSummary* summary = | 4918 LocationSummary* summary = |
4919 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4919 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4920 summary->set_in(0, Location::RequiresFpuRegister()); | 4920 summary->set_in(0, Location::RequiresFpuRegister()); |
4921 summary->set_out(0, Location::RequiresFpuRegister()); | 4921 summary->set_out(0, Location::RequiresFpuRegister()); |
4922 return summary; | 4922 return summary; |
4923 } | 4923 } |
4924 | 4924 |
4925 | 4925 |
4926 void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4926 void MathUnaryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4927 if (kind() == MathUnaryInstr::kSqrt) { | 4927 if (kind() == MathUnaryInstr::kSqrt) { |
4928 const DRegister val = EvenDRegisterOf(locs()->in(0).fpu_reg()); | 4928 const DRegister val = EvenDRegisterOf(locs()->in(0).fpu_reg()); |
4929 const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg()); | 4929 const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg()); |
(...skipping 19 matching lines...) Expand all Loading... |
4949 } | 4949 } |
4950 } | 4950 } |
4951 } | 4951 } |
4952 | 4952 |
4953 | 4953 |
4954 LocationSummary* MathMinMaxInstr::MakeLocationSummary(bool opt) const { | 4954 LocationSummary* MathMinMaxInstr::MakeLocationSummary(bool opt) const { |
4955 if (result_cid() == kDoubleCid) { | 4955 if (result_cid() == kDoubleCid) { |
4956 const intptr_t kNumInputs = 2; | 4956 const intptr_t kNumInputs = 2; |
4957 const intptr_t kNumTemps = 1; | 4957 const intptr_t kNumTemps = 1; |
4958 LocationSummary* summary = | 4958 LocationSummary* summary = |
4959 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4959 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kNoCall); |
4960 summary->set_in(0, Location::RequiresFpuRegister()); | 4960 summary->set_in(0, Location::RequiresFpuRegister()); |
4961 summary->set_in(1, Location::RequiresFpuRegister()); | 4961 summary->set_in(1, Location::RequiresFpuRegister()); |
4962 // Reuse the left register so that code can be made shorter. | 4962 // Reuse the left register so that code can be made shorter. |
4963 summary->set_out(0, Location::SameAsFirstInput()); | 4963 summary->set_out(0, Location::SameAsFirstInput()); |
4964 summary->set_temp(0, Location::RequiresRegister()); | 4964 summary->set_temp(0, Location::RequiresRegister()); |
4965 return summary; | 4965 return summary; |
4966 } | 4966 } |
4967 ASSERT(result_cid() == kSmiCid); | 4967 ASSERT(result_cid() == kSmiCid); |
4968 const intptr_t kNumInputs = 2; | 4968 const intptr_t kNumInputs = 2; |
4969 const intptr_t kNumTemps = 0; | 4969 const intptr_t kNumTemps = 0; |
4970 LocationSummary* summary = | 4970 LocationSummary* summary = |
4971 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4971 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
4972 summary->set_in(0, Location::RequiresRegister()); | 4972 summary->set_in(0, Location::RequiresRegister()); |
4973 summary->set_in(1, Location::RequiresRegister()); | 4973 summary->set_in(1, Location::RequiresRegister()); |
4974 // Reuse the left register so that code can be made shorter. | 4974 // Reuse the left register so that code can be made shorter. |
4975 summary->set_out(0, Location::SameAsFirstInput()); | 4975 summary->set_out(0, Location::SameAsFirstInput()); |
4976 return summary; | 4976 return summary; |
4977 } | 4977 } |
4978 | 4978 |
4979 | 4979 |
4980 void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4980 void MathMinMaxInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4981 ASSERT((op_kind() == MethodRecognizer::kMathMin) || | 4981 ASSERT((op_kind() == MethodRecognizer::kMathMin) || |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5033 } else { | 5033 } else { |
5034 __ mov(result, ShifterOperand(right), LT); | 5034 __ mov(result, ShifterOperand(right), LT); |
5035 } | 5035 } |
5036 } | 5036 } |
5037 | 5037 |
5038 | 5038 |
5039 LocationSummary* UnarySmiOpInstr::MakeLocationSummary(bool opt) const { | 5039 LocationSummary* UnarySmiOpInstr::MakeLocationSummary(bool opt) const { |
5040 const intptr_t kNumInputs = 1; | 5040 const intptr_t kNumInputs = 1; |
5041 const intptr_t kNumTemps = 0; | 5041 const intptr_t kNumTemps = 0; |
5042 LocationSummary* summary = | 5042 LocationSummary* summary = |
5043 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5043 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
5044 summary->set_in(0, Location::RequiresRegister()); | 5044 summary->set_in(0, Location::RequiresRegister()); |
5045 // We make use of 3-operand instructions by not requiring result register | 5045 // We make use of 3-operand instructions by not requiring result register |
5046 // to be identical to first input register as on Intel. | 5046 // to be identical to first input register as on Intel. |
5047 summary->set_out(0, Location::RequiresRegister()); | 5047 summary->set_out(0, Location::RequiresRegister()); |
5048 return summary; | 5048 return summary; |
5049 } | 5049 } |
5050 | 5050 |
5051 | 5051 |
5052 void UnarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5052 void UnarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5053 const Register value = locs()->in(0).reg(); | 5053 const Register value = locs()->in(0).reg(); |
(...skipping 13 matching lines...) Expand all Loading... |
5067 default: | 5067 default: |
5068 UNREACHABLE(); | 5068 UNREACHABLE(); |
5069 } | 5069 } |
5070 } | 5070 } |
5071 | 5071 |
5072 | 5072 |
5073 LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary(bool opt) const { | 5073 LocationSummary* UnaryDoubleOpInstr::MakeLocationSummary(bool opt) const { |
5074 const intptr_t kNumInputs = 1; | 5074 const intptr_t kNumInputs = 1; |
5075 const intptr_t kNumTemps = 0; | 5075 const intptr_t kNumTemps = 0; |
5076 LocationSummary* summary = | 5076 LocationSummary* summary = |
5077 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5077 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
5078 summary->set_in(0, Location::RequiresFpuRegister()); | 5078 summary->set_in(0, Location::RequiresFpuRegister()); |
5079 summary->set_out(0, Location::RequiresFpuRegister()); | 5079 summary->set_out(0, Location::RequiresFpuRegister()); |
5080 return summary; | 5080 return summary; |
5081 } | 5081 } |
5082 | 5082 |
5083 | 5083 |
5084 void UnaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5084 void UnaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5085 const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg()); | 5085 const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg()); |
5086 const DRegister value = EvenDRegisterOf(locs()->in(0).fpu_reg()); | 5086 const DRegister value = EvenDRegisterOf(locs()->in(0).fpu_reg()); |
5087 __ vnegd(result, value); | 5087 __ vnegd(result, value); |
5088 } | 5088 } |
5089 | 5089 |
5090 | 5090 |
5091 LocationSummary* SmiToDoubleInstr::MakeLocationSummary(bool opt) const { | 5091 LocationSummary* SmiToDoubleInstr::MakeLocationSummary(bool opt) const { |
5092 const intptr_t kNumInputs = 1; | 5092 const intptr_t kNumInputs = 1; |
5093 const intptr_t kNumTemps = 0; | 5093 const intptr_t kNumTemps = 0; |
5094 LocationSummary* result = | 5094 LocationSummary* result = |
5095 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5095 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
5096 result->set_in(0, Location::WritableRegister()); | 5096 result->set_in(0, Location::WritableRegister()); |
5097 result->set_out(0, Location::RequiresFpuRegister()); | 5097 result->set_out(0, Location::RequiresFpuRegister()); |
5098 return result; | 5098 return result; |
5099 } | 5099 } |
5100 | 5100 |
5101 | 5101 |
5102 void SmiToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5102 void SmiToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5103 const Register value = locs()->in(0).reg(); | 5103 const Register value = locs()->in(0).reg(); |
5104 const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg()); | 5104 const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg()); |
5105 __ SmiUntag(value); | 5105 __ SmiUntag(value); |
5106 __ vmovsr(STMP, value); | 5106 __ vmovsr(STMP, value); |
5107 __ vcvtdi(result, STMP); | 5107 __ vcvtdi(result, STMP); |
5108 } | 5108 } |
5109 | 5109 |
5110 | 5110 |
5111 LocationSummary* DoubleToIntegerInstr::MakeLocationSummary(bool opt) const { | 5111 LocationSummary* DoubleToIntegerInstr::MakeLocationSummary(bool opt) const { |
5112 const intptr_t kNumInputs = 1; | 5112 const intptr_t kNumInputs = 1; |
5113 const intptr_t kNumTemps = 0; | 5113 const intptr_t kNumTemps = 0; |
5114 LocationSummary* result = | 5114 LocationSummary* result = |
5115 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 5115 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kCall); |
5116 result->set_in(0, Location::RegisterLocation(R1)); | 5116 result->set_in(0, Location::RegisterLocation(R1)); |
5117 result->set_out(0, Location::RegisterLocation(R0)); | 5117 result->set_out(0, Location::RegisterLocation(R0)); |
5118 return result; | 5118 return result; |
5119 } | 5119 } |
5120 | 5120 |
5121 | 5121 |
5122 void DoubleToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5122 void DoubleToIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5123 const Register result = locs()->out(0).reg(); | 5123 const Register result = locs()->out(0).reg(); |
5124 const Register value_obj = locs()->in(0).reg(); | 5124 const Register value_obj = locs()->in(0).reg(); |
5125 ASSERT(result == R0); | 5125 ASSERT(result == R0); |
(...skipping 30 matching lines...) Expand all Loading... |
5156 kNumberOfArguments, | 5156 kNumberOfArguments, |
5157 Object::null_array(), // No argument names., | 5157 Object::null_array(), // No argument names., |
5158 locs()); | 5158 locs()); |
5159 __ Bind(&done); | 5159 __ Bind(&done); |
5160 } | 5160 } |
5161 | 5161 |
5162 | 5162 |
5163 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(bool opt) const { | 5163 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(bool opt) const { |
5164 const intptr_t kNumInputs = 1; | 5164 const intptr_t kNumInputs = 1; |
5165 const intptr_t kNumTemps = 0; | 5165 const intptr_t kNumTemps = 0; |
5166 LocationSummary* result = new LocationSummary( | 5166 LocationSummary* result = new (isolate) LocationSummary(isolate, |
5167 kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5167 kNumInputs, kNumTemps, LocationSummary::kNoCall); |
5168 result->set_in(0, Location::RequiresFpuRegister()); | 5168 result->set_in(0, Location::RequiresFpuRegister()); |
5169 result->set_out(0, Location::RequiresRegister()); | 5169 result->set_out(0, Location::RequiresRegister()); |
5170 return result; | 5170 return result; |
5171 } | 5171 } |
5172 | 5172 |
5173 | 5173 |
5174 void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5174 void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5175 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptDoubleToSmi); | 5175 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptDoubleToSmi); |
5176 const Register result = locs()->out(0).reg(); | 5176 const Register result = locs()->out(0).reg(); |
(...skipping 21 matching lines...) Expand all Loading... |
5198 | 5198 |
5199 void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5199 void DoubleToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5200 UNIMPLEMENTED(); | 5200 UNIMPLEMENTED(); |
5201 } | 5201 } |
5202 | 5202 |
5203 | 5203 |
5204 LocationSummary* DoubleToFloatInstr::MakeLocationSummary(bool opt) const { | 5204 LocationSummary* DoubleToFloatInstr::MakeLocationSummary(bool opt) const { |
5205 const intptr_t kNumInputs = 1; | 5205 const intptr_t kNumInputs = 1; |
5206 const intptr_t kNumTemps = 0; | 5206 const intptr_t kNumTemps = 0; |
5207 LocationSummary* result = | 5207 LocationSummary* result = |
5208 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5208 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
5209 // Low (<= Q7) Q registers are needed for the conversion instructions. | 5209 // Low (<= Q7) Q registers are needed for the conversion instructions. |
5210 result->set_in(0, Location::RequiresFpuRegister()); | 5210 result->set_in(0, Location::RequiresFpuRegister()); |
5211 result->set_out(0, Location::FpuRegisterLocation(Q7)); | 5211 result->set_out(0, Location::FpuRegisterLocation(Q7)); |
5212 return result; | 5212 return result; |
5213 } | 5213 } |
5214 | 5214 |
5215 | 5215 |
5216 void DoubleToFloatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5216 void DoubleToFloatInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5217 const DRegister value = EvenDRegisterOf(locs()->in(0).fpu_reg()); | 5217 const DRegister value = EvenDRegisterOf(locs()->in(0).fpu_reg()); |
5218 const SRegister result = | 5218 const SRegister result = |
5219 EvenSRegisterOf(EvenDRegisterOf(locs()->out(0).fpu_reg())); | 5219 EvenSRegisterOf(EvenDRegisterOf(locs()->out(0).fpu_reg())); |
5220 __ vcvtsd(result, value); | 5220 __ vcvtsd(result, value); |
5221 } | 5221 } |
5222 | 5222 |
5223 | 5223 |
5224 LocationSummary* FloatToDoubleInstr::MakeLocationSummary(bool opt) const { | 5224 LocationSummary* FloatToDoubleInstr::MakeLocationSummary(bool opt) const { |
5225 const intptr_t kNumInputs = 1; | 5225 const intptr_t kNumInputs = 1; |
5226 const intptr_t kNumTemps = 0; | 5226 const intptr_t kNumTemps = 0; |
5227 LocationSummary* result = | 5227 LocationSummary* result = |
5228 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5228 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
5229 // Low (<= Q7) Q registers are needed for the conversion instructions. | 5229 // Low (<= Q7) Q registers are needed for the conversion instructions. |
5230 result->set_in(0, Location::FpuRegisterLocation(Q7)); | 5230 result->set_in(0, Location::FpuRegisterLocation(Q7)); |
5231 result->set_out(0, Location::RequiresFpuRegister()); | 5231 result->set_out(0, Location::RequiresFpuRegister()); |
5232 return result; | 5232 return result; |
5233 } | 5233 } |
5234 | 5234 |
5235 | 5235 |
5236 void FloatToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5236 void FloatToDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5237 const SRegister value = | 5237 const SRegister value = |
5238 EvenSRegisterOf(EvenDRegisterOf(locs()->in(0).fpu_reg())); | 5238 EvenSRegisterOf(EvenDRegisterOf(locs()->in(0).fpu_reg())); |
5239 const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg()); | 5239 const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg()); |
5240 __ vcvtds(result, value); | 5240 __ vcvtds(result, value); |
5241 } | 5241 } |
5242 | 5242 |
5243 | 5243 |
5244 LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary(bool opt) const { | 5244 LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary(bool opt) const { |
5245 ASSERT((InputCount() == 1) || (InputCount() == 2)); | 5245 ASSERT((InputCount() == 1) || (InputCount() == 2)); |
5246 const intptr_t kNumTemps = 0; | 5246 const intptr_t kNumTemps = 0; |
5247 LocationSummary* result = | 5247 LocationSummary* result = |
5248 new LocationSummary(InputCount(), kNumTemps, LocationSummary::kCall); | 5248 new (isolate) LocationSummary(isolate, InputCount(), kNumTemps, LocationSu
mmary::kCall); |
5249 result->set_in(0, Location::FpuRegisterLocation(Q0)); | 5249 result->set_in(0, Location::FpuRegisterLocation(Q0)); |
5250 if (InputCount() == 2) { | 5250 if (InputCount() == 2) { |
5251 result->set_in(1, Location::FpuRegisterLocation(Q1)); | 5251 result->set_in(1, Location::FpuRegisterLocation(Q1)); |
5252 } | 5252 } |
5253 if (recognized_kind() == MethodRecognizer::kMathDoublePow) { | 5253 if (recognized_kind() == MethodRecognizer::kMathDoublePow) { |
5254 result->AddTemp(Location::RegisterLocation(R2)); | 5254 result->AddTemp(Location::RegisterLocation(R2)); |
5255 } | 5255 } |
5256 if (!TargetCPUFeatures::hardfp_supported()) { | 5256 if (!TargetCPUFeatures::hardfp_supported()) { |
5257 result->AddTemp(Location::RegisterLocation(R0)); | 5257 result->AddTemp(Location::RegisterLocation(R0)); |
5258 result->AddTemp(Location::RegisterLocation(R1)); | 5258 result->AddTemp(Location::RegisterLocation(R1)); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5422 __ vmovdrr(D1, R2, R3); | 5422 __ vmovdrr(D1, R2, R3); |
5423 } | 5423 } |
5424 } | 5424 } |
5425 | 5425 |
5426 | 5426 |
5427 LocationSummary* ExtractNthOutputInstr::MakeLocationSummary(bool opt) const { | 5427 LocationSummary* ExtractNthOutputInstr::MakeLocationSummary(bool opt) const { |
5428 // Only use this instruction in optimized code. | 5428 // Only use this instruction in optimized code. |
5429 ASSERT(opt); | 5429 ASSERT(opt); |
5430 const intptr_t kNumInputs = 1; | 5430 const intptr_t kNumInputs = 1; |
5431 LocationSummary* summary = | 5431 LocationSummary* summary = |
5432 new LocationSummary(kNumInputs, 0, LocationSummary::kNoCall); | 5432 new (isolate) LocationSummary(isolate, kNumInputs, 0, LocationSummary::kNo
Call); |
5433 if (representation() == kUnboxedDouble) { | 5433 if (representation() == kUnboxedDouble) { |
5434 if (index() == 0) { | 5434 if (index() == 0) { |
5435 summary->set_in(0, Location::Pair(Location::RequiresFpuRegister(), | 5435 summary->set_in(0, Location::Pair(Location::RequiresFpuRegister(), |
5436 Location::Any())); | 5436 Location::Any())); |
5437 } else { | 5437 } else { |
5438 ASSERT(index() == 1); | 5438 ASSERT(index() == 1); |
5439 summary->set_in(0, Location::Pair(Location::Any(), | 5439 summary->set_in(0, Location::Pair(Location::Any(), |
5440 Location::RequiresFpuRegister())); | 5440 Location::RequiresFpuRegister())); |
5441 } | 5441 } |
5442 summary->set_out(0, Location::RequiresFpuRegister()); | 5442 summary->set_out(0, Location::RequiresFpuRegister()); |
(...skipping 28 matching lines...) Expand all Loading... |
5471 __ mov(out, ShifterOperand(in)); | 5471 __ mov(out, ShifterOperand(in)); |
5472 } | 5472 } |
5473 } | 5473 } |
5474 | 5474 |
5475 | 5475 |
5476 LocationSummary* MergedMathInstr::MakeLocationSummary(bool opt) const { | 5476 LocationSummary* MergedMathInstr::MakeLocationSummary(bool opt) const { |
5477 if (kind() == MergedMathInstr::kTruncDivMod) { | 5477 if (kind() == MergedMathInstr::kTruncDivMod) { |
5478 const intptr_t kNumInputs = 2; | 5478 const intptr_t kNumInputs = 2; |
5479 const intptr_t kNumTemps = 2; | 5479 const intptr_t kNumTemps = 2; |
5480 LocationSummary* summary = | 5480 LocationSummary* summary = |
5481 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5481 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kNoCall); |
5482 summary->set_in(0, Location::RequiresRegister()); | 5482 summary->set_in(0, Location::RequiresRegister()); |
5483 summary->set_in(1, Location::RequiresRegister()); | 5483 summary->set_in(1, Location::RequiresRegister()); |
5484 summary->set_temp(0, Location::RequiresRegister()); | 5484 summary->set_temp(0, Location::RequiresRegister()); |
5485 summary->set_temp(1, Location::RequiresFpuRegister()); | 5485 summary->set_temp(1, Location::RequiresFpuRegister()); |
5486 // Output is a pair of registers. | 5486 // Output is a pair of registers. |
5487 summary->set_out(0, Location::Pair(Location::RequiresRegister(), | 5487 summary->set_out(0, Location::Pair(Location::RequiresRegister(), |
5488 Location::RequiresRegister())); | 5488 Location::RequiresRegister())); |
5489 return summary; | 5489 return summary; |
5490 } | 5490 } |
5491 UNIMPLEMENTED(); | 5491 UNIMPLEMENTED(); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5609 | 5609 |
5610 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5610 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5611 comparison()->EmitBranchCode(compiler, this); | 5611 comparison()->EmitBranchCode(compiler, this); |
5612 } | 5612 } |
5613 | 5613 |
5614 | 5614 |
5615 LocationSummary* CheckClassInstr::MakeLocationSummary(bool opt) const { | 5615 LocationSummary* CheckClassInstr::MakeLocationSummary(bool opt) const { |
5616 const intptr_t kNumInputs = 1; | 5616 const intptr_t kNumInputs = 1; |
5617 const intptr_t kNumTemps = 0; | 5617 const intptr_t kNumTemps = 0; |
5618 LocationSummary* summary = | 5618 LocationSummary* summary = |
5619 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5619 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
5620 summary->set_in(0, Location::RequiresRegister()); | 5620 summary->set_in(0, Location::RequiresRegister()); |
5621 if (!IsNullCheck()) { | 5621 if (!IsNullCheck()) { |
5622 summary->AddTemp(Location::RequiresRegister()); | 5622 summary->AddTemp(Location::RequiresRegister()); |
5623 } | 5623 } |
5624 return summary; | 5624 return summary; |
5625 } | 5625 } |
5626 | 5626 |
5627 | 5627 |
5628 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5628 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5629 const ICData::DeoptReasonId deopt_reason = licm_hoisted_ ? | 5629 const ICData::DeoptReasonId deopt_reason = licm_hoisted_ ? |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5663 } | 5663 } |
5664 } | 5664 } |
5665 __ Bind(&is_ok); | 5665 __ Bind(&is_ok); |
5666 } | 5666 } |
5667 | 5667 |
5668 | 5668 |
5669 LocationSummary* CheckSmiInstr::MakeLocationSummary(bool opt) const { | 5669 LocationSummary* CheckSmiInstr::MakeLocationSummary(bool opt) const { |
5670 const intptr_t kNumInputs = 1; | 5670 const intptr_t kNumInputs = 1; |
5671 const intptr_t kNumTemps = 0; | 5671 const intptr_t kNumTemps = 0; |
5672 LocationSummary* summary = | 5672 LocationSummary* summary = |
5673 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5673 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
5674 summary->set_in(0, Location::RequiresRegister()); | 5674 summary->set_in(0, Location::RequiresRegister()); |
5675 return summary; | 5675 return summary; |
5676 } | 5676 } |
5677 | 5677 |
5678 | 5678 |
5679 void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5679 void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5680 const Register value = locs()->in(0).reg(); | 5680 const Register value = locs()->in(0).reg(); |
5681 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi); | 5681 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi); |
5682 __ tst(value, ShifterOperand(kSmiTagMask)); | 5682 __ tst(value, ShifterOperand(kSmiTagMask)); |
5683 __ b(deopt, NE); | 5683 __ b(deopt, NE); |
5684 } | 5684 } |
5685 | 5685 |
5686 | 5686 |
5687 LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(bool opt) const { | 5687 LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(bool opt) const { |
5688 const intptr_t kNumInputs = 2; | 5688 const intptr_t kNumInputs = 2; |
5689 const intptr_t kNumTemps = 0; | 5689 const intptr_t kNumTemps = 0; |
5690 LocationSummary* locs = | 5690 LocationSummary* locs = |
5691 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5691 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
5692 locs->set_in(kLengthPos, Location::RegisterOrSmiConstant(length())); | 5692 locs->set_in(kLengthPos, Location::RegisterOrSmiConstant(length())); |
5693 locs->set_in(kIndexPos, Location::RegisterOrSmiConstant(index())); | 5693 locs->set_in(kIndexPos, Location::RegisterOrSmiConstant(index())); |
5694 return locs; | 5694 return locs; |
5695 } | 5695 } |
5696 | 5696 |
5697 | 5697 |
5698 void CheckArrayBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5698 void CheckArrayBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5699 Label* deopt = compiler->AddDeoptStub(deopt_id(), | 5699 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
5700 ICData::kDeoptCheckArrayBound); | 5700 ICData::kDeoptCheckArrayBound); |
5701 | 5701 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5749 __ b(overflow, LT); | 5749 __ b(overflow, LT); |
5750 // Anything in the lower part would make the number bigger than the lower | 5750 // Anything in the lower part would make the number bigger than the lower |
5751 // bound, so we are done. | 5751 // bound, so we are done. |
5752 } | 5752 } |
5753 | 5753 |
5754 | 5754 |
5755 LocationSummary* UnboxIntegerInstr::MakeLocationSummary(bool opt) const { | 5755 LocationSummary* UnboxIntegerInstr::MakeLocationSummary(bool opt) const { |
5756 const intptr_t kNumInputs = 1; | 5756 const intptr_t kNumInputs = 1; |
5757 const intptr_t kNumTemps = 1; | 5757 const intptr_t kNumTemps = 1; |
5758 LocationSummary* summary = | 5758 LocationSummary* summary = |
5759 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5759 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
5760 summary->set_in(0, Location::RequiresRegister()); | 5760 summary->set_in(0, Location::RequiresRegister()); |
5761 summary->set_temp(0, Location::RequiresRegister()); | 5761 summary->set_temp(0, Location::RequiresRegister()); |
5762 summary->set_out(0, Location::Pair(Location::RequiresRegister(), | 5762 summary->set_out(0, Location::Pair(Location::RequiresRegister(), |
5763 Location::RequiresRegister())); | 5763 Location::RequiresRegister())); |
5764 return summary; | 5764 return summary; |
5765 } | 5765 } |
5766 | 5766 |
5767 | 5767 |
5768 void UnboxIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5768 void UnboxIntegerInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
5769 const intptr_t value_cid = value()->Type()->ToCid(); | 5769 const intptr_t value_cid = value()->Type()->ToCid(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5825 __ SignFill(result_hi, result_lo); | 5825 __ SignFill(result_hi, result_lo); |
5826 __ Bind(&done); | 5826 __ Bind(&done); |
5827 } | 5827 } |
5828 } | 5828 } |
5829 | 5829 |
5830 | 5830 |
5831 LocationSummary* BoxIntegerInstr::MakeLocationSummary(bool opt) const { | 5831 LocationSummary* BoxIntegerInstr::MakeLocationSummary(bool opt) const { |
5832 const intptr_t kNumInputs = 1; | 5832 const intptr_t kNumInputs = 1; |
5833 const intptr_t kNumTemps = 1; | 5833 const intptr_t kNumTemps = 1; |
5834 LocationSummary* summary = | 5834 LocationSummary* summary = |
5835 new LocationSummary(kNumInputs, | 5835 new (isolate) LocationSummary(isolate, kNumInputs, |
5836 kNumTemps, | 5836 kNumTemps, |
5837 LocationSummary::kCallOnSlowPath); | 5837 LocationSummary::kCallOnSlowPath); |
5838 summary->set_in(0, Location::Pair(Location::RequiresRegister(), | 5838 summary->set_in(0, Location::Pair(Location::RequiresRegister(), |
5839 Location::RequiresRegister())); | 5839 Location::RequiresRegister())); |
5840 summary->set_temp(0, Location::RequiresRegister()); | 5840 summary->set_temp(0, Location::RequiresRegister()); |
5841 summary->set_out(0, Location::RequiresRegister()); | 5841 summary->set_out(0, Location::RequiresRegister()); |
5842 return summary; | 5842 return summary; |
5843 } | 5843 } |
5844 | 5844 |
5845 | 5845 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5931 out_reg, | 5931 out_reg, |
5932 Mint::value_offset() - kHeapObjectTag + kWordSize); | 5932 Mint::value_offset() - kHeapObjectTag + kWordSize); |
5933 __ Bind(&done); | 5933 __ Bind(&done); |
5934 } | 5934 } |
5935 | 5935 |
5936 | 5936 |
5937 LocationSummary* BinaryMintOpInstr::MakeLocationSummary(bool opt) const { | 5937 LocationSummary* BinaryMintOpInstr::MakeLocationSummary(bool opt) const { |
5938 const intptr_t kNumInputs = 2; | 5938 const intptr_t kNumInputs = 2; |
5939 const intptr_t kNumTemps = 0; | 5939 const intptr_t kNumTemps = 0; |
5940 LocationSummary* summary = | 5940 LocationSummary* summary = |
5941 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 5941 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
5942 summary->set_in(0, Location::Pair(Location::RequiresRegister(), | 5942 summary->set_in(0, Location::Pair(Location::RequiresRegister(), |
5943 Location::RequiresRegister())); | 5943 Location::RequiresRegister())); |
5944 summary->set_in(1, Location::Pair(Location::RequiresRegister(), | 5944 summary->set_in(1, Location::Pair(Location::RequiresRegister(), |
5945 Location::RequiresRegister())); | 5945 Location::RequiresRegister())); |
5946 summary->set_out(0, Location::Pair(Location::RequiresRegister(), | 5946 summary->set_out(0, Location::Pair(Location::RequiresRegister(), |
5947 Location::RequiresRegister())); | 5947 Location::RequiresRegister())); |
5948 return summary; | 5948 return summary; |
5949 } | 5949 } |
5950 | 5950 |
5951 | 5951 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6004 if (FLAG_throw_on_javascript_int_overflow) { | 6004 if (FLAG_throw_on_javascript_int_overflow) { |
6005 EmitJavascriptIntOverflowCheck(compiler, deopt, out_lo, out_hi); | 6005 EmitJavascriptIntOverflowCheck(compiler, deopt, out_lo, out_hi); |
6006 } | 6006 } |
6007 } | 6007 } |
6008 | 6008 |
6009 | 6009 |
6010 LocationSummary* ShiftMintOpInstr::MakeLocationSummary(bool opt) const { | 6010 LocationSummary* ShiftMintOpInstr::MakeLocationSummary(bool opt) const { |
6011 const intptr_t kNumInputs = 2; | 6011 const intptr_t kNumInputs = 2; |
6012 const intptr_t kNumTemps = 1; | 6012 const intptr_t kNumTemps = 1; |
6013 LocationSummary* summary = | 6013 LocationSummary* summary = |
6014 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 6014 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
6015 summary->set_in(0, Location::Pair(Location::RequiresRegister(), | 6015 summary->set_in(0, Location::Pair(Location::RequiresRegister(), |
6016 Location::RequiresRegister())); | 6016 Location::RequiresRegister())); |
6017 summary->set_in(1, Location::WritableRegister()); | 6017 summary->set_in(1, Location::WritableRegister()); |
6018 summary->set_temp(0, Location::RequiresRegister()); | 6018 summary->set_temp(0, Location::RequiresRegister()); |
6019 summary->set_out(0, Location::Pair(Location::RequiresRegister(), | 6019 summary->set_out(0, Location::Pair(Location::RequiresRegister(), |
6020 Location::RequiresRegister())); | 6020 Location::RequiresRegister())); |
6021 return summary; | 6021 return summary; |
6022 } | 6022 } |
6023 | 6023 |
6024 | 6024 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6095 if (FLAG_throw_on_javascript_int_overflow) { | 6095 if (FLAG_throw_on_javascript_int_overflow) { |
6096 EmitJavascriptIntOverflowCheck(compiler, deopt, out_lo, out_hi); | 6096 EmitJavascriptIntOverflowCheck(compiler, deopt, out_lo, out_hi); |
6097 } | 6097 } |
6098 } | 6098 } |
6099 | 6099 |
6100 | 6100 |
6101 LocationSummary* UnaryMintOpInstr::MakeLocationSummary(bool opt) const { | 6101 LocationSummary* UnaryMintOpInstr::MakeLocationSummary(bool opt) const { |
6102 const intptr_t kNumInputs = 1; | 6102 const intptr_t kNumInputs = 1; |
6103 const intptr_t kNumTemps = 0; | 6103 const intptr_t kNumTemps = 0; |
6104 LocationSummary* summary = | 6104 LocationSummary* summary = |
6105 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 6105 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
6106 summary->set_in(0, Location::Pair(Location::RequiresRegister(), | 6106 summary->set_in(0, Location::Pair(Location::RequiresRegister(), |
6107 Location::RequiresRegister())); | 6107 Location::RequiresRegister())); |
6108 summary->set_out(0, Location::Pair(Location::RequiresRegister(), | 6108 summary->set_out(0, Location::Pair(Location::RequiresRegister(), |
6109 Location::RequiresRegister())); | 6109 Location::RequiresRegister())); |
6110 return summary; | 6110 return summary; |
6111 } | 6111 } |
6112 | 6112 |
6113 | 6113 |
6114 void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6114 void UnaryMintOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
6115 ASSERT(op_kind() == Token::kBIT_NOT); | 6115 ASSERT(op_kind() == Token::kBIT_NOT); |
(...skipping 12 matching lines...) Expand all Loading... |
6128 } | 6128 } |
6129 __ mvn(out_lo, ShifterOperand(left_lo)); | 6129 __ mvn(out_lo, ShifterOperand(left_lo)); |
6130 __ mvn(out_hi, ShifterOperand(left_hi)); | 6130 __ mvn(out_hi, ShifterOperand(left_hi)); |
6131 if (FLAG_throw_on_javascript_int_overflow) { | 6131 if (FLAG_throw_on_javascript_int_overflow) { |
6132 EmitJavascriptIntOverflowCheck(compiler, deopt, out_lo, out_hi); | 6132 EmitJavascriptIntOverflowCheck(compiler, deopt, out_lo, out_hi); |
6133 } | 6133 } |
6134 } | 6134 } |
6135 | 6135 |
6136 | 6136 |
6137 LocationSummary* ThrowInstr::MakeLocationSummary(bool opt) const { | 6137 LocationSummary* ThrowInstr::MakeLocationSummary(bool opt) const { |
6138 return new LocationSummary(0, 0, LocationSummary::kCall); | 6138 return new (isolate) LocationSummary(isolate, 0, 0, LocationSummary::kCall); |
6139 } | 6139 } |
6140 | 6140 |
6141 | 6141 |
6142 void ThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6142 void ThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
6143 compiler->GenerateRuntimeCall(token_pos(), | 6143 compiler->GenerateRuntimeCall(token_pos(), |
6144 deopt_id(), | 6144 deopt_id(), |
6145 kThrowRuntimeEntry, | 6145 kThrowRuntimeEntry, |
6146 1, | 6146 1, |
6147 locs()); | 6147 locs()); |
6148 __ bkpt(0); | 6148 __ bkpt(0); |
6149 } | 6149 } |
6150 | 6150 |
6151 | 6151 |
6152 LocationSummary* ReThrowInstr::MakeLocationSummary(bool opt) const { | 6152 LocationSummary* ReThrowInstr::MakeLocationSummary(bool opt) const { |
6153 return new LocationSummary(0, 0, LocationSummary::kCall); | 6153 return new (isolate) LocationSummary(isolate, 0, 0, LocationSummary::kCall); |
6154 } | 6154 } |
6155 | 6155 |
6156 | 6156 |
6157 void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6157 void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
6158 compiler->SetNeedsStacktrace(catch_try_index()); | 6158 compiler->SetNeedsStacktrace(catch_try_index()); |
6159 compiler->GenerateRuntimeCall(token_pos(), | 6159 compiler->GenerateRuntimeCall(token_pos(), |
6160 deopt_id(), | 6160 deopt_id(), |
6161 kReThrowRuntimeEntry, | 6161 kReThrowRuntimeEntry, |
6162 2, | 6162 2, |
6163 locs()); | 6163 locs()); |
(...skipping 20 matching lines...) Expand all Loading... |
6184 deopt_id_, | 6184 deopt_id_, |
6185 Scanner::kNoSourcePos); | 6185 Scanner::kNoSourcePos); |
6186 } | 6186 } |
6187 if (HasParallelMove()) { | 6187 if (HasParallelMove()) { |
6188 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); | 6188 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
6189 } | 6189 } |
6190 } | 6190 } |
6191 | 6191 |
6192 | 6192 |
6193 LocationSummary* GotoInstr::MakeLocationSummary(bool opt) const { | 6193 LocationSummary* GotoInstr::MakeLocationSummary(bool opt) const { |
6194 return new LocationSummary(0, 0, LocationSummary::kNoCall); | 6194 return new (isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall); |
6195 } | 6195 } |
6196 | 6196 |
6197 | 6197 |
6198 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6198 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
6199 if (!compiler->is_optimizing()) { | 6199 if (!compiler->is_optimizing()) { |
6200 compiler->EmitEdgeCounter(); | 6200 compiler->EmitEdgeCounter(); |
6201 // Add a deoptimization descriptor for deoptimizing instructions that | 6201 // Add a deoptimization descriptor for deoptimizing instructions that |
6202 // may be inserted before this instruction. On ARM this descriptor | 6202 // may be inserted before this instruction. On ARM this descriptor |
6203 // points after the edge counter code so that we can reuse the same | 6203 // points after the edge counter code so that we can reuse the same |
6204 // pattern matching code as at call sites, which matches backwards from | 6204 // pattern matching code as at call sites, which matches backwards from |
(...skipping 24 matching lines...) Expand all Loading... |
6229 void CurrentContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6229 void CurrentContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
6230 __ mov(locs()->out(0).reg(), ShifterOperand(CTX)); | 6230 __ mov(locs()->out(0).reg(), ShifterOperand(CTX)); |
6231 } | 6231 } |
6232 | 6232 |
6233 | 6233 |
6234 LocationSummary* StrictCompareInstr::MakeLocationSummary(bool opt) const { | 6234 LocationSummary* StrictCompareInstr::MakeLocationSummary(bool opt) const { |
6235 const intptr_t kNumInputs = 2; | 6235 const intptr_t kNumInputs = 2; |
6236 const intptr_t kNumTemps = 0; | 6236 const intptr_t kNumTemps = 0; |
6237 if (needs_number_check()) { | 6237 if (needs_number_check()) { |
6238 LocationSummary* locs = | 6238 LocationSummary* locs = |
6239 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 6239 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSu
mmary::kCall); |
6240 locs->set_in(0, Location::RegisterLocation(R0)); | 6240 locs->set_in(0, Location::RegisterLocation(R0)); |
6241 locs->set_in(1, Location::RegisterLocation(R1)); | 6241 locs->set_in(1, Location::RegisterLocation(R1)); |
6242 locs->set_out(0, Location::RegisterLocation(R0)); | 6242 locs->set_out(0, Location::RegisterLocation(R0)); |
6243 return locs; | 6243 return locs; |
6244 } | 6244 } |
6245 LocationSummary* locs = | 6245 LocationSummary* locs = |
6246 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 6246 new (isolate) LocationSummary(isolate, kNumInputs, kNumTemps, LocationSumm
ary::kNoCall); |
6247 locs->set_in(0, Location::RegisterOrConstant(left())); | 6247 locs->set_in(0, Location::RegisterOrConstant(left())); |
6248 // Only one of the inputs can be a constant. Choose register if the first one | 6248 // Only one of the inputs can be a constant. Choose register if the first one |
6249 // is a constant. | 6249 // is a constant. |
6250 locs->set_in(1, locs->in(0).IsConstant() | 6250 locs->set_in(1, locs->in(0).IsConstant() |
6251 ? Location::RequiresRegister() | 6251 ? Location::RequiresRegister() |
6252 : Location::RegisterOrConstant(right())); | 6252 : Location::RegisterOrConstant(right())); |
6253 locs->set_out(0, Location::RequiresRegister()); | 6253 locs->set_out(0, Location::RequiresRegister()); |
6254 return locs; | 6254 return locs; |
6255 } | 6255 } |
6256 | 6256 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6332 compiler->GenerateCall(token_pos(), | 6332 compiler->GenerateCall(token_pos(), |
6333 &label, | 6333 &label, |
6334 PcDescriptors::kOther, | 6334 PcDescriptors::kOther, |
6335 locs()); | 6335 locs()); |
6336 __ Drop(ArgumentCount()); // Discard arguments. | 6336 __ Drop(ArgumentCount()); // Discard arguments. |
6337 } | 6337 } |
6338 | 6338 |
6339 } // namespace dart | 6339 } // namespace dart |
6340 | 6340 |
6341 #endif // defined TARGET_ARCH_ARM | 6341 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |