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

Side by Side Diff: src/s390/macro-assembler-s390.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/ppc/macro-assembler-ppc.cc ('k') | test/mjsunit/regress/regress-619382.js » ('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_S390 8 #if V8_TARGET_ARCH_S390
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 3637 matching lines...) Expand 10 before | Expand all | Expand 10 after
3648 StoreP(src, mem, scratch); 3648 StoreP(src, mem, scratch);
3649 } 3649 }
3650 } 3650 }
3651 3651
3652 void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg, 3652 void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg,
3653 Register scratch_reg, 3653 Register scratch_reg,
3654 Register scratch2_reg, 3654 Register scratch2_reg,
3655 Label* no_memento_found) { 3655 Label* no_memento_found) {
3656 Label map_check; 3656 Label map_check;
3657 Label top_check; 3657 Label top_check;
3658 ExternalReference new_space_allocation_top = 3658 ExternalReference new_space_allocation_top_adr =
3659 ExternalReference::new_space_allocation_top_address(isolate()); 3659 ExternalReference::new_space_allocation_top_address(isolate());
3660 const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag; 3660 const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag;
3661 const int kMementoEndOffset = kMementoMapOffset + AllocationMemento::kSize; 3661 const int kMementoEndOffset = kMementoMapOffset + AllocationMemento::kSize;
3662 3662
3663 DCHECK(!AreAliased(receiver_reg, scratch_reg)); 3663 DCHECK(!AreAliased(receiver_reg, scratch_reg));
3664 3664
3665 // Bail out if the object is not in new space. 3665 // Bail out if the object is not in new space.
3666 JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found); 3666 JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found);
3667 3667
3668 DCHECK((~Page::kPageAlignmentMask & 0xffff) == 0); 3668 DCHECK((~Page::kPageAlignmentMask & 0xffff) == 0);
3669 AddP(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
3670 3669
3671 // If the object is in new space, we need to check whether it is on the same 3670 // If the object is in new space, we need to check whether it is on the same
3672 // page as the current top. 3671 // page as the current top.
3673 XorP(r0, scratch_reg, Operand(new_space_allocation_top)); 3672 AddP(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
3673 mov(ip, Operand(new_space_allocation_top_adr));
3674 LoadP(ip, MemOperand(ip));
3675 XorP(r0, scratch_reg, ip);
3674 AndP(r0, r0, Operand(~Page::kPageAlignmentMask)); 3676 AndP(r0, r0, Operand(~Page::kPageAlignmentMask));
3675 beq(&top_check, Label::kNear); 3677 beq(&top_check, Label::kNear);
3676 // The object is on a different page than allocation top. Bail out if the 3678 // The object is on a different page than allocation top. Bail out if the
3677 // object sits on the page boundary as no memento can follow and we cannot 3679 // object sits on the page boundary as no memento can follow and we cannot
3678 // touch the memory following it. 3680 // touch the memory following it.
3679 XorP(r0, scratch_reg, receiver_reg); 3681 XorP(r0, scratch_reg, receiver_reg);
3680 AndP(r0, r0, Operand(~Page::kPageAlignmentMask)); 3682 AndP(r0, r0, Operand(~Page::kPageAlignmentMask));
3681 bne(no_memento_found); 3683 bne(no_memento_found);
3682 // Continue with the actual map check. 3684 // Continue with the actual map check.
3683 b(&map_check, Label::kNear); 3685 b(&map_check, Label::kNear);
3684 // If top is on the same page as the current object, we need to check whether 3686 // If top is on the same page as the current object, we need to check whether
3685 // we are below top. 3687 // we are below top.
3686 bind(&top_check); 3688 bind(&top_check);
3687 CmpP(scratch_reg, Operand(new_space_allocation_top)); 3689 CmpP(scratch_reg, ip);
3688 bgt(no_memento_found); 3690 bgt(no_memento_found);
3689 // Memento map check. 3691 // Memento map check.
3690 bind(&map_check); 3692 bind(&map_check);
3691 LoadP(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset)); 3693 LoadP(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset));
3692 CmpP(scratch_reg, Operand(isolate()->factory()->allocation_memento_map())); 3694 CmpP(scratch_reg, Operand(isolate()->factory()->allocation_memento_map()));
3693 } 3695 }
3694 3696
3695 Register GetRegisterThatIsNotOneOf(Register reg1, Register reg2, Register reg3, 3697 Register GetRegisterThatIsNotOneOf(Register reg1, Register reg2, Register reg3,
3696 Register reg4, Register reg5, 3698 Register reg4, Register reg5,
3697 Register reg6) { 3699 Register reg6) {
(...skipping 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after
5524 } 5526 }
5525 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); 5527 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift));
5526 ExtractBit(r0, dividend, 31); 5528 ExtractBit(r0, dividend, 31);
5527 AddP(result, r0); 5529 AddP(result, r0);
5528 } 5530 }
5529 5531
5530 } // namespace internal 5532 } // namespace internal
5531 } // namespace v8 5533 } // namespace v8
5532 5534
5533 #endif // V8_TARGET_ARCH_S390 5535 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/ppc/macro-assembler-ppc.cc ('k') | test/mjsunit/regress/regress-619382.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698