OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 __ bind(&done); | 517 __ bind(&done); |
518 __ IncrementCounter(counters->math_pow(), 1); | 518 __ IncrementCounter(counters->math_pow(), 1); |
519 __ ret(0); | 519 __ ret(0); |
520 } | 520 } |
521 } | 521 } |
522 | 522 |
523 | 523 |
524 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { | 524 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
525 Label miss; | 525 Label miss; |
526 Register receiver = LoadDescriptor::ReceiverRegister(); | 526 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 527 // Ensure that the vector and slot registers won't be clobbered before |
| 528 // calling the miss handler. |
| 529 DCHECK(!FLAG_vector_ics || |
| 530 !AreAliased(r8, r9, VectorLoadICDescriptor::VectorRegister(), |
| 531 VectorLoadICDescriptor::SlotRegister())); |
527 | 532 |
528 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, | 533 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, |
529 r9, &miss); | 534 r9, &miss); |
530 __ bind(&miss); | 535 __ bind(&miss); |
531 PropertyAccessCompiler::TailCallBuiltin( | 536 PropertyAccessCompiler::TailCallBuiltin( |
532 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | 537 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); |
533 } | 538 } |
534 | 539 |
535 | 540 |
536 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 541 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); | 871 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); |
867 } | 872 } |
868 | 873 |
869 | 874 |
870 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { | 875 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { |
871 // Return address is on the stack. | 876 // Return address is on the stack. |
872 Label miss; | 877 Label miss; |
873 | 878 |
874 Register receiver = LoadDescriptor::ReceiverRegister(); | 879 Register receiver = LoadDescriptor::ReceiverRegister(); |
875 Register index = LoadDescriptor::NameRegister(); | 880 Register index = LoadDescriptor::NameRegister(); |
876 Register scratch = rbx; | 881 Register scratch = rdi; |
877 Register result = rax; | 882 Register result = rax; |
878 DCHECK(!scratch.is(receiver) && !scratch.is(index)); | 883 DCHECK(!scratch.is(receiver) && !scratch.is(index)); |
| 884 DCHECK(!FLAG_vector_ics || |
| 885 (!scratch.is(VectorLoadICDescriptor::VectorRegister()) && |
| 886 result.is(VectorLoadICDescriptor::SlotRegister()))); |
879 | 887 |
| 888 // StringCharAtGenerator doesn't use the result register until it's passed |
| 889 // the different miss possibilities. If it did, we would have a conflict |
| 890 // when FLAG_vector_ics is true. |
880 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, | 891 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, |
881 &miss, // When not a string. | 892 &miss, // When not a string. |
882 &miss, // When not a number. | 893 &miss, // When not a number. |
883 &miss, // When index out of range. | 894 &miss, // When index out of range. |
884 STRING_INDEX_IS_ARRAY_INDEX, | 895 STRING_INDEX_IS_ARRAY_INDEX, |
885 RECEIVER_IS_STRING); | 896 RECEIVER_IS_STRING); |
886 char_at_generator.GenerateFast(masm); | 897 char_at_generator.GenerateFast(masm); |
887 __ ret(0); | 898 __ ret(0); |
888 | 899 |
889 StubRuntimeCallHelper call_helper; | 900 StubRuntimeCallHelper call_helper; |
(...skipping 3871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4761 return_value_operand, | 4772 return_value_operand, |
4762 NULL); | 4773 NULL); |
4763 } | 4774 } |
4764 | 4775 |
4765 | 4776 |
4766 #undef __ | 4777 #undef __ |
4767 | 4778 |
4768 } } // namespace v8::internal | 4779 } } // namespace v8::internal |
4769 | 4780 |
4770 #endif // V8_TARGET_ARCH_X64 | 4781 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |