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

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

Issue 1989483002: MIPS64: Fix 'Remove usages of Heap::NewSpaceStart and its external reference'. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | 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 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/base/division-by-constant.h" 9 #include "src/base/division-by-constant.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 6949 matching lines...) Expand 10 before | Expand all | Expand 10 after
6960 Label top_check; 6960 Label top_check;
6961 ExternalReference new_space_allocation_top = 6961 ExternalReference new_space_allocation_top =
6962 ExternalReference::new_space_allocation_top_address(isolate()); 6962 ExternalReference::new_space_allocation_top_address(isolate());
6963 const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag; 6963 const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag;
6964 const int kMementoEndOffset = kMementoMapOffset + AllocationMemento::kSize; 6964 const int kMementoEndOffset = kMementoMapOffset + AllocationMemento::kSize;
6965 6965
6966 // Bail out if the object is not in new space. 6966 // Bail out if the object is not in new space.
6967 JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found); 6967 JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found);
6968 // If the object is in new space, we need to check whether it is on the same 6968 // If the object is in new space, we need to check whether it is on the same
6969 // page as the current top. 6969 // page as the current top.
6970 Addu(scratch_reg, receiver_reg, Operand(kMementoEndOffset)); 6970 Daddu(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
6971 Xor(scratch_reg, scratch_reg, Operand(new_space_allocation_top)); 6971 Xor(scratch_reg, scratch_reg, Operand(new_space_allocation_top));
6972 And(scratch_reg, scratch_reg, Operand(~Page::kPageAlignmentMask)); 6972 And(scratch_reg, scratch_reg, Operand(~Page::kPageAlignmentMask));
6973 Branch(&top_check, eq, scratch_reg, Operand(zero_reg)); 6973 Branch(&top_check, eq, scratch_reg, Operand(zero_reg));
6974 // The object is on a different page than allocation top. Bail out if the 6974 // The object is on a different page than allocation top. Bail out if the
6975 // object sits on the page boundary as no memento can follow and we cannot 6975 // object sits on the page boundary as no memento can follow and we cannot
6976 // touch the memory following it. 6976 // touch the memory following it.
6977 Addu(scratch_reg, receiver_reg, Operand(kMementoEndOffset)); 6977 Daddu(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
6978 Xor(scratch_reg, scratch_reg, Operand(receiver_reg)); 6978 Xor(scratch_reg, scratch_reg, Operand(receiver_reg));
6979 And(scratch_reg, scratch_reg, Operand(~Page::kPageAlignmentMask)); 6979 And(scratch_reg, scratch_reg, Operand(~Page::kPageAlignmentMask));
6980 Branch(no_memento_found, ne, scratch_reg, Operand(zero_reg)); 6980 Branch(no_memento_found, ne, scratch_reg, Operand(zero_reg));
6981 // Continue with the actual map check. 6981 // Continue with the actual map check.
6982 jmp(&map_check); 6982 jmp(&map_check);
6983 // If top is on the same page as the current object, we need to check whether 6983 // If top is on the same page as the current object, we need to check whether
6984 // we are below top. 6984 // we are below top.
6985 bind(&top_check); 6985 bind(&top_check);
6986 Addu(scratch_reg, receiver_reg, Operand(kMementoEndOffset)); 6986 Daddu(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
6987 li(at, Operand(new_space_allocation_top)); 6987 li(at, Operand(new_space_allocation_top));
6988 lw(at, MemOperand(at)); 6988 ld(at, MemOperand(at));
6989 Branch(no_memento_found, gt, scratch_reg, Operand(at)); 6989 Branch(no_memento_found, gt, scratch_reg, Operand(at));
6990 // Memento map check. 6990 // Memento map check.
6991 bind(&map_check); 6991 bind(&map_check);
6992 lw(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset)); 6992 ld(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset));
6993 Branch(no_memento_found, ne, scratch_reg, 6993 Branch(no_memento_found, ne, scratch_reg,
6994 Operand(isolate()->factory()->allocation_memento_map())); 6994 Operand(isolate()->factory()->allocation_memento_map()));
6995 } 6995 }
6996 6996
6997 6997
6998 Register GetRegisterThatIsNotOneOf(Register reg1, 6998 Register GetRegisterThatIsNotOneOf(Register reg1,
6999 Register reg2, 6999 Register reg2,
7000 Register reg3, 7000 Register reg3,
7001 Register reg4, 7001 Register reg4,
7002 Register reg5, 7002 Register reg5,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
7141 if (mag.shift > 0) sra(result, result, mag.shift); 7141 if (mag.shift > 0) sra(result, result, mag.shift);
7142 srl(at, dividend, 31); 7142 srl(at, dividend, 31);
7143 Addu(result, result, Operand(at)); 7143 Addu(result, result, Operand(at));
7144 } 7144 }
7145 7145
7146 7146
7147 } // namespace internal 7147 } // namespace internal
7148 } // namespace v8 7148 } // namespace v8
7149 7149
7150 #endif // V8_TARGET_ARCH_MIPS64 7150 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698