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

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

Issue 1023443004: Version 4.3.48.1 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.3.48
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);
1301 DCHECK(kPointerAlignment * 2 == kDoubleAlignment); 1302 DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
1302 Label aligned; 1303 Label aligned;
1303 test(result, Immediate(kDoubleAlignmentMask)); 1304 test(result, Immediate(kDoubleAlignmentMask));
1304 j(zero, &aligned, Label::kNear); 1305 j(zero, &aligned, Label::kNear);
1305 if ((flags & PRETENURE) != 0) { 1306 if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) {
1306 cmp(result, Operand::StaticVariable(allocation_limit)); 1307 cmp(result, Operand::StaticVariable(allocation_limit));
1307 j(above_equal, gc_required); 1308 j(above_equal, gc_required);
1308 } 1309 }
1309 mov(Operand(result, 0), 1310 mov(Operand(result, 0),
1310 Immediate(isolate()->factory()->one_pointer_filler_map())); 1311 Immediate(isolate()->factory()->one_pointer_filler_map()));
1311 add(result, Immediate(kDoubleSize / 2)); 1312 add(result, Immediate(kDoubleSize / 2));
1312 bind(&aligned); 1313 bind(&aligned);
1313 } 1314 }
1314 1315
1315 // Calculate new top and bail out if space is exhausted. 1316 // Calculate new top and bail out if space is exhausted.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 1368
1368 // Load address of new object into result. 1369 // Load address of new object into result.
1369 LoadAllocationTopHelper(result, scratch, flags); 1370 LoadAllocationTopHelper(result, scratch, flags);
1370 1371
1371 ExternalReference allocation_limit = 1372 ExternalReference allocation_limit =
1372 AllocationUtils::GetAllocationLimitReference(isolate(), flags); 1373 AllocationUtils::GetAllocationLimitReference(isolate(), flags);
1373 1374
1374 // Align the next allocation. Storing the filler map without checking top is 1375 // Align the next allocation. Storing the filler map without checking top is
1375 // safe in new-space because the limit of the heap is aligned there. 1376 // safe in new-space because the limit of the heap is aligned there.
1376 if ((flags & DOUBLE_ALIGNMENT) != 0) { 1377 if ((flags & DOUBLE_ALIGNMENT) != 0) {
1378 DCHECK((flags & PRETENURE_OLD_POINTER_SPACE) == 0);
1377 DCHECK(kPointerAlignment * 2 == kDoubleAlignment); 1379 DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
1378 Label aligned; 1380 Label aligned;
1379 test(result, Immediate(kDoubleAlignmentMask)); 1381 test(result, Immediate(kDoubleAlignmentMask));
1380 j(zero, &aligned, Label::kNear); 1382 j(zero, &aligned, Label::kNear);
1381 if ((flags & PRETENURE) != 0) { 1383 if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) {
1382 cmp(result, Operand::StaticVariable(allocation_limit)); 1384 cmp(result, Operand::StaticVariable(allocation_limit));
1383 j(above_equal, gc_required); 1385 j(above_equal, gc_required);
1384 } 1386 }
1385 mov(Operand(result, 0), 1387 mov(Operand(result, 0),
1386 Immediate(isolate()->factory()->one_pointer_filler_map())); 1388 Immediate(isolate()->factory()->one_pointer_filler_map()));
1387 add(result, Immediate(kDoubleSize / 2)); 1389 add(result, Immediate(kDoubleSize / 2));
1388 bind(&aligned); 1390 bind(&aligned);
1389 } 1391 }
1390 1392
1391 // Calculate new top and bail out if space is exhausted. 1393 // Calculate new top and bail out if space is exhausted.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 1443
1442 // Load address of new object into result. 1444 // Load address of new object into result.
1443 LoadAllocationTopHelper(result, scratch, flags); 1445 LoadAllocationTopHelper(result, scratch, flags);
1444 1446
1445 ExternalReference allocation_limit = 1447 ExternalReference allocation_limit =
1446 AllocationUtils::GetAllocationLimitReference(isolate(), flags); 1448 AllocationUtils::GetAllocationLimitReference(isolate(), flags);
1447 1449
1448 // Align the next allocation. Storing the filler map without checking top is 1450 // Align the next allocation. Storing the filler map without checking top is
1449 // safe in new-space because the limit of the heap is aligned there. 1451 // safe in new-space because the limit of the heap is aligned there.
1450 if ((flags & DOUBLE_ALIGNMENT) != 0) { 1452 if ((flags & DOUBLE_ALIGNMENT) != 0) {
1453 DCHECK((flags & PRETENURE_OLD_POINTER_SPACE) == 0);
1451 DCHECK(kPointerAlignment * 2 == kDoubleAlignment); 1454 DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
1452 Label aligned; 1455 Label aligned;
1453 test(result, Immediate(kDoubleAlignmentMask)); 1456 test(result, Immediate(kDoubleAlignmentMask));
1454 j(zero, &aligned, Label::kNear); 1457 j(zero, &aligned, Label::kNear);
1455 if ((flags & PRETENURE) != 0) { 1458 if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) {
1456 cmp(result, Operand::StaticVariable(allocation_limit)); 1459 cmp(result, Operand::StaticVariable(allocation_limit));
1457 j(above_equal, gc_required); 1460 j(above_equal, gc_required);
1458 } 1461 }
1459 mov(Operand(result, 0), 1462 mov(Operand(result, 0),
1460 Immediate(isolate()->factory()->one_pointer_filler_map())); 1463 Immediate(isolate()->factory()->one_pointer_filler_map()));
1461 add(result, Immediate(kDoubleSize / 2)); 1464 add(result, Immediate(kDoubleSize / 2));
1462 bind(&aligned); 1465 bind(&aligned);
1463 } 1466 }
1464 1467
1465 // Calculate new top and bail out if space is exhausted. 1468 // Calculate new top and bail out if space is exhausted.
(...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
3111 if (mag.shift > 0) sar(edx, mag.shift); 3114 if (mag.shift > 0) sar(edx, mag.shift);
3112 mov(eax, dividend); 3115 mov(eax, dividend);
3113 shr(eax, 31); 3116 shr(eax, 31);
3114 add(edx, eax); 3117 add(edx, eax);
3115 } 3118 }
3116 3119
3117 3120
3118 } } // namespace v8::internal 3121 } } // namespace v8::internal
3119 3122
3120 #endif // V8_TARGET_ARCH_X87 3123 #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