| 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 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1479 } | 1479 } |
| 1480 | 1480 |
| 1481 | 1481 |
| 1482 void MacroAssembler::Allocate(int object_size, | 1482 void MacroAssembler::Allocate(int object_size, |
| 1483 Register result, | 1483 Register result, |
| 1484 Register result_end, | 1484 Register result_end, |
| 1485 Register scratch, | 1485 Register scratch, |
| 1486 Label* gc_required, | 1486 Label* gc_required, |
| 1487 AllocationFlags flags) { | 1487 AllocationFlags flags) { |
| 1488 DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); | 1488 DCHECK((flags & (RESULT_CONTAINS_TOP | SIZE_IN_WORDS)) == 0); |
| 1489 DCHECK(object_size <= Page::kMaxRegularHeapObjectSize); | 1489 DCHECK(object_size <= kMaxRegularHeapObjectSize); |
| 1490 DCHECK((flags & ALLOCATION_FOLDED) == 0); | 1490 DCHECK((flags & ALLOCATION_FOLDED) == 0); |
| 1491 if (!FLAG_inline_new) { | 1491 if (!FLAG_inline_new) { |
| 1492 if (emit_debug_code()) { | 1492 if (emit_debug_code()) { |
| 1493 // Trash the registers to simulate an allocation failure. | 1493 // Trash the registers to simulate an allocation failure. |
| 1494 mov(result, Immediate(0x7091)); | 1494 mov(result, Immediate(0x7091)); |
| 1495 if (result_end.is_valid()) { | 1495 if (result_end.is_valid()) { |
| 1496 mov(result_end, Immediate(0x7191)); | 1496 mov(result_end, Immediate(0x7191)); |
| 1497 } | 1497 } |
| 1498 if (scratch.is_valid()) { | 1498 if (scratch.is_valid()) { |
| 1499 mov(scratch, Immediate(0x7291)); | 1499 mov(scratch, Immediate(0x7291)); |
| (...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3304 mov(eax, dividend); | 3304 mov(eax, dividend); |
| 3305 shr(eax, 31); | 3305 shr(eax, 31); |
| 3306 add(edx, eax); | 3306 add(edx, eax); |
| 3307 } | 3307 } |
| 3308 | 3308 |
| 3309 | 3309 |
| 3310 } // namespace internal | 3310 } // namespace internal |
| 3311 } // namespace v8 | 3311 } // namespace v8 |
| 3312 | 3312 |
| 3313 #endif // V8_TARGET_ARCH_X87 | 3313 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |