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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 frame_ends = pc_offset(); | 1277 frame_ends = pc_offset(); |
1278 ldm(ia_w, sp, pp.bit() | fp.bit() | lr.bit()); | 1278 ldm(ia_w, sp, pp.bit() | fp.bit() | lr.bit()); |
1279 } else { | 1279 } else { |
1280 mov(sp, fp); | 1280 mov(sp, fp); |
1281 frame_ends = pc_offset(); | 1281 frame_ends = pc_offset(); |
1282 ldm(ia_w, sp, fp.bit() | lr.bit()); | 1282 ldm(ia_w, sp, fp.bit() | lr.bit()); |
1283 } | 1283 } |
1284 return frame_ends; | 1284 return frame_ends; |
1285 } | 1285 } |
1286 | 1286 |
| 1287 void MacroAssembler::EnterBuiltinFrame(Register context, Register target, |
| 1288 Register argc) { |
| 1289 Push(lr, fp, context, target); |
| 1290 add(fp, sp, Operand(2 * kPointerSize)); |
| 1291 Push(argc); |
| 1292 } |
| 1293 |
| 1294 void MacroAssembler::LeaveBuiltinFrame(Register context, Register target, |
| 1295 Register argc) { |
| 1296 Pop(argc); |
| 1297 Pop(lr, fp, context, target); |
| 1298 } |
| 1299 |
1287 void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space, | 1300 void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space, |
1288 StackFrame::Type frame_type) { | 1301 StackFrame::Type frame_type) { |
1289 DCHECK(frame_type == StackFrame::EXIT || | 1302 DCHECK(frame_type == StackFrame::EXIT || |
1290 frame_type == StackFrame::BUILTIN_EXIT); | 1303 frame_type == StackFrame::BUILTIN_EXIT); |
1291 | 1304 |
1292 // Set up the frame structure on the stack. | 1305 // Set up the frame structure on the stack. |
1293 DCHECK_EQ(2 * kPointerSize, ExitFrameConstants::kCallerSPDisplacement); | 1306 DCHECK_EQ(2 * kPointerSize, ExitFrameConstants::kCallerSPDisplacement); |
1294 DCHECK_EQ(1 * kPointerSize, ExitFrameConstants::kCallerPCOffset); | 1307 DCHECK_EQ(1 * kPointerSize, ExitFrameConstants::kCallerPCOffset); |
1295 DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset); | 1308 DCHECK_EQ(0 * kPointerSize, ExitFrameConstants::kCallerFPOffset); |
1296 mov(ip, Operand(Smi::FromInt(frame_type))); | 1309 mov(ip, Operand(Smi::FromInt(frame_type))); |
(...skipping 2726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4023 } | 4036 } |
4024 } | 4037 } |
4025 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 4038 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
4026 add(result, result, Operand(dividend, LSR, 31)); | 4039 add(result, result, Operand(dividend, LSR, 31)); |
4027 } | 4040 } |
4028 | 4041 |
4029 } // namespace internal | 4042 } // namespace internal |
4030 } // namespace v8 | 4043 } // namespace v8 |
4031 | 4044 |
4032 #endif // V8_TARGET_ARCH_ARM | 4045 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |