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

Side by Side Diff: src/arm64/stub-cache-arm64.cc

Issue 207743003: ARM64: Fix Register and FPRegister copy constructors. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « src/arm64/assembler-arm64.h ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); 388 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate());
389 __ LoadObject(scratch1, constant); 389 __ LoadObject(scratch1, constant);
390 __ Cmp(value_reg, scratch1); 390 __ Cmp(value_reg, scratch1);
391 __ B(ne, miss_label); 391 __ B(ne, miss_label);
392 } else if (representation.IsSmi()) { 392 } else if (representation.IsSmi()) {
393 __ JumpIfNotSmi(value_reg, miss_label); 393 __ JumpIfNotSmi(value_reg, miss_label);
394 } else if (representation.IsHeapObject()) { 394 } else if (representation.IsHeapObject()) {
395 __ JumpIfSmi(value_reg, miss_label); 395 __ JumpIfSmi(value_reg, miss_label);
396 } else if (representation.IsDouble()) { 396 } else if (representation.IsDouble()) {
397 UseScratchRegisterScope temps(masm); 397 UseScratchRegisterScope temps(masm);
398 Register temp_double = temps.AcquireD(); 398 DoubleRegister temp_double = temps.AcquireD();
399 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag); 399 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag);
400 400
401 Label do_store, heap_number; 401 Label do_store, heap_number;
402 __ AllocateHeapNumber(storage_reg, slow, scratch1, scratch2); 402 __ AllocateHeapNumber(storage_reg, slow, scratch1, scratch2);
403 403
404 __ JumpIfSmi(value_reg, &do_store); 404 __ JumpIfSmi(value_reg, &do_store);
405 405
406 __ CheckMap(value_reg, scratch1, Heap::kHeapNumberMapRootIndex, 406 __ CheckMap(value_reg, scratch1, Heap::kHeapNumberMapRootIndex,
407 miss_label, DONT_DO_SMI_CHECK); 407 miss_label, DONT_DO_SMI_CHECK);
408 __ Ldr(temp_double, FieldMemOperand(value_reg, HeapNumber::kValueOffset)); 408 __ Ldr(temp_double, FieldMemOperand(value_reg, HeapNumber::kValueOffset));
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 index -= object->map()->inobject_properties(); 539 index -= object->map()->inobject_properties();
540 540
541 Representation representation = lookup->representation(); 541 Representation representation = lookup->representation();
542 ASSERT(!representation.IsNone()); 542 ASSERT(!representation.IsNone());
543 if (representation.IsSmi()) { 543 if (representation.IsSmi()) {
544 __ JumpIfNotSmi(value_reg, miss_label); 544 __ JumpIfNotSmi(value_reg, miss_label);
545 } else if (representation.IsHeapObject()) { 545 } else if (representation.IsHeapObject()) {
546 __ JumpIfSmi(value_reg, miss_label); 546 __ JumpIfSmi(value_reg, miss_label);
547 } else if (representation.IsDouble()) { 547 } else if (representation.IsDouble()) {
548 UseScratchRegisterScope temps(masm); 548 UseScratchRegisterScope temps(masm);
549 Register temp_double = temps.AcquireD(); 549 DoubleRegister temp_double = temps.AcquireD();
550 550
551 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag); 551 __ SmiUntagToDouble(temp_double, value_reg, kSpeculativeUntag);
552 552
553 // Load the double storage. 553 // Load the double storage.
554 if (index < 0) { 554 if (index < 0) {
555 int offset = (index * kPointerSize) + object->map()->instance_size(); 555 int offset = (index * kPointerSize) + object->map()->instance_size();
556 __ Ldr(scratch1, FieldMemOperand(receiver_reg, offset)); 556 __ Ldr(scratch1, FieldMemOperand(receiver_reg, offset));
557 } else { 557 } else {
558 int offset = (index * kPointerSize) + FixedArray::kHeaderSize; 558 int offset = (index * kPointerSize) + FixedArray::kHeaderSize;
559 __ Ldr(scratch1, 559 __ Ldr(scratch1,
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
1487 1487
1488 // Miss case, call the runtime. 1488 // Miss case, call the runtime.
1489 __ Bind(&miss); 1489 __ Bind(&miss);
1490 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1490 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1491 } 1491 }
1492 1492
1493 1493
1494 } } // namespace v8::internal 1494 } } // namespace v8::internal
1495 1495
1496 #endif // V8_TARGET_ARCH_ARM64 1496 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/assembler-arm64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698