| 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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 if (kFrameAlignment > 0) { | 929 if (kFrameAlignment > 0) { |
| 930 DCHECK(base::bits::IsPowerOfTwo32(kFrameAlignment)); | 930 DCHECK(base::bits::IsPowerOfTwo32(kFrameAlignment)); |
| 931 and_(esp, -kFrameAlignment); | 931 and_(esp, -kFrameAlignment); |
| 932 } | 932 } |
| 933 | 933 |
| 934 // Patch the saved entry sp. | 934 // Patch the saved entry sp. |
| 935 mov(Operand(ebp, ExitFrameConstants::kSPOffset), esp); | 935 mov(Operand(ebp, ExitFrameConstants::kSPOffset), esp); |
| 936 } | 936 } |
| 937 | 937 |
| 938 | 938 |
| 939 void MacroAssembler::EnterExitFrame(bool save_doubles) { | 939 void MacroAssembler::EnterExitFrame(int argc, bool save_doubles) { |
| 940 EnterExitFramePrologue(); | 940 EnterExitFramePrologue(); |
| 941 | 941 |
| 942 // Set up argc and argv in callee-saved registers. | 942 // Set up argc and argv in callee-saved registers. |
| 943 int offset = StandardFrameConstants::kCallerSPOffset - kPointerSize; | 943 int offset = StandardFrameConstants::kCallerSPOffset - kPointerSize; |
| 944 mov(edi, eax); | 944 mov(edi, eax); |
| 945 lea(esi, Operand(ebp, eax, times_4, offset)); | 945 lea(esi, Operand(ebp, eax, times_4, offset)); |
| 946 | 946 |
| 947 // Reserve space for argc, argv and isolate. | 947 // Reserve space for argc, argv and isolate. |
| 948 EnterExitFrameEpilogue(3, save_doubles); | 948 EnterExitFrameEpilogue(argc, save_doubles); |
| 949 } | 949 } |
| 950 | 950 |
| 951 | 951 |
| 952 void MacroAssembler::EnterApiExitFrame(int argc) { | 952 void MacroAssembler::EnterApiExitFrame(int argc) { |
| 953 EnterExitFramePrologue(); | 953 EnterExitFramePrologue(); |
| 954 EnterExitFrameEpilogue(argc, false); | 954 EnterExitFrameEpilogue(argc, false); |
| 955 } | 955 } |
| 956 | 956 |
| 957 | 957 |
| 958 void MacroAssembler::LeaveExitFrame(bool save_doubles, bool pop_arguments) { | 958 void MacroAssembler::LeaveExitFrame(bool save_doubles, bool pop_arguments) { |
| (...skipping 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2988 mov(eax, dividend); | 2988 mov(eax, dividend); |
| 2989 shr(eax, 31); | 2989 shr(eax, 31); |
| 2990 add(edx, eax); | 2990 add(edx, eax); |
| 2991 } | 2991 } |
| 2992 | 2992 |
| 2993 | 2993 |
| 2994 } // namespace internal | 2994 } // namespace internal |
| 2995 } // namespace v8 | 2995 } // namespace v8 |
| 2996 | 2996 |
| 2997 #endif // V8_TARGET_ARCH_X87 | 2997 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |