| 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 | 5 |
| 6 #include "src/v8.h" | 6 #include "src/v8.h" |
| 7 | 7 |
| 8 #if V8_TARGET_ARCH_MIPS64 | 8 #if V8_TARGET_ARCH_MIPS64 |
| 9 | 9 |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 __ TailCallExternalReference(ref, arg_count, 1); | 322 __ TailCallExternalReference(ref, arg_count, 1); |
| 323 } | 323 } |
| 324 | 324 |
| 325 | 325 |
| 326 void LoadIC::GenerateSlow(MacroAssembler* masm) { | 326 void LoadIC::GenerateSlow(MacroAssembler* masm) { |
| 327 // The return address is in ra. | 327 // The return address is in ra. |
| 328 | 328 |
| 329 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister()); | 329 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister()); |
| 330 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister()); | 330 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister()); |
| 331 | 331 |
| 332 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); | 332 ExternalReference ref = |
| 333 ExternalReference(IC_Utility(kLoadIC_Slow), masm->isolate()); |
| 334 int arg_count = 2; |
| 335 __ TailCallExternalReference(ref, arg_count, 1); |
| 333 } | 336 } |
| 334 | 337 |
| 335 | 338 |
| 336 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { | 339 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
| 337 // The return address is in ra. | 340 // The return address is in ra. |
| 338 Isolate* isolate = masm->isolate(); | 341 Isolate* isolate = masm->isolate(); |
| 339 | 342 |
| 340 DCHECK(!AreAliased(a4, a5, LoadWithVectorDescriptor::SlotRegister(), | 343 DCHECK(!AreAliased(a4, a5, LoadWithVectorDescriptor::SlotRegister(), |
| 341 LoadWithVectorDescriptor::VectorRegister())); | 344 LoadWithVectorDescriptor::VectorRegister())); |
| 342 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a4, a5); | 345 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a4, a5); |
| 343 | 346 |
| 344 LoadIC_PushArgs(masm); | 347 LoadIC_PushArgs(masm); |
| 345 | 348 |
| 346 // Perform tail call to the entry. | 349 // Perform tail call to the entry. |
| 347 ExternalReference ref = | 350 ExternalReference ref = |
| 348 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); | 351 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); |
| 349 | 352 |
| 350 int arg_count = 4; | 353 int arg_count = 4; |
| 351 __ TailCallExternalReference(ref, arg_count, 1); | 354 __ TailCallExternalReference(ref, arg_count, 1); |
| 352 } | 355 } |
| 353 | 356 |
| 354 | 357 |
| 355 void KeyedLoadIC::GenerateSlow(MacroAssembler* masm) { | 358 void KeyedLoadIC::GenerateSlow(MacroAssembler* masm) { |
| 356 // The return address is in ra. | 359 // The return address is in ra. |
| 357 | 360 |
| 358 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); | 361 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); |
| 359 | 362 |
| 360 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); | 363 ExternalReference ref = |
| 364 ExternalReference(IC_Utility(kKeyedLoadIC_Slow), masm->isolate()); |
| 365 int arg_count = 2; |
| 366 __ TailCallExternalReference(ref, arg_count, 1); |
| 361 } | 367 } |
| 362 | 368 |
| 363 | 369 |
| 364 void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm, | 370 void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm, |
| 365 LanguageMode language_mode) { | 371 LanguageMode language_mode) { |
| 366 // The return address is in ra. | 372 // The return address is in ra. |
| 367 Label slow, check_name, index_smi, index_name, property_array_property; | 373 Label slow, check_name, index_smi, index_name, property_array_property; |
| 368 Label probe_dictionary, check_number_dictionary; | 374 Label probe_dictionary, check_number_dictionary; |
| 369 | 375 |
| 370 Register key = LoadDescriptor::NameRegister(); | 376 Register key = LoadDescriptor::NameRegister(); |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 patcher.ChangeBranchCondition(ne); | 880 patcher.ChangeBranchCondition(ne); |
| 875 } else { | 881 } else { |
| 876 DCHECK(Assembler::IsBne(branch_instr)); | 882 DCHECK(Assembler::IsBne(branch_instr)); |
| 877 patcher.ChangeBranchCondition(eq); | 883 patcher.ChangeBranchCondition(eq); |
| 878 } | 884 } |
| 879 } | 885 } |
| 880 } // namespace internal | 886 } // namespace internal |
| 881 } // namespace v8 | 887 } // namespace v8 |
| 882 | 888 |
| 883 #endif // V8_TARGET_ARCH_MIPS64 | 889 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |