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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 6164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6175 Daddu(fp, sp, Operand(fp_offset)); | 6175 Daddu(fp, sp, Operand(fp_offset)); |
6176 } | 6176 } |
6177 | 6177 |
6178 | 6178 |
6179 void MacroAssembler::LeaveFrame(StackFrame::Type type) { | 6179 void MacroAssembler::LeaveFrame(StackFrame::Type type) { |
6180 daddiu(sp, fp, 2 * kPointerSize); | 6180 daddiu(sp, fp, 2 * kPointerSize); |
6181 ld(ra, MemOperand(fp, 1 * kPointerSize)); | 6181 ld(ra, MemOperand(fp, 1 * kPointerSize)); |
6182 ld(fp, MemOperand(fp, 0 * kPointerSize)); | 6182 ld(fp, MemOperand(fp, 0 * kPointerSize)); |
6183 } | 6183 } |
6184 | 6184 |
| 6185 void MacroAssembler::EnterBuiltinFrame(Register context, Register target, |
| 6186 Register argc) { |
| 6187 Push(ra, fp); |
| 6188 Move(fp, sp); |
| 6189 Push(context, target, argc); |
| 6190 } |
| 6191 |
| 6192 void MacroAssembler::LeaveBuiltinFrame(Register context, Register target, |
| 6193 Register argc) { |
| 6194 Pop(context, target, argc); |
| 6195 Pop(ra, fp); |
| 6196 } |
| 6197 |
6185 void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space, | 6198 void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space, |
6186 StackFrame::Type frame_type) { | 6199 StackFrame::Type frame_type) { |
6187 DCHECK(frame_type == StackFrame::EXIT || | 6200 DCHECK(frame_type == StackFrame::EXIT || |
6188 frame_type == StackFrame::BUILTIN_EXIT); | 6201 frame_type == StackFrame::BUILTIN_EXIT); |
6189 | 6202 |
6190 // Set up the frame structure on the stack. | 6203 // Set up the frame structure on the stack. |
6191 STATIC_ASSERT(2 * kPointerSize == ExitFrameConstants::kCallerSPDisplacement); | 6204 STATIC_ASSERT(2 * kPointerSize == ExitFrameConstants::kCallerSPDisplacement); |
6192 STATIC_ASSERT(1 * kPointerSize == ExitFrameConstants::kCallerPCOffset); | 6205 STATIC_ASSERT(1 * kPointerSize == ExitFrameConstants::kCallerPCOffset); |
6193 STATIC_ASSERT(0 * kPointerSize == ExitFrameConstants::kCallerFPOffset); | 6206 STATIC_ASSERT(0 * kPointerSize == ExitFrameConstants::kCallerFPOffset); |
6194 | 6207 |
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7249 if (mag.shift > 0) sra(result, result, mag.shift); | 7262 if (mag.shift > 0) sra(result, result, mag.shift); |
7250 srl(at, dividend, 31); | 7263 srl(at, dividend, 31); |
7251 Addu(result, result, Operand(at)); | 7264 Addu(result, result, Operand(at)); |
7252 } | 7265 } |
7253 | 7266 |
7254 | 7267 |
7255 } // namespace internal | 7268 } // namespace internal |
7256 } // namespace v8 | 7269 } // namespace v8 |
7257 | 7270 |
7258 #endif // V8_TARGET_ARCH_MIPS64 | 7271 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |