| 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 mov(ebp, esp); | 935 mov(ebp, esp); |
| 936 | 936 |
| 937 // Reserve room for entry stack pointer and push the code object. | 937 // Reserve room for entry stack pointer and push the code object. |
| 938 DCHECK(ExitFrameConstants::kSPOffset == -1 * kPointerSize); | 938 DCHECK(ExitFrameConstants::kSPOffset == -1 * kPointerSize); |
| 939 push(Immediate(0)); // Saved entry sp, patched before call. | 939 push(Immediate(0)); // Saved entry sp, patched before call. |
| 940 push(Immediate(CodeObject())); // Accessed from ExitFrame::code_slot. | 940 push(Immediate(CodeObject())); // Accessed from ExitFrame::code_slot. |
| 941 | 941 |
| 942 // Save the frame pointer and the context in top. | 942 // Save the frame pointer and the context in top. |
| 943 ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress, isolate()); | 943 ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress, isolate()); |
| 944 ExternalReference context_address(Isolate::kContextAddress, isolate()); | 944 ExternalReference context_address(Isolate::kContextAddress, isolate()); |
| 945 ExternalReference c_function_address(Isolate::kCFunctionAddress, isolate()); |
| 945 mov(Operand::StaticVariable(c_entry_fp_address), ebp); | 946 mov(Operand::StaticVariable(c_entry_fp_address), ebp); |
| 946 mov(Operand::StaticVariable(context_address), esi); | 947 mov(Operand::StaticVariable(context_address), esi); |
| 948 mov(Operand::StaticVariable(c_function_address), ebx); |
| 947 } | 949 } |
| 948 | 950 |
| 949 | 951 |
| 950 void MacroAssembler::EnterExitFrameEpilogue(int argc, bool save_doubles) { | 952 void MacroAssembler::EnterExitFrameEpilogue(int argc, bool save_doubles) { |
| 951 // Optionally save all XMM registers. | 953 // Optionally save all XMM registers. |
| 952 if (save_doubles) { | 954 if (save_doubles) { |
| 953 int space = XMMRegister::kMaxNumRegisters * kDoubleSize + | 955 int space = XMMRegister::kMaxNumRegisters * kDoubleSize + |
| 954 argc * kPointerSize; | 956 argc * kPointerSize; |
| 955 sub(esp, Immediate(space)); | 957 sub(esp, Immediate(space)); |
| 956 const int offset = -2 * kPointerSize; | 958 const int offset = -2 * kPointerSize; |
| (...skipping 2488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3445 if (mag.shift > 0) sar(edx, mag.shift); | 3447 if (mag.shift > 0) sar(edx, mag.shift); |
| 3446 mov(eax, dividend); | 3448 mov(eax, dividend); |
| 3447 shr(eax, 31); | 3449 shr(eax, 31); |
| 3448 add(edx, eax); | 3450 add(edx, eax); |
| 3449 } | 3451 } |
| 3450 | 3452 |
| 3451 | 3453 |
| 3452 } } // namespace v8::internal | 3454 } } // namespace v8::internal |
| 3453 | 3455 |
| 3454 #endif // V8_TARGET_ARCH_IA32 | 3456 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |