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

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

Issue 1012023002: Merge old data and pointer space. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/x87/macro-assembler-x87.h ('k') | test/cctest/test-alloc.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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 1291
1292 // Load address of new object into result. 1292 // Load address of new object into result.
1293 LoadAllocationTopHelper(result, scratch, flags); 1293 LoadAllocationTopHelper(result, scratch, flags);
1294 1294
1295 ExternalReference allocation_limit = 1295 ExternalReference allocation_limit =
1296 AllocationUtils::GetAllocationLimitReference(isolate(), flags); 1296 AllocationUtils::GetAllocationLimitReference(isolate(), flags);
1297 1297
1298 // Align the next allocation. Storing the filler map without checking top is 1298 // Align the next allocation. Storing the filler map without checking top is
1299 // safe in new-space because the limit of the heap is aligned there. 1299 // safe in new-space because the limit of the heap is aligned there.
1300 if ((flags & DOUBLE_ALIGNMENT) != 0) { 1300 if ((flags & DOUBLE_ALIGNMENT) != 0) {
1301 DCHECK((flags & PRETENURE_OLD_POINTER_SPACE) == 0);
1302 DCHECK(kPointerAlignment * 2 == kDoubleAlignment); 1301 DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
1303 Label aligned; 1302 Label aligned;
1304 test(result, Immediate(kDoubleAlignmentMask)); 1303 test(result, Immediate(kDoubleAlignmentMask));
1305 j(zero, &aligned, Label::kNear); 1304 j(zero, &aligned, Label::kNear);
1306 if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) { 1305 if ((flags & PRETENURE) != 0) {
1307 cmp(result, Operand::StaticVariable(allocation_limit)); 1306 cmp(result, Operand::StaticVariable(allocation_limit));
1308 j(above_equal, gc_required); 1307 j(above_equal, gc_required);
1309 } 1308 }
1310 mov(Operand(result, 0), 1309 mov(Operand(result, 0),
1311 Immediate(isolate()->factory()->one_pointer_filler_map())); 1310 Immediate(isolate()->factory()->one_pointer_filler_map()));
1312 add(result, Immediate(kDoubleSize / 2)); 1311 add(result, Immediate(kDoubleSize / 2));
1313 bind(&aligned); 1312 bind(&aligned);
1314 } 1313 }
1315 1314
1316 // Calculate new top and bail out if space is exhausted. 1315 // Calculate new top and bail out if space is exhausted.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1368 1367
1369 // Load address of new object into result. 1368 // Load address of new object into result.
1370 LoadAllocationTopHelper(result, scratch, flags); 1369 LoadAllocationTopHelper(result, scratch, flags);
1371 1370
1372 ExternalReference allocation_limit = 1371 ExternalReference allocation_limit =
1373 AllocationUtils::GetAllocationLimitReference(isolate(), flags); 1372 AllocationUtils::GetAllocationLimitReference(isolate(), flags);
1374 1373
1375 // Align the next allocation. Storing the filler map without checking top is 1374 // Align the next allocation. Storing the filler map without checking top is
1376 // safe in new-space because the limit of the heap is aligned there. 1375 // safe in new-space because the limit of the heap is aligned there.
1377 if ((flags & DOUBLE_ALIGNMENT) != 0) { 1376 if ((flags & DOUBLE_ALIGNMENT) != 0) {
1378 DCHECK((flags & PRETENURE_OLD_POINTER_SPACE) == 0);
1379 DCHECK(kPointerAlignment * 2 == kDoubleAlignment); 1377 DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
1380 Label aligned; 1378 Label aligned;
1381 test(result, Immediate(kDoubleAlignmentMask)); 1379 test(result, Immediate(kDoubleAlignmentMask));
1382 j(zero, &aligned, Label::kNear); 1380 j(zero, &aligned, Label::kNear);
1383 if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) { 1381 if ((flags & PRETENURE) != 0) {
1384 cmp(result, Operand::StaticVariable(allocation_limit)); 1382 cmp(result, Operand::StaticVariable(allocation_limit));
1385 j(above_equal, gc_required); 1383 j(above_equal, gc_required);
1386 } 1384 }
1387 mov(Operand(result, 0), 1385 mov(Operand(result, 0),
1388 Immediate(isolate()->factory()->one_pointer_filler_map())); 1386 Immediate(isolate()->factory()->one_pointer_filler_map()));
1389 add(result, Immediate(kDoubleSize / 2)); 1387 add(result, Immediate(kDoubleSize / 2));
1390 bind(&aligned); 1388 bind(&aligned);
1391 } 1389 }
1392 1390
1393 // Calculate new top and bail out if space is exhausted. 1391 // Calculate new top and bail out if space is exhausted.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 1441
1444 // Load address of new object into result. 1442 // Load address of new object into result.
1445 LoadAllocationTopHelper(result, scratch, flags); 1443 LoadAllocationTopHelper(result, scratch, flags);
1446 1444
1447 ExternalReference allocation_limit = 1445 ExternalReference allocation_limit =
1448 AllocationUtils::GetAllocationLimitReference(isolate(), flags); 1446 AllocationUtils::GetAllocationLimitReference(isolate(), flags);
1449 1447
1450 // Align the next allocation. Storing the filler map without checking top is 1448 // Align the next allocation. Storing the filler map without checking top is
1451 // safe in new-space because the limit of the heap is aligned there. 1449 // safe in new-space because the limit of the heap is aligned there.
1452 if ((flags & DOUBLE_ALIGNMENT) != 0) { 1450 if ((flags & DOUBLE_ALIGNMENT) != 0) {
1453 DCHECK((flags & PRETENURE_OLD_POINTER_SPACE) == 0);
1454 DCHECK(kPointerAlignment * 2 == kDoubleAlignment); 1451 DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
1455 Label aligned; 1452 Label aligned;
1456 test(result, Immediate(kDoubleAlignmentMask)); 1453 test(result, Immediate(kDoubleAlignmentMask));
1457 j(zero, &aligned, Label::kNear); 1454 j(zero, &aligned, Label::kNear);
1458 if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) { 1455 if ((flags & PRETENURE) != 0) {
1459 cmp(result, Operand::StaticVariable(allocation_limit)); 1456 cmp(result, Operand::StaticVariable(allocation_limit));
1460 j(above_equal, gc_required); 1457 j(above_equal, gc_required);
1461 } 1458 }
1462 mov(Operand(result, 0), 1459 mov(Operand(result, 0),
1463 Immediate(isolate()->factory()->one_pointer_filler_map())); 1460 Immediate(isolate()->factory()->one_pointer_filler_map()));
1464 add(result, Immediate(kDoubleSize / 2)); 1461 add(result, Immediate(kDoubleSize / 2));
1465 bind(&aligned); 1462 bind(&aligned);
1466 } 1463 }
1467 1464
1468 // Calculate new top and bail out if space is exhausted. 1465 // Calculate new top and bail out if space is exhausted.
(...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
3114 if (mag.shift > 0) sar(edx, mag.shift); 3111 if (mag.shift > 0) sar(edx, mag.shift);
3115 mov(eax, dividend); 3112 mov(eax, dividend);
3116 shr(eax, 31); 3113 shr(eax, 31);
3117 add(edx, eax); 3114 add(edx, eax);
3118 } 3115 }
3119 3116
3120 3117
3121 } } // namespace v8::internal 3118 } } // namespace v8::internal
3122 3119
3123 #endif // V8_TARGET_ARCH_X87 3120 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698