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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 if (kFrameAlignment > 0) { | 960 if (kFrameAlignment > 0) { |
961 DCHECK(base::bits::IsPowerOfTwo32(kFrameAlignment)); | 961 DCHECK(base::bits::IsPowerOfTwo32(kFrameAlignment)); |
962 and_(esp, -kFrameAlignment); | 962 and_(esp, -kFrameAlignment); |
963 } | 963 } |
964 | 964 |
965 // Patch the saved entry sp. | 965 // Patch the saved entry sp. |
966 mov(Operand(ebp, ExitFrameConstants::kSPOffset), esp); | 966 mov(Operand(ebp, ExitFrameConstants::kSPOffset), esp); |
967 } | 967 } |
968 | 968 |
969 | 969 |
970 void MacroAssembler::EnterExitFrame(bool save_doubles) { | 970 void MacroAssembler::EnterExitFrame(int argc, bool save_doubles) { |
971 EnterExitFramePrologue(); | 971 EnterExitFramePrologue(); |
972 | 972 |
973 // Set up argc and argv in callee-saved registers. | 973 // Set up argc and argv in callee-saved registers. |
974 int offset = StandardFrameConstants::kCallerSPOffset - kPointerSize; | 974 int offset = StandardFrameConstants::kCallerSPOffset - kPointerSize; |
975 mov(edi, eax); | 975 mov(edi, eax); |
976 lea(esi, Operand(ebp, eax, times_4, offset)); | 976 lea(esi, Operand(ebp, eax, times_4, offset)); |
977 | 977 |
978 // Reserve space for argc, argv and isolate. | 978 // Reserve space for argc, argv and isolate. |
979 EnterExitFrameEpilogue(3, save_doubles); | 979 EnterExitFrameEpilogue(argc, save_doubles); |
980 } | 980 } |
981 | 981 |
982 | 982 |
983 void MacroAssembler::EnterApiExitFrame(int argc) { | 983 void MacroAssembler::EnterApiExitFrame(int argc) { |
984 EnterExitFramePrologue(); | 984 EnterExitFramePrologue(); |
985 EnterExitFrameEpilogue(argc, false); | 985 EnterExitFrameEpilogue(argc, false); |
986 } | 986 } |
987 | 987 |
988 | 988 |
989 void MacroAssembler::LeaveExitFrame(bool save_doubles, bool pop_arguments) { | 989 void MacroAssembler::LeaveExitFrame(bool save_doubles, bool pop_arguments) { |
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3116 mov(eax, dividend); | 3116 mov(eax, dividend); |
3117 shr(eax, 31); | 3117 shr(eax, 31); |
3118 add(edx, eax); | 3118 add(edx, eax); |
3119 } | 3119 } |
3120 | 3120 |
3121 | 3121 |
3122 } // namespace internal | 3122 } // namespace internal |
3123 } // namespace v8 | 3123 } // namespace v8 |
3124 | 3124 |
3125 #endif // V8_TARGET_ARCH_IA32 | 3125 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |