OLD | NEW |
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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1507 add(result, Immediate(kDoubleSize / 2)); | 1507 add(result, Immediate(kDoubleSize / 2)); |
1508 bind(&aligned); | 1508 bind(&aligned); |
1509 } | 1509 } |
1510 | 1510 |
1511 // Calculate new top and bail out if space is exhausted. | 1511 // Calculate new top and bail out if space is exhausted. |
1512 Register top_reg = result_end.is_valid() ? result_end : result; | 1512 Register top_reg = result_end.is_valid() ? result_end : result; |
1513 if (!top_reg.is(result)) { | 1513 if (!top_reg.is(result)) { |
1514 mov(top_reg, result); | 1514 mov(top_reg, result); |
1515 } | 1515 } |
1516 add(top_reg, Immediate(object_size)); | 1516 add(top_reg, Immediate(object_size)); |
1517 j(carry, gc_required); | |
1518 cmp(top_reg, Operand::StaticVariable(allocation_limit)); | 1517 cmp(top_reg, Operand::StaticVariable(allocation_limit)); |
1519 j(above, gc_required); | 1518 j(above, gc_required); |
1520 | 1519 |
1521 // Update allocation top. | 1520 // Update allocation top. |
1522 UpdateAllocationTopHelper(top_reg, scratch, flags); | 1521 UpdateAllocationTopHelper(top_reg, scratch, flags); |
1523 | 1522 |
1524 // Tag result if requested. | 1523 // Tag result if requested. |
1525 bool tag_result = (flags & TAG_OBJECT) != 0; | 1524 bool tag_result = (flags & TAG_OBJECT) != 0; |
1526 if (top_reg.is(result)) { | 1525 if (top_reg.is(result)) { |
1527 if (tag_result) { | 1526 if (tag_result) { |
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3272 mov(eax, dividend); | 3271 mov(eax, dividend); |
3273 shr(eax, 31); | 3272 shr(eax, 31); |
3274 add(edx, eax); | 3273 add(edx, eax); |
3275 } | 3274 } |
3276 | 3275 |
3277 | 3276 |
3278 } // namespace internal | 3277 } // namespace internal |
3279 } // namespace v8 | 3278 } // namespace v8 |
3280 | 3279 |
3281 #endif // V8_TARGET_ARCH_X87 | 3280 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |