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

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

Issue 508673002: MIPS: Move register conventions out of the IC classes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits. Created 6 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/mips/ic-conventions-mips.cc ('k') | src/ic/mips64/access-compiler-mips64.cc » ('j') | 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_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 STATIC_ASSERT(kInternalizedTag == 0); 244 STATIC_ASSERT(kInternalizedTag == 0);
245 __ And(at, hash, Operand(kIsNotInternalizedMask)); 245 __ And(at, hash, Operand(kIsNotInternalizedMask));
246 __ Branch(not_unique, ne, at, Operand(zero_reg)); 246 __ Branch(not_unique, ne, at, Operand(zero_reg));
247 247
248 __ bind(&unique); 248 __ bind(&unique);
249 } 249 }
250 250
251 251
252 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 252 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
253 // The return address is in lr. 253 // The return address is in lr.
254 Register receiver = ReceiverRegister(); 254 Register receiver = LoadConvention::ReceiverRegister();
255 Register name = NameRegister(); 255 Register name = LoadConvention::NameRegister();
256 DCHECK(receiver.is(a1)); 256 DCHECK(receiver.is(a1));
257 DCHECK(name.is(a2)); 257 DCHECK(name.is(a2));
258 258
259 // Probe the stub cache. 259 // Probe the stub cache.
260 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 260 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
261 Code::ComputeHandlerFlags(Code::LOAD_IC)); 261 Code::ComputeHandlerFlags(Code::LOAD_IC));
262 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, a3, 262 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, a3,
263 t0, t1, t2); 263 t0, t1, t2);
264 264
265 // Cache miss: Jump to runtime. 265 // Cache miss: Jump to runtime.
266 GenerateMiss(masm); 266 GenerateMiss(masm);
267 } 267 }
268 268
269 269
270 void LoadIC::GenerateNormal(MacroAssembler* masm) { 270 void LoadIC::GenerateNormal(MacroAssembler* masm) {
271 Register dictionary = a0; 271 Register dictionary = a0;
272 DCHECK(!dictionary.is(ReceiverRegister())); 272 DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
273 DCHECK(!dictionary.is(NameRegister())); 273 DCHECK(!dictionary.is(LoadConvention::NameRegister()));
274 274
275 Label slow; 275 Label slow;
276 276
277 __ lw(dictionary, 277 __ lw(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(),
278 FieldMemOperand(ReceiverRegister(), JSObject::kPropertiesOffset)); 278 JSObject::kPropertiesOffset));
279 GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), v0, a3, t0); 279 GenerateDictionaryLoad(masm, &slow, dictionary,
280 LoadConvention::NameRegister(), v0, a3, t0);
280 __ Ret(); 281 __ Ret();
281 282
282 // Dictionary load failed, go slow (but don't miss). 283 // Dictionary load failed, go slow (but don't miss).
283 __ bind(&slow); 284 __ bind(&slow);
284 GenerateRuntimeGetProperty(masm); 285 GenerateRuntimeGetProperty(masm);
285 } 286 }
286 287
287 288
288 // A register that isn't one of the parameters to the load ic. 289 // A register that isn't one of the parameters to the load ic.
289 static const Register LoadIC_TempRegister() { return a3; } 290 static const Register LoadIC_TempRegister() { return a3; }
290 291
291 292
292 void LoadIC::GenerateMiss(MacroAssembler* masm) { 293 void LoadIC::GenerateMiss(MacroAssembler* masm) {
293 // The return address is in ra. 294 // The return address is in ra.
294 Isolate* isolate = masm->isolate(); 295 Isolate* isolate = masm->isolate();
295 296
296 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0); 297 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
297 298
298 __ mov(LoadIC_TempRegister(), ReceiverRegister()); 299 __ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
299 __ Push(LoadIC_TempRegister(), NameRegister()); 300 __ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
300 301
301 // Perform tail call to the entry. 302 // Perform tail call to the entry.
302 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 303 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
303 __ TailCallExternalReference(ref, 2, 1); 304 __ TailCallExternalReference(ref, 2, 1);
304 } 305 }
305 306
306 307
307 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 308 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
308 // The return address is in ra. 309 // The return address is in ra.
309 310
310 __ mov(LoadIC_TempRegister(), ReceiverRegister()); 311 __ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister());
311 __ Push(LoadIC_TempRegister(), NameRegister()); 312 __ Push(LoadIC_TempRegister(), LoadConvention::NameRegister());
312 313
313 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); 314 __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
314 } 315 }
315 316
316 317
317 static MemOperand GenerateMappedArgumentsLookup( 318 static MemOperand GenerateMappedArgumentsLookup(
318 MacroAssembler* masm, Register object, Register key, Register scratch1, 319 MacroAssembler* masm, Register object, Register key, Register scratch1,
319 Register scratch2, Register scratch3, Label* unmapped_case, 320 Register scratch2, Register scratch3, Label* unmapped_case,
320 Label* slow_case) { 321 Label* slow_case) {
321 Heap* heap = masm->isolate()->heap(); 322 Heap* heap = masm->isolate()->heap();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 __ li(scratch, Operand(kPointerSize >> 1)); 387 __ li(scratch, Operand(kPointerSize >> 1));
387 __ Mul(scratch, key, scratch); 388 __ Mul(scratch, key, scratch);
388 __ Addu(scratch, scratch, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 389 __ Addu(scratch, scratch, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
389 __ Addu(scratch, backing_store, scratch); 390 __ Addu(scratch, backing_store, scratch);
390 return MemOperand(scratch); 391 return MemOperand(scratch);
391 } 392 }
392 393
393 394
394 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { 395 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
395 // The return address is in ra. 396 // The return address is in ra.
396 Register receiver = ReceiverRegister(); 397 Register receiver = LoadConvention::ReceiverRegister();
397 Register key = NameRegister(); 398 Register key = LoadConvention::NameRegister();
398 DCHECK(receiver.is(a1)); 399 DCHECK(receiver.is(a1));
399 DCHECK(key.is(a2)); 400 DCHECK(key.is(a2));
400 401
401 Label slow, notin; 402 Label slow, notin;
402 MemOperand mapped_location = GenerateMappedArgumentsLookup( 403 MemOperand mapped_location = GenerateMappedArgumentsLookup(
403 masm, receiver, key, a0, a3, t0, &notin, &slow); 404 masm, receiver, key, a0, a3, t0, &notin, &slow);
404 __ Ret(USE_DELAY_SLOT); 405 __ Ret(USE_DELAY_SLOT);
405 __ lw(v0, mapped_location); 406 __ lw(v0, mapped_location);
406 __ bind(&notin); 407 __ bind(&notin);
407 // The unmapped lookup expects that the parameter map is in a0. 408 // The unmapped lookup expects that the parameter map is in a0.
408 MemOperand unmapped_location = 409 MemOperand unmapped_location =
409 GenerateUnmappedArgumentsLookup(masm, key, a0, a3, &slow); 410 GenerateUnmappedArgumentsLookup(masm, key, a0, a3, &slow);
410 __ lw(a0, unmapped_location); 411 __ lw(a0, unmapped_location);
411 __ LoadRoot(a3, Heap::kTheHoleValueRootIndex); 412 __ LoadRoot(a3, Heap::kTheHoleValueRootIndex);
412 __ Branch(&slow, eq, a0, Operand(a3)); 413 __ Branch(&slow, eq, a0, Operand(a3));
413 __ Ret(USE_DELAY_SLOT); 414 __ Ret(USE_DELAY_SLOT);
414 __ mov(v0, a0); 415 __ mov(v0, a0);
415 __ bind(&slow); 416 __ bind(&slow);
416 GenerateMiss(masm); 417 GenerateMiss(masm);
417 } 418 }
418 419
419 420
420 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { 421 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
421 Register receiver = ReceiverRegister(); 422 Register receiver = StoreConvention::ReceiverRegister();
422 Register key = NameRegister(); 423 Register key = StoreConvention::NameRegister();
423 Register value = ValueRegister(); 424 Register value = StoreConvention::ValueRegister();
424 DCHECK(value.is(a0)); 425 DCHECK(value.is(a0));
425 426
426 Label slow, notin; 427 Label slow, notin;
427 // Store address is returned in register (of MemOperand) mapped_location. 428 // Store address is returned in register (of MemOperand) mapped_location.
428 MemOperand mapped_location = GenerateMappedArgumentsLookup( 429 MemOperand mapped_location = GenerateMappedArgumentsLookup(
429 masm, receiver, key, a3, t0, t1, &notin, &slow); 430 masm, receiver, key, a3, t0, t1, &notin, &slow);
430 __ sw(value, mapped_location); 431 __ sw(value, mapped_location);
431 __ mov(t5, value); 432 __ mov(t5, value);
432 DCHECK_EQ(mapped_location.offset(), 0); 433 DCHECK_EQ(mapped_location.offset(), 0);
433 __ RecordWrite(a3, mapped_location.rm(), t5, kRAHasNotBeenSaved, 434 __ RecordWrite(a3, mapped_location.rm(), t5, kRAHasNotBeenSaved,
(...skipping 16 matching lines...) Expand all
450 GenerateMiss(masm); 451 GenerateMiss(masm);
451 } 452 }
452 453
453 454
454 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 455 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
455 // The return address is in ra. 456 // The return address is in ra.
456 Isolate* isolate = masm->isolate(); 457 Isolate* isolate = masm->isolate();
457 458
458 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0); 459 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
459 460
460 __ Push(ReceiverRegister(), NameRegister()); 461 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
461 462
462 // Perform tail call to the entry. 463 // Perform tail call to the entry.
463 ExternalReference ref = 464 ExternalReference ref =
464 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 465 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
465 466
466 __ TailCallExternalReference(ref, 2, 1); 467 __ TailCallExternalReference(ref, 2, 1);
467 } 468 }
468 469
469 470
470 // IC register specifications
471 const Register LoadIC::ReceiverRegister() { return a1; }
472 const Register LoadIC::NameRegister() { return a2; }
473
474
475 const Register LoadIC::SlotRegister() {
476 DCHECK(FLAG_vector_ics);
477 return a0;
478 }
479
480
481 const Register LoadIC::VectorRegister() {
482 DCHECK(FLAG_vector_ics);
483 return a3;
484 }
485
486
487 const Register StoreIC::ReceiverRegister() { return a1; }
488 const Register StoreIC::NameRegister() { return a2; }
489 const Register StoreIC::ValueRegister() { return a0; }
490
491
492 const Register KeyedStoreIC::MapRegister() { return a3; }
493
494
495 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 471 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
496 // The return address is in ra. 472 // The return address is in ra.
497 473
498 __ Push(ReceiverRegister(), NameRegister()); 474 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister());
499 475
500 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); 476 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
501 } 477 }
502 478
503 479
504 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { 480 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
505 // The return address is in ra. 481 // The return address is in ra.
506 Label slow, check_name, index_smi, index_name, property_array_property; 482 Label slow, check_name, index_smi, index_name, property_array_property;
507 Label probe_dictionary, check_number_dictionary; 483 Label probe_dictionary, check_number_dictionary;
508 484
509 Register key = NameRegister(); 485 Register key = LoadConvention::NameRegister();
510 Register receiver = ReceiverRegister(); 486 Register receiver = LoadConvention::ReceiverRegister();
511 DCHECK(key.is(a2)); 487 DCHECK(key.is(a2));
512 DCHECK(receiver.is(a1)); 488 DCHECK(receiver.is(a1));
513 489
514 Isolate* isolate = masm->isolate(); 490 Isolate* isolate = masm->isolate();
515 491
516 // Check that the key is a smi. 492 // Check that the key is a smi.
517 __ JumpIfNotSmi(key, &check_name); 493 __ JumpIfNotSmi(key, &check_name);
518 __ bind(&index_smi); 494 __ bind(&index_smi);
519 // Now the key is known to be a smi. This place is also jumped to from below 495 // Now the key is known to be a smi. This place is also jumped to from below
520 // where a numeric string is converted to a smi. 496 // where a numeric string is converted to a smi.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 __ IndexFromHash(a3, key); 635 __ IndexFromHash(a3, key);
660 // Now jump to the place where smi keys are handled. 636 // Now jump to the place where smi keys are handled.
661 __ Branch(&index_smi); 637 __ Branch(&index_smi);
662 } 638 }
663 639
664 640
665 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { 641 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
666 // Return address is in ra. 642 // Return address is in ra.
667 Label miss; 643 Label miss;
668 644
669 Register receiver = ReceiverRegister(); 645 Register receiver = LoadConvention::ReceiverRegister();
670 Register index = NameRegister(); 646 Register index = LoadConvention::NameRegister();
671 Register scratch = a3; 647 Register scratch = a3;
672 Register result = v0; 648 Register result = v0;
673 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 649 DCHECK(!scratch.is(receiver) && !scratch.is(index));
674 650
675 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, 651 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
676 &miss, // When not a string. 652 &miss, // When not a string.
677 &miss, // When not a number. 653 &miss, // When not a number.
678 &miss, // When index out of range. 654 &miss, // When index out of range.
679 STRING_INDEX_IS_ARRAY_INDEX); 655 STRING_INDEX_IS_ARRAY_INDEX);
680 char_at_generator.GenerateFast(masm); 656 char_at_generator.GenerateFast(masm);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 // -- a0 : value 816 // -- a0 : value
841 // -- a1 : key 817 // -- a1 : key
842 // -- a2 : receiver 818 // -- a2 : receiver
843 // -- ra : return address 819 // -- ra : return address
844 // ----------------------------------- 820 // -----------------------------------
845 Label slow, fast_object, fast_object_grow; 821 Label slow, fast_object, fast_object_grow;
846 Label fast_double, fast_double_grow; 822 Label fast_double, fast_double_grow;
847 Label array, extra, check_if_double_array; 823 Label array, extra, check_if_double_array;
848 824
849 // Register usage. 825 // Register usage.
850 Register value = ValueRegister(); 826 Register value = StoreConvention::ValueRegister();
851 Register key = NameRegister(); 827 Register key = StoreConvention::NameRegister();
852 Register receiver = ReceiverRegister(); 828 Register receiver = StoreConvention::ReceiverRegister();
853 DCHECK(value.is(a0)); 829 DCHECK(value.is(a0));
854 Register receiver_map = a3; 830 Register receiver_map = a3;
855 Register elements_map = t2; 831 Register elements_map = t2;
856 Register elements = t3; // Elements array of the receiver. 832 Register elements = t3; // Elements array of the receiver.
857 // t0 and t1 are used as general scratch registers. 833 // t0 and t1 are used as general scratch registers.
858 834
859 // Check that the key is a smi. 835 // Check that the key is a smi.
860 __ JumpIfNotSmi(key, &slow); 836 __ JumpIfNotSmi(key, &slow);
861 // Check that the object isn't a smi. 837 // Check that the object isn't a smi.
862 __ JumpIfSmi(receiver, &slow); 838 __ JumpIfSmi(receiver, &slow);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 &slow, kDontCheckMap, kIncrementLength, value, 902 &slow, kDontCheckMap, kIncrementLength, value,
927 key, receiver, receiver_map, elements_map, 903 key, receiver, receiver_map, elements_map,
928 elements); 904 elements);
929 } 905 }
930 906
931 907
932 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { 908 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
933 // Return address is in ra. 909 // Return address is in ra.
934 Label slow; 910 Label slow;
935 911
936 Register receiver = ReceiverRegister(); 912 Register receiver = LoadConvention::ReceiverRegister();
937 Register key = NameRegister(); 913 Register key = LoadConvention::NameRegister();
938 Register scratch1 = a3; 914 Register scratch1 = a3;
939 Register scratch2 = t0; 915 Register scratch2 = t0;
940 DCHECK(!scratch1.is(receiver) && !scratch1.is(key)); 916 DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
941 DCHECK(!scratch2.is(receiver) && !scratch2.is(key)); 917 DCHECK(!scratch2.is(receiver) && !scratch2.is(key));
942 918
943 // Check that the receiver isn't a smi. 919 // Check that the receiver isn't a smi.
944 __ JumpIfSmi(receiver, &slow); 920 __ JumpIfSmi(receiver, &slow);
945 921
946 // Check that the key is an array index, that is Uint32. 922 // Check that the key is an array index, that is Uint32.
947 __ And(t0, key, Operand(kSmiTagMask | kSmiSignMask)); 923 __ And(t0, key, Operand(kSmiTagMask | kSmiSignMask));
(...skipping 16 matching lines...) Expand all
964 masm->isolate()), 940 masm->isolate()),
965 2, 1); 941 2, 1);
966 942
967 __ bind(&slow); 943 __ bind(&slow);
968 GenerateMiss(masm); 944 GenerateMiss(masm);
969 } 945 }
970 946
971 947
972 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 948 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
973 // Push receiver, key and value for runtime call. 949 // Push receiver, key and value for runtime call.
974 __ Push(ReceiverRegister(), NameRegister(), ValueRegister()); 950 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
951 StoreConvention::ValueRegister());
975 952
976 ExternalReference ref = 953 ExternalReference ref =
977 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); 954 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
978 __ TailCallExternalReference(ref, 3, 1); 955 __ TailCallExternalReference(ref, 3, 1);
979 } 956 }
980 957
981 958
982 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 959 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
983 Register receiver = ReceiverRegister(); 960 Register receiver = StoreConvention::ReceiverRegister();
984 Register name = NameRegister(); 961 Register name = StoreConvention::NameRegister();
985 DCHECK(receiver.is(a1)); 962 DCHECK(receiver.is(a1));
986 DCHECK(name.is(a2)); 963 DCHECK(name.is(a2));
987 DCHECK(ValueRegister().is(a0)); 964 DCHECK(StoreConvention::ValueRegister().is(a0));
988 965
989 // Get the receiver from the stack and probe the stub cache. 966 // Get the receiver from the stack and probe the stub cache.
990 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 967 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
991 Code::ComputeHandlerFlags(Code::STORE_IC)); 968 Code::ComputeHandlerFlags(Code::STORE_IC));
992 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, a3, 969 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, a3,
993 t0, t1, t2); 970 t0, t1, t2);
994 971
995 // Cache miss: Jump to runtime. 972 // Cache miss: Jump to runtime.
996 GenerateMiss(masm); 973 GenerateMiss(masm);
997 } 974 }
998 975
999 976
1000 void StoreIC::GenerateMiss(MacroAssembler* masm) { 977 void StoreIC::GenerateMiss(MacroAssembler* masm) {
1001 __ Push(ReceiverRegister(), NameRegister(), ValueRegister()); 978 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(),
979 StoreConvention::ValueRegister());
1002 // Perform tail call to the entry. 980 // Perform tail call to the entry.
1003 ExternalReference ref = 981 ExternalReference ref =
1004 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate()); 982 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
1005 __ TailCallExternalReference(ref, 3, 1); 983 __ TailCallExternalReference(ref, 3, 1);
1006 } 984 }
1007 985
1008 986
1009 void StoreIC::GenerateNormal(MacroAssembler* masm) { 987 void StoreIC::GenerateNormal(MacroAssembler* masm) {
1010 Label miss; 988 Label miss;
1011 Register receiver = ReceiverRegister(); 989 Register receiver = StoreConvention::ReceiverRegister();
1012 Register name = NameRegister(); 990 Register name = StoreConvention::NameRegister();
1013 Register value = ValueRegister(); 991 Register value = StoreConvention::ValueRegister();
1014 Register dictionary = a3; 992 Register dictionary = a3;
1015 DCHECK(receiver.is(a1)); 993 DCHECK(receiver.is(a1));
1016 DCHECK(name.is(a2)); 994 DCHECK(name.is(a2));
1017 DCHECK(value.is(a0)); 995 DCHECK(value.is(a0));
1018 996
1019 __ lw(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 997 __ lw(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
1020 998
1021 GenerateDictionaryStore(masm, &miss, dictionary, name, value, t0, t1); 999 GenerateDictionaryStore(masm, &miss, dictionary, name, value, t0, t1);
1022 Counters* counters = masm->isolate()->counters(); 1000 Counters* counters = masm->isolate()->counters();
1023 __ IncrementCounter(counters->store_normal_hit(), 1, t0, t1); 1001 __ IncrementCounter(counters->store_normal_hit(), 1, t0, t1);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 patcher.ChangeBranchCondition(ne); 1099 patcher.ChangeBranchCondition(ne);
1122 } else { 1100 } else {
1123 DCHECK(Assembler::IsBne(branch_instr)); 1101 DCHECK(Assembler::IsBne(branch_instr));
1124 patcher.ChangeBranchCondition(eq); 1102 patcher.ChangeBranchCondition(eq);
1125 } 1103 }
1126 } 1104 }
1127 } 1105 }
1128 } // namespace v8::internal 1106 } // namespace v8::internal
1129 1107
1130 #endif // V8_TARGET_ARCH_MIPS 1108 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/mips/ic-conventions-mips.cc ('k') | src/ic/mips64/access-compiler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698