| 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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 } | 674 } |
| 675 | 675 |
| 676 void MacroAssembler::DebugBreak() { | 676 void MacroAssembler::DebugBreak() { |
| 677 Move(eax, Immediate(0)); | 677 Move(eax, Immediate(0)); |
| 678 mov(ebx, Immediate(ExternalReference(Runtime::kHandleDebuggerStatement, | 678 mov(ebx, Immediate(ExternalReference(Runtime::kHandleDebuggerStatement, |
| 679 isolate()))); | 679 isolate()))); |
| 680 CEntryStub ces(isolate(), 1); | 680 CEntryStub ces(isolate(), 1); |
| 681 call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); | 681 call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); |
| 682 } | 682 } |
| 683 | 683 |
| 684 void MacroAssembler::MaybeDropFrames() { |
| 685 // Check whether we need to drop frames to restart a function on the stack. |
| 686 ExternalReference restart_fp = |
| 687 ExternalReference::debug_restart_fp_address(isolate()); |
| 688 mov(ebx, Operand::StaticVariable(restart_fp)); |
| 689 test(ebx, ebx); |
| 690 j(not_zero, isolate()->builtins()->FrameDropperTrampoline(), |
| 691 RelocInfo::CODE_TARGET); |
| 692 } |
| 693 |
| 684 void MacroAssembler::Cvtsi2sd(XMMRegister dst, const Operand& src) { | 694 void MacroAssembler::Cvtsi2sd(XMMRegister dst, const Operand& src) { |
| 685 xorps(dst, dst); | 695 xorps(dst, dst); |
| 686 cvtsi2sd(dst, src); | 696 cvtsi2sd(dst, src); |
| 687 } | 697 } |
| 688 | 698 |
| 689 | 699 |
| 690 void MacroAssembler::Cvtui2ss(XMMRegister dst, Register src, Register tmp) { | 700 void MacroAssembler::Cvtui2ss(XMMRegister dst, Register src, Register tmp) { |
| 691 Label msb_set_src; | 701 Label msb_set_src; |
| 692 Label jmp_return; | 702 Label jmp_return; |
| 693 test(src, src); | 703 test(src, src); |
| (...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1909 j(equal, &invoke); | 1919 j(equal, &invoke); |
| 1910 DCHECK(expected.reg().is(ebx)); | 1920 DCHECK(expected.reg().is(ebx)); |
| 1911 } else if (!expected.reg().is(actual.reg())) { | 1921 } else if (!expected.reg().is(actual.reg())) { |
| 1912 // Both expected and actual are in (different) registers. This | 1922 // Both expected and actual are in (different) registers. This |
| 1913 // is the case when we invoke functions using call and apply. | 1923 // is the case when we invoke functions using call and apply. |
| 1914 cmp(expected.reg(), actual.reg()); | 1924 cmp(expected.reg(), actual.reg()); |
| 1915 j(equal, &invoke); | 1925 j(equal, &invoke); |
| 1916 DCHECK(actual.reg().is(eax)); | 1926 DCHECK(actual.reg().is(eax)); |
| 1917 DCHECK(expected.reg().is(ebx)); | 1927 DCHECK(expected.reg().is(ebx)); |
| 1918 } else { | 1928 } else { |
| 1929 definitely_matches = true; |
| 1919 Move(eax, actual.reg()); | 1930 Move(eax, actual.reg()); |
| 1920 } | 1931 } |
| 1921 } | 1932 } |
| 1922 | 1933 |
| 1923 if (!definitely_matches) { | 1934 if (!definitely_matches) { |
| 1924 Handle<Code> adaptor = | 1935 Handle<Code> adaptor = |
| 1925 isolate()->builtins()->ArgumentsAdaptorTrampoline(); | 1936 isolate()->builtins()->ArgumentsAdaptorTrampoline(); |
| 1926 if (flag == CALL_FUNCTION) { | 1937 if (flag == CALL_FUNCTION) { |
| 1927 call_wrapper.BeforeCall(CallSize(adaptor, RelocInfo::CODE_TARGET)); | 1938 call_wrapper.BeforeCall(CallSize(adaptor, RelocInfo::CODE_TARGET)); |
| 1928 call(adaptor, RelocInfo::CODE_TARGET); | 1939 call(adaptor, RelocInfo::CODE_TARGET); |
| (...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2947 mov(eax, dividend); | 2958 mov(eax, dividend); |
| 2948 shr(eax, 31); | 2959 shr(eax, 31); |
| 2949 add(edx, eax); | 2960 add(edx, eax); |
| 2950 } | 2961 } |
| 2951 | 2962 |
| 2952 | 2963 |
| 2953 } // namespace internal | 2964 } // namespace internal |
| 2954 } // namespace v8 | 2965 } // namespace v8 |
| 2955 | 2966 |
| 2956 #endif // V8_TARGET_ARCH_IA32 | 2967 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |