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

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

Issue 1051233002: Reland "Merge old data and pointer space." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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.h ('k') | src/mips64/lithium-codegen-mips64.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 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 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 3310 matching lines...) Expand 10 before | Expand all | Expand 10 after
3321 lw(t9, MemOperand(topaddr)); 3321 lw(t9, MemOperand(topaddr));
3322 Check(eq, kUnexpectedAllocationTop, result, Operand(t9)); 3322 Check(eq, kUnexpectedAllocationTop, result, Operand(t9));
3323 } 3323 }
3324 // Load allocation limit into t9. Result already contains allocation top. 3324 // Load allocation limit into t9. Result already contains allocation top.
3325 lw(t9, MemOperand(topaddr, limit - top)); 3325 lw(t9, MemOperand(topaddr, limit - top));
3326 } 3326 }
3327 3327
3328 if ((flags & DOUBLE_ALIGNMENT) != 0) { 3328 if ((flags & DOUBLE_ALIGNMENT) != 0) {
3329 // Align the next allocation. Storing the filler map without checking top is 3329 // Align the next allocation. Storing the filler map without checking top is
3330 // safe in new-space because the limit of the heap is aligned there. 3330 // safe in new-space because the limit of the heap is aligned there.
3331 DCHECK((flags & PRETENURE_OLD_POINTER_SPACE) == 0);
3332 DCHECK(kPointerAlignment * 2 == kDoubleAlignment); 3331 DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
3333 And(scratch2, result, Operand(kDoubleAlignmentMask)); 3332 And(scratch2, result, Operand(kDoubleAlignmentMask));
3334 Label aligned; 3333 Label aligned;
3335 Branch(&aligned, eq, scratch2, Operand(zero_reg)); 3334 Branch(&aligned, eq, scratch2, Operand(zero_reg));
3336 if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) { 3335 if ((flags & PRETENURE) != 0) {
3337 Branch(gc_required, Ugreater_equal, result, Operand(t9)); 3336 Branch(gc_required, Ugreater_equal, result, Operand(t9));
3338 } 3337 }
3339 li(scratch2, Operand(isolate()->factory()->one_pointer_filler_map())); 3338 li(scratch2, Operand(isolate()->factory()->one_pointer_filler_map()));
3340 sw(scratch2, MemOperand(result)); 3339 sw(scratch2, MemOperand(result));
3341 Addu(result, result, Operand(kDoubleSize / 2)); 3340 Addu(result, result, Operand(kDoubleSize / 2));
3342 bind(&aligned); 3341 bind(&aligned);
3343 } 3342 }
3344 3343
3345 // Calculate new top and bail out if new space is exhausted. Use result 3344 // Calculate new top and bail out if new space is exhausted. Use result
3346 // to calculate the new top. 3345 // to calculate the new top.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
3408 lw(t9, MemOperand(topaddr)); 3407 lw(t9, MemOperand(topaddr));
3409 Check(eq, kUnexpectedAllocationTop, result, Operand(t9)); 3408 Check(eq, kUnexpectedAllocationTop, result, Operand(t9));
3410 } 3409 }
3411 // Load allocation limit into t9. Result already contains allocation top. 3410 // Load allocation limit into t9. Result already contains allocation top.
3412 lw(t9, MemOperand(topaddr, limit - top)); 3411 lw(t9, MemOperand(topaddr, limit - top));
3413 } 3412 }
3414 3413
3415 if ((flags & DOUBLE_ALIGNMENT) != 0) { 3414 if ((flags & DOUBLE_ALIGNMENT) != 0) {
3416 // Align the next allocation. Storing the filler map without checking top is 3415 // Align the next allocation. Storing the filler map without checking top is
3417 // safe in new-space because the limit of the heap is aligned there. 3416 // safe in new-space because the limit of the heap is aligned there.
3418 DCHECK((flags & PRETENURE_OLD_POINTER_SPACE) == 0);
3419 DCHECK(kPointerAlignment * 2 == kDoubleAlignment); 3417 DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
3420 And(scratch2, result, Operand(kDoubleAlignmentMask)); 3418 And(scratch2, result, Operand(kDoubleAlignmentMask));
3421 Label aligned; 3419 Label aligned;
3422 Branch(&aligned, eq, scratch2, Operand(zero_reg)); 3420 Branch(&aligned, eq, scratch2, Operand(zero_reg));
3423 if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) { 3421 if ((flags & PRETENURE) != 0) {
3424 Branch(gc_required, Ugreater_equal, result, Operand(t9)); 3422 Branch(gc_required, Ugreater_equal, result, Operand(t9));
3425 } 3423 }
3426 li(scratch2, Operand(isolate()->factory()->one_pointer_filler_map())); 3424 li(scratch2, Operand(isolate()->factory()->one_pointer_filler_map()));
3427 sw(scratch2, MemOperand(result)); 3425 sw(scratch2, MemOperand(result));
3428 Addu(result, result, Operand(kDoubleSize / 2)); 3426 Addu(result, result, Operand(kDoubleSize / 2));
3429 bind(&aligned); 3427 bind(&aligned);
3430 } 3428 }
3431 3429
3432 // Calculate new top and bail out if new space is exhausted. Use result 3430 // Calculate new top and bail out if new space is exhausted. Use result
3433 // to calculate the new top. Object size may be in words so a shift is 3431 // to calculate the new top. Object size may be in words so a shift is
(...skipping 2631 matching lines...) Expand 10 before | Expand all | Expand 10 after
6065 } 6063 }
6066 if (mag.shift > 0) sra(result, result, mag.shift); 6064 if (mag.shift > 0) sra(result, result, mag.shift);
6067 srl(at, dividend, 31); 6065 srl(at, dividend, 31);
6068 Addu(result, result, Operand(at)); 6066 Addu(result, result, Operand(at));
6069 } 6067 }
6070 6068
6071 6069
6072 } } // namespace v8::internal 6070 } } // namespace v8::internal
6073 6071
6074 #endif // V8_TARGET_ARCH_MIPS 6072 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698