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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1537 } | 1537 } |
1538 | 1538 |
1539 | 1539 |
1540 void MacroAssembler::Allocate(int object_size, | 1540 void MacroAssembler::Allocate(int object_size, |
1541 Register result, | 1541 Register result, |
1542 Register result_end, | 1542 Register result_end, |
1543 Register scratch, | 1543 Register scratch, |
1544 Label* gc_required, | 1544 Label* gc_required, |
1545 AllocationFlags flags) { | 1545 AllocationFlags flags) { |
1546 DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); | 1546 DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); |
1547 DCHECK(object_size <= Page::kMaxRegularHeapObjectSize); | 1547 DCHECK(object_size <= kMaxRegularHeapObjectSize); |
1548 DCHECK((flags & ALLOCATION_FOLDED) == 0); | 1548 DCHECK((flags & ALLOCATION_FOLDED) == 0); |
1549 if (!FLAG_inline_new) { | 1549 if (!FLAG_inline_new) { |
1550 if (emit_debug_code()) { | 1550 if (emit_debug_code()) { |
1551 // Trash the registers to simulate an allocation failure. | 1551 // Trash the registers to simulate an allocation failure. |
1552 mov(result, Immediate(0x7091)); | 1552 mov(result, Immediate(0x7091)); |
1553 if (result_end.is_valid()) { | 1553 if (result_end.is_valid()) { |
1554 mov(result_end, Immediate(0x7191)); | 1554 mov(result_end, Immediate(0x7191)); |
1555 } | 1555 } |
1556 if (scratch.is_valid()) { | 1556 if (scratch.is_valid()) { |
1557 mov(scratch, Immediate(0x7291)); | 1557 mov(scratch, Immediate(0x7291)); |
(...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3457 mov(eax, dividend); | 3457 mov(eax, dividend); |
3458 shr(eax, 31); | 3458 shr(eax, 31); |
3459 add(edx, eax); | 3459 add(edx, eax); |
3460 } | 3460 } |
3461 | 3461 |
3462 | 3462 |
3463 } // namespace internal | 3463 } // namespace internal |
3464 } // namespace v8 | 3464 } // namespace v8 |
3465 | 3465 |
3466 #endif // V8_TARGET_ARCH_IA32 | 3466 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |