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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
590 } | 590 } |
591 | 591 |
592 void MacroAssembler::DebugBreak() { | 592 void MacroAssembler::DebugBreak() { |
593 Move(eax, Immediate(0)); | 593 Move(eax, Immediate(0)); |
594 mov(ebx, Immediate(ExternalReference(Runtime::kHandleDebuggerStatement, | 594 mov(ebx, Immediate(ExternalReference(Runtime::kHandleDebuggerStatement, |
595 isolate()))); | 595 isolate()))); |
596 CEntryStub ces(isolate(), 1); | 596 CEntryStub ces(isolate(), 1); |
597 call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); | 597 call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); |
598 } | 598 } |
599 | 599 |
600 void MacroAssembler::PairShl(Register dst, Register src, uint8_t shift) { | |
ahaas
2016/03/08 07:23:40
On ia32 I will rename the parameters to "high" and
| |
601 if (shift >= 32) { | |
602 mov(dst, src); | |
603 shl(dst, shift - 32); | |
604 xor_(src, src); | |
605 } else { | |
606 shld(dst, src, shift); | |
607 shl(src, shift); | |
608 } | |
609 } | |
610 | |
611 void MacroAssembler::PairShl_cl(Register dst, Register src) { | |
612 shld_cl(dst, src); | |
613 shl_cl(src); | |
614 Label done; | |
615 test(ecx, Immediate(0x20)); | |
616 j(equal, &done, Label::kNear); | |
617 mov(dst, src); | |
618 xor_(src, src); | |
619 bind(&done); | |
620 } | |
600 | 621 |
601 bool MacroAssembler::IsUnsafeImmediate(const Immediate& x) { | 622 bool MacroAssembler::IsUnsafeImmediate(const Immediate& x) { |
602 static const int kMaxImmediateBits = 17; | 623 static const int kMaxImmediateBits = 17; |
603 if (!RelocInfo::IsNone(x.rmode_)) return false; | 624 if (!RelocInfo::IsNone(x.rmode_)) return false; |
604 return !is_intn(x.x_, kMaxImmediateBits); | 625 return !is_intn(x.x_, kMaxImmediateBits); |
605 } | 626 } |
606 | 627 |
607 | 628 |
608 void MacroAssembler::SafeMove(Register dst, const Immediate& x) { | 629 void MacroAssembler::SafeMove(Register dst, const Immediate& x) { |
609 if (IsUnsafeImmediate(x) && jit_cookie() != 0) { | 630 if (IsUnsafeImmediate(x) && jit_cookie() != 0) { |
(...skipping 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3075 mov(eax, dividend); | 3096 mov(eax, dividend); |
3076 shr(eax, 31); | 3097 shr(eax, 31); |
3077 add(edx, eax); | 3098 add(edx, eax); |
3078 } | 3099 } |
3079 | 3100 |
3080 | 3101 |
3081 } // namespace internal | 3102 } // namespace internal |
3082 } // namespace v8 | 3103 } // namespace v8 |
3083 | 3104 |
3084 #endif // V8_TARGET_ARCH_X87 | 3105 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |