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 2624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2635 | 2635 |
2636 | 2636 |
2637 void MacroAssembler::Move(Register dst, Register src) { | 2637 void MacroAssembler::Move(Register dst, Register src) { |
2638 if (!dst.is(src)) { | 2638 if (!dst.is(src)) { |
2639 mov(dst, src); | 2639 mov(dst, src); |
2640 } | 2640 } |
2641 } | 2641 } |
2642 | 2642 |
2643 | 2643 |
2644 void MacroAssembler::Move(Register dst, const Immediate& x) { | 2644 void MacroAssembler::Move(Register dst, const Immediate& x) { |
2645 if (x.is_zero()) { | 2645 if (x.is_zero() && RelocInfo::IsNone(x.rmode_)) { |
2646 xor_(dst, dst); // Shorter than mov of 32-bit immediate 0. | 2646 xor_(dst, dst); // Shorter than mov of 32-bit immediate 0. |
2647 } else { | 2647 } else { |
2648 mov(dst, x); | 2648 mov(dst, x); |
2649 } | 2649 } |
2650 } | 2650 } |
2651 | 2651 |
2652 | 2652 |
2653 void MacroAssembler::Move(const Operand& dst, const Immediate& x) { | 2653 void MacroAssembler::Move(const Operand& dst, const Immediate& x) { |
2654 mov(dst, x); | 2654 mov(dst, x); |
2655 } | 2655 } |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3303 mov(eax, dividend); | 3303 mov(eax, dividend); |
3304 shr(eax, 31); | 3304 shr(eax, 31); |
3305 add(edx, eax); | 3305 add(edx, eax); |
3306 } | 3306 } |
3307 | 3307 |
3308 | 3308 |
3309 } // namespace internal | 3309 } // namespace internal |
3310 } // namespace v8 | 3310 } // namespace v8 |
3311 | 3311 |
3312 #endif // V8_TARGET_ARCH_X87 | 3312 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |