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

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

Issue 2065063002: [Heap] Fix comparing against new space top pointer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation errors Created 4 years, 6 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/mips/macro-assembler-mips.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 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 6940 matching lines...) Expand 10 before | Expand all | Expand 10 after
6951 cvt_w_d(temp_double_reg, input_reg); 6951 cvt_w_d(temp_double_reg, input_reg);
6952 mfc1(result_reg, temp_double_reg); 6952 mfc1(result_reg, temp_double_reg);
6953 bind(&done); 6953 bind(&done);
6954 } 6954 }
6955 6955
6956 void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg, 6956 void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg,
6957 Register scratch_reg, 6957 Register scratch_reg,
6958 Label* no_memento_found) { 6958 Label* no_memento_found) {
6959 Label map_check; 6959 Label map_check;
6960 Label top_check; 6960 Label top_check;
6961 ExternalReference new_space_allocation_top = 6961 ExternalReference new_space_allocation_top_adr =
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 Daddu(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 li(at, Operand(new_space_allocation_top_adr));
6972 ld(at, MemOperand(at));
6973 Xor(scratch_reg, scratch_reg, Operand(at));
6972 And(scratch_reg, scratch_reg, Operand(~Page::kPageAlignmentMask)); 6974 And(scratch_reg, scratch_reg, Operand(~Page::kPageAlignmentMask));
6973 Branch(&top_check, eq, scratch_reg, Operand(zero_reg)); 6975 Branch(&top_check, eq, scratch_reg, Operand(zero_reg));
6974 // The object is on a different page than allocation top. Bail out if the 6976 // 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 6977 // object sits on the page boundary as no memento can follow and we cannot
6976 // touch the memory following it. 6978 // touch the memory following it.
6977 Daddu(scratch_reg, receiver_reg, Operand(kMementoEndOffset)); 6979 Daddu(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
6978 Xor(scratch_reg, scratch_reg, Operand(receiver_reg)); 6980 Xor(scratch_reg, scratch_reg, Operand(receiver_reg));
6979 And(scratch_reg, scratch_reg, Operand(~Page::kPageAlignmentMask)); 6981 And(scratch_reg, scratch_reg, Operand(~Page::kPageAlignmentMask));
6980 Branch(no_memento_found, ne, scratch_reg, Operand(zero_reg)); 6982 Branch(no_memento_found, ne, scratch_reg, Operand(zero_reg));
6981 // Continue with the actual map check. 6983 // Continue with the actual map check.
6982 jmp(&map_check); 6984 jmp(&map_check);
6983 // If top is on the same page as the current object, we need to check whether 6985 // If top is on the same page as the current object, we need to check whether
6984 // we are below top. 6986 // we are below top.
6985 bind(&top_check); 6987 bind(&top_check);
6986 Daddu(scratch_reg, receiver_reg, Operand(kMementoEndOffset)); 6988 Daddu(scratch_reg, receiver_reg, Operand(kMementoEndOffset));
6987 li(at, Operand(new_space_allocation_top)); 6989 li(at, Operand(new_space_allocation_top_adr));
6988 ld(at, MemOperand(at)); 6990 ld(at, MemOperand(at));
6989 Branch(no_memento_found, gt, scratch_reg, Operand(at)); 6991 Branch(no_memento_found, gt, scratch_reg, Operand(at));
6990 // Memento map check. 6992 // Memento map check.
6991 bind(&map_check); 6993 bind(&map_check);
6992 ld(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset)); 6994 ld(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset));
6993 Branch(no_memento_found, ne, scratch_reg, 6995 Branch(no_memento_found, ne, scratch_reg,
6994 Operand(isolate()->factory()->allocation_memento_map())); 6996 Operand(isolate()->factory()->allocation_memento_map()));
6995 } 6997 }
6996 6998
6997 6999
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
7141 if (mag.shift > 0) sra(result, result, mag.shift); 7143 if (mag.shift > 0) sra(result, result, mag.shift);
7142 srl(at, dividend, 31); 7144 srl(at, dividend, 31);
7143 Addu(result, result, Operand(at)); 7145 Addu(result, result, Operand(at));
7144 } 7146 }
7145 7147
7146 7148
7147 } // namespace internal 7149 } // namespace internal
7148 } // namespace v8 7150 } // namespace v8
7149 7151
7150 #endif // V8_TARGET_ARCH_MIPS64 7152 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | test/mjsunit/regress/regress-619382.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698