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

Side by Side Diff: src/ppc/macro-assembler-ppc.cc

Issue 2140133003: Version 5.2.361.42 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.2
Patch Set: Created 4 years, 5 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/mips64/macro-assembler-mips64.cc ('k') | src/s390/macro-assembler-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_PPC 8 #if V8_TARGET_ARCH_PPC
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 4679 matching lines...) Expand 10 before | Expand all | Expand 10 after
4690 stfsu(src, mem); 4690 stfsu(src, mem);
4691 } 4691 }
4692 } 4692 }
4693 4693
4694 void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg, 4694 void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg,
4695 Register scratch_reg, 4695 Register scratch_reg,
4696 Register scratch2_reg, 4696 Register scratch2_reg,
4697 Label* no_memento_found) { 4697 Label* no_memento_found) {
4698 Label map_check; 4698 Label map_check;
4699 Label top_check; 4699 Label top_check;
4700 ExternalReference new_space_allocation_top = 4700 ExternalReference new_space_allocation_top_adr =
4701 ExternalReference::new_space_allocation_top_address(isolate()); 4701 ExternalReference::new_space_allocation_top_address(isolate());
4702 const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag; 4702 const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag;
4703 const int kMementoEndOffset = kMementoMapOffset + AllocationMemento::kSize; 4703 const int kMementoEndOffset = kMementoMapOffset + AllocationMemento::kSize;
4704 Register mask = scratch2_reg; 4704 Register mask = scratch2_reg;
4705 4705
4706 DCHECK(!AreAliased(receiver_reg, scratch_reg, mask)); 4706 DCHECK(!AreAliased(receiver_reg, scratch_reg, mask));
4707 4707
4708 // Bail out if the object is not in new space. 4708 // Bail out if the object is not in new space.
4709 JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found); 4709 JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found);
4710 4710
4711 DCHECK((~Page::kPageAlignmentMask & 0xffff) == 0); 4711 DCHECK((~Page::kPageAlignmentMask & 0xffff) == 0);
4712 lis(mask, Operand((~Page::kPageAlignmentMask >> 16))); 4712 lis(mask, Operand((~Page::kPageAlignmentMask >> 16)));
4713 addi(scratch_reg, receiver_reg, Operand(kMementoEndOffset)); 4713 addi(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
4714 4714
4715 // If the object is in new space, we need to check whether it is on the same 4715 // If the object is in new space, we need to check whether it is on the same
4716 // page as the current top. 4716 // page as the current top.
4717 Xor(r0, scratch_reg, Operand(new_space_allocation_top)); 4717 mov(ip, Operand(new_space_allocation_top_adr));
4718 LoadP(ip, MemOperand(ip));
4719 Xor(r0, scratch_reg, Operand(ip));
4718 and_(r0, r0, mask, SetRC); 4720 and_(r0, r0, mask, SetRC);
4719 beq(&top_check, cr0); 4721 beq(&top_check, cr0);
4720 // The object is on a different page than allocation top. Bail out if the 4722 // The object is on a different page than allocation top. Bail out if the
4721 // object sits on the page boundary as no memento can follow and we cannot 4723 // object sits on the page boundary as no memento can follow and we cannot
4722 // touch the memory following it. 4724 // touch the memory following it.
4723 xor_(r0, scratch_reg, receiver_reg); 4725 xor_(r0, scratch_reg, receiver_reg);
4724 and_(r0, r0, mask, SetRC); 4726 and_(r0, r0, mask, SetRC);
4725 bne(no_memento_found, cr0); 4727 bne(no_memento_found, cr0);
4726 // Continue with the actual map check. 4728 // Continue with the actual map check.
4727 b(&map_check); 4729 b(&map_check);
4728 // If top is on the same page as the current object, we need to check whether 4730 // If top is on the same page as the current object, we need to check whether
4729 // we are below top. 4731 // we are below top.
4730 bind(&top_check); 4732 bind(&top_check);
4731 Cmpi(scratch_reg, Operand(new_space_allocation_top), r0); 4733 cmp(scratch_reg, ip);
4732 bgt(no_memento_found); 4734 bgt(no_memento_found);
4733 // Memento map check. 4735 // Memento map check.
4734 bind(&map_check); 4736 bind(&map_check);
4735 LoadP(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset)); 4737 LoadP(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset));
4736 Cmpi(scratch_reg, Operand(isolate()->factory()->allocation_memento_map()), 4738 Cmpi(scratch_reg, Operand(isolate()->factory()->allocation_memento_map()),
4737 r0); 4739 r0);
4738 } 4740 }
4739 4741
4740 Register GetRegisterThatIsNotOneOf(Register reg1, Register reg2, Register reg3, 4742 Register GetRegisterThatIsNotOneOf(Register reg1, Register reg2, Register reg3,
4741 Register reg4, Register reg5, 4743 Register reg4, Register reg5,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
4887 } 4889 }
4888 if (mag.shift > 0) srawi(result, result, mag.shift); 4890 if (mag.shift > 0) srawi(result, result, mag.shift);
4889 ExtractBit(r0, dividend, 31); 4891 ExtractBit(r0, dividend, 31);
4890 add(result, result, r0); 4892 add(result, result, r0);
4891 } 4893 }
4892 4894
4893 } // namespace internal 4895 } // namespace internal
4894 } // namespace v8 4896 } // namespace v8
4895 4897
4896 #endif // V8_TARGET_ARCH_PPC 4898 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/s390/macro-assembler-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698