OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic-inl.h" | 10 #include "src/ic-inl.h" |
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 | 903 |
904 | 904 |
905 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 905 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
906 // The return address is on the stack. | 906 // The return address is on the stack. |
907 Register receiver = ReceiverRegister(); | 907 Register receiver = ReceiverRegister(); |
908 Register name = NameRegister(); | 908 Register name = NameRegister(); |
909 ASSERT(receiver.is(rdx)); | 909 ASSERT(receiver.is(rdx)); |
910 ASSERT(name.is(rcx)); | 910 ASSERT(name.is(rcx)); |
911 | 911 |
912 // Probe the stub cache. | 912 // Probe the stub cache. |
913 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC); | 913 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
| 914 Code::ComputeHandlerFlags(Code::LOAD_IC)); |
914 masm->isolate()->stub_cache()->GenerateProbe( | 915 masm->isolate()->stub_cache()->GenerateProbe( |
915 masm, flags, receiver, name, rbx, rax); | 916 masm, flags, receiver, name, rbx, rax); |
916 | 917 |
917 GenerateMiss(masm); | 918 GenerateMiss(masm); |
918 } | 919 } |
919 | 920 |
920 | 921 |
921 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 922 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
922 Register dictionary = rax; | 923 Register dictionary = rax; |
923 ASSERT(!dictionary.is(ReceiverRegister())); | 924 ASSERT(!dictionary.is(ReceiverRegister())); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1034 | 1035 |
1035 // Perform tail call to the entry. | 1036 // Perform tail call to the entry. |
1036 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); | 1037 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); |
1037 } | 1038 } |
1038 | 1039 |
1039 | 1040 |
1040 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 1041 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
1041 // The return address is on the stack. | 1042 // The return address is on the stack. |
1042 | 1043 |
1043 // Get the receiver from the stack and probe the stub cache. | 1044 // Get the receiver from the stack and probe the stub cache. |
1044 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); | 1045 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
| 1046 Code::ComputeHandlerFlags(Code::STORE_IC)); |
1045 masm->isolate()->stub_cache()->GenerateProbe( | 1047 masm->isolate()->stub_cache()->GenerateProbe( |
1046 masm, flags, ReceiverRegister(), NameRegister(), rbx, no_reg); | 1048 masm, flags, ReceiverRegister(), NameRegister(), rbx, no_reg); |
1047 | 1049 |
1048 // Cache miss: Jump to runtime. | 1050 // Cache miss: Jump to runtime. |
1049 GenerateMiss(masm); | 1051 GenerateMiss(masm); |
1050 } | 1052 } |
1051 | 1053 |
1052 | 1054 |
1053 static void StoreIC_PushArgs(MacroAssembler* masm) { | 1055 static void StoreIC_PushArgs(MacroAssembler* masm) { |
1054 Register receiver = StoreIC::ReceiverRegister(); | 1056 Register receiver = StoreIC::ReceiverRegister(); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1230 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1232 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
1231 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1233 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
1232 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1234 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
1233 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1235 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1234 } | 1236 } |
1235 | 1237 |
1236 | 1238 |
1237 } } // namespace v8::internal | 1239 } } // namespace v8::internal |
1238 | 1240 |
1239 #endif // V8_TARGET_ARCH_X64 | 1241 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |