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 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 | 1123 |
1124 void MacroAssembler::LeaveFrame(StackFrame::Type type) { | 1124 void MacroAssembler::LeaveFrame(StackFrame::Type type) { |
1125 if (emit_debug_code()) { | 1125 if (emit_debug_code()) { |
1126 cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset), | 1126 cmp(Operand(ebp, CommonFrameConstants::kContextOrFrameTypeOffset), |
1127 Immediate(Smi::FromInt(type))); | 1127 Immediate(Smi::FromInt(type))); |
1128 Check(equal, kStackFrameTypesMustMatch); | 1128 Check(equal, kStackFrameTypesMustMatch); |
1129 } | 1129 } |
1130 leave(); | 1130 leave(); |
1131 } | 1131 } |
1132 | 1132 |
| 1133 void MacroAssembler::EnterBuiltinFrame(Register context, Register target, |
| 1134 Register argc) { |
| 1135 Push(ebp); |
| 1136 Move(ebp, esp); |
| 1137 Push(context); |
| 1138 Push(target); |
| 1139 Push(argc); |
| 1140 } |
| 1141 |
| 1142 void MacroAssembler::LeaveBuiltinFrame(Register context, Register target, |
| 1143 Register argc) { |
| 1144 Pop(argc); |
| 1145 Pop(target); |
| 1146 Pop(context); |
| 1147 leave(); |
| 1148 } |
| 1149 |
1133 void MacroAssembler::EnterExitFramePrologue(StackFrame::Type frame_type) { | 1150 void MacroAssembler::EnterExitFramePrologue(StackFrame::Type frame_type) { |
1134 DCHECK(frame_type == StackFrame::EXIT || | 1151 DCHECK(frame_type == StackFrame::EXIT || |
1135 frame_type == StackFrame::BUILTIN_EXIT); | 1152 frame_type == StackFrame::BUILTIN_EXIT); |
1136 | 1153 |
1137 // Set up the frame structure on the stack. | 1154 // Set up the frame structure on the stack. |
1138 DCHECK_EQ(+2 * kPointerSize, ExitFrameConstants::kCallerSPDisplacement); | 1155 DCHECK_EQ(+2 * kPointerSize, ExitFrameConstants::kCallerSPDisplacement); |
1139 DCHECK_EQ(+1 * kPointerSize, ExitFrameConstants::kCallerPCOffset); | 1156 DCHECK_EQ(+1 * kPointerSize, ExitFrameConstants::kCallerPCOffset); |
1140 DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset); | 1157 DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset); |
1141 push(ebp); | 1158 push(ebp); |
1142 mov(ebp, esp); | 1159 mov(ebp, esp); |
(...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3437 mov(eax, dividend); | 3454 mov(eax, dividend); |
3438 shr(eax, 31); | 3455 shr(eax, 31); |
3439 add(edx, eax); | 3456 add(edx, eax); |
3440 } | 3457 } |
3441 | 3458 |
3442 | 3459 |
3443 } // namespace internal | 3460 } // namespace internal |
3444 } // namespace v8 | 3461 } // namespace v8 |
3445 | 3462 |
3446 #endif // V8_TARGET_ARCH_IA32 | 3463 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |