Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: src/ic/mips64/ic-mips64.cc

Issue 752553005: MIPS: Flesh out vector ic state query and set mechanisms. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/mips/ic-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // Dictionary load failed, go slow (but don't miss). 263 // Dictionary load failed, go slow (but don't miss).
264 __ bind(&slow); 264 __ bind(&slow);
265 GenerateRuntimeGetProperty(masm); 265 GenerateRuntimeGetProperty(masm);
266 } 266 }
267 267
268 268
269 // A register that isn't one of the parameters to the load ic. 269 // A register that isn't one of the parameters to the load ic.
270 static const Register LoadIC_TempRegister() { return a3; } 270 static const Register LoadIC_TempRegister() { return a3; }
271 271
272 272
273 static void LoadIC_PushArgs(MacroAssembler* masm) {
274 Register receiver = LoadDescriptor::ReceiverRegister();
275 Register name = LoadDescriptor::NameRegister();
276 if (FLAG_vector_ics) {
277 Register slot = VectorLoadICDescriptor::SlotRegister();
278 Register vector = VectorLoadICDescriptor::VectorRegister();
279
280 __ Push(receiver, name, slot, vector);
281 } else {
282 __ Push(receiver, name);
283 }
284 }
285
286
273 void LoadIC::GenerateMiss(MacroAssembler* masm) { 287 void LoadIC::GenerateMiss(MacroAssembler* masm) {
274 // The return address is on the stack. 288 // The return address is on the stack.
275 Isolate* isolate = masm->isolate(); 289 Isolate* isolate = masm->isolate();
276 290
277 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4); 291 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4);
278 292
279 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister()); 293 LoadIC_PushArgs(masm);
280 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
281 294
282 // Perform tail call to the entry. 295 // Perform tail call to the entry.
283 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 296 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
284 __ TailCallExternalReference(ref, 2, 1); 297 int arg_count = FLAG_vector_ics ? 4 : 2;
298 __ TailCallExternalReference(ref, arg_count, 1);
285 } 299 }
286 300
287 301
288 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 302 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
289 // The return address is in ra. 303 // The return address is in ra.
290 304
291 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister()); 305 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
292 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister()); 306 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
293 307
294 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); 308 __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 GenerateMiss(masm); 419 GenerateMiss(masm);
406 } 420 }
407 421
408 422
409 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 423 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
410 // The return address is in ra. 424 // The return address is in ra.
411 Isolate* isolate = masm->isolate(); 425 Isolate* isolate = masm->isolate();
412 426
413 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4); 427 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, a4);
414 428
415 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); 429 LoadIC_PushArgs(masm);
416 430
417 // Perform tail call to the entry. 431 // Perform tail call to the entry.
418 ExternalReference ref = 432 ExternalReference ref =
419 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 433 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
420 434
421 __ TailCallExternalReference(ref, 2, 1); 435 int arg_count = FLAG_vector_ics ? 4 : 2;
436 __ TailCallExternalReference(ref, arg_count, 1);
422 } 437 }
423 438
424 439
425 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 440 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
426 // The return address is in ra. 441 // The return address is in ra.
427 442
428 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); 443 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
429 444
430 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); 445 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
431 } 446 }
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 patcher.ChangeBranchCondition(ne); 1026 patcher.ChangeBranchCondition(ne);
1012 } else { 1027 } else {
1013 DCHECK(Assembler::IsBne(branch_instr)); 1028 DCHECK(Assembler::IsBne(branch_instr));
1014 patcher.ChangeBranchCondition(eq); 1029 patcher.ChangeBranchCondition(eq);
1015 } 1030 }
1016 } 1031 }
1017 } 1032 }
1018 } // namespace v8::internal 1033 } // namespace v8::internal
1019 1034
1020 #endif // V8_TARGET_ARCH_MIPS64 1035 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/ic/mips/ic-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698