| 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 #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 2526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2537 AllowDeferredHandleDereference using_raw_address; | 2537 AllowDeferredHandleDereference using_raw_address; |
| 2538 if (isolate()->heap()->InNewSpace(*object)) { | 2538 if (isolate()->heap()->InNewSpace(*object)) { |
| 2539 Handle<Cell> cell = isolate()->factory()->NewCell(object); | 2539 Handle<Cell> cell = isolate()->factory()->NewCell(object); |
| 2540 push(Operand::ForCell(cell)); | 2540 push(Operand::ForCell(cell)); |
| 2541 } else { | 2541 } else { |
| 2542 Push(object); | 2542 Push(object); |
| 2543 } | 2543 } |
| 2544 } | 2544 } |
| 2545 | 2545 |
| 2546 | 2546 |
| 2547 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, | |
| 2548 Register scratch) { | |
| 2549 mov(scratch, cell); | |
| 2550 cmp(value, FieldOperand(scratch, WeakCell::kValueOffset)); | |
| 2551 } | |
| 2552 | |
| 2553 | |
| 2554 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell, | |
| 2555 Label* miss) { | |
| 2556 mov(value, cell); | |
| 2557 mov(value, FieldOperand(value, WeakCell::kValueOffset)); | |
| 2558 JumpIfSmi(value, miss); | |
| 2559 } | |
| 2560 | |
| 2561 | |
| 2562 void MacroAssembler::Ret() { | 2547 void MacroAssembler::Ret() { |
| 2563 ret(0); | 2548 ret(0); |
| 2564 } | 2549 } |
| 2565 | 2550 |
| 2566 | 2551 |
| 2567 void MacroAssembler::Ret(int bytes_dropped, Register scratch) { | 2552 void MacroAssembler::Ret(int bytes_dropped, Register scratch) { |
| 2568 if (is_uint16(bytes_dropped)) { | 2553 if (is_uint16(bytes_dropped)) { |
| 2569 ret(bytes_dropped); | 2554 ret(bytes_dropped); |
| 2570 } else { | 2555 } else { |
| 2571 pop(scratch); | 2556 pop(scratch); |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3377 if (mag.shift > 0) sar(edx, mag.shift); | 3362 if (mag.shift > 0) sar(edx, mag.shift); |
| 3378 mov(eax, dividend); | 3363 mov(eax, dividend); |
| 3379 shr(eax, 31); | 3364 shr(eax, 31); |
| 3380 add(edx, eax); | 3365 add(edx, eax); |
| 3381 } | 3366 } |
| 3382 | 3367 |
| 3383 | 3368 |
| 3384 } } // namespace v8::internal | 3369 } } // namespace v8::internal |
| 3385 | 3370 |
| 3386 #endif // V8_TARGET_ARCH_X87 | 3371 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |