| 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 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
| 10 | 10 |
| (...skipping 3215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3226 int handler_index) { | 3226 int handler_index) { |
| 3227 // Adjust this code if not the case. | 3227 // Adjust this code if not the case. |
| 3228 STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize); | 3228 STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize); |
| 3229 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); | 3229 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); |
| 3230 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize); | 3230 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize); |
| 3231 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize); | 3231 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize); |
| 3232 | 3232 |
| 3233 // For the JSEntry handler, we must preserve a0-a3 and s0. | 3233 // For the JSEntry handler, we must preserve a0-a3 and s0. |
| 3234 // a5-a7 are available. We will build up the handler from the bottom by | 3234 // a5-a7 are available. We will build up the handler from the bottom by |
| 3235 // pushing on the stack. | 3235 // pushing on the stack. |
| 3236 // Set up the the state (r6) for pushing. | 3236 // Set up the the index (a6) for pushing. |
| 3237 unsigned state = | 3237 li(a6, Operand(handler_index)); |
| 3238 StackHandler::IndexField::encode(handler_index) | | |
| 3239 StackHandler::KindField::encode(kind); | |
| 3240 li(a5, Operand(CodeObject()), CONSTANT_SIZE); | |
| 3241 li(a6, Operand(state)); | |
| 3242 | 3238 |
| 3243 // Push the context and state. | 3239 // Push the context and index. |
| 3244 if (kind == StackHandler::JS_ENTRY) { | 3240 if (kind == StackHandler::JS_ENTRY) { |
| 3245 DCHECK(Smi::FromInt(0) == 0); | 3241 DCHECK(Smi::FromInt(0) == 0); |
| 3246 // The zero_reg indicates no context. | 3242 // The zero_reg indicates no context. |
| 3247 // The operands are reversed to match the order of MultiPush/Pop. | 3243 // The operands are reversed to match the order of MultiPush/Pop. |
| 3248 Push(zero_reg, a6); | 3244 Push(zero_reg, a6); |
| 3249 } else { | 3245 } else { |
| 3250 MultiPush(a6.bit() | cp.bit()); | 3246 MultiPush(a6.bit() | cp.bit()); |
| 3251 } | 3247 } |
| 3252 | 3248 |
| 3253 // Link the current handler as the next handler. | 3249 // Link the current handler as the next handler. |
| (...skipping 2850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6104 } | 6100 } |
| 6105 if (mag.shift > 0) sra(result, result, mag.shift); | 6101 if (mag.shift > 0) sra(result, result, mag.shift); |
| 6106 srl(at, dividend, 31); | 6102 srl(at, dividend, 31); |
| 6107 Addu(result, result, Operand(at)); | 6103 Addu(result, result, Operand(at)); |
| 6108 } | 6104 } |
| 6109 | 6105 |
| 6110 | 6106 |
| 6111 } } // namespace v8::internal | 6107 } } // namespace v8::internal |
| 6112 | 6108 |
| 6113 #endif // V8_TARGET_ARCH_MIPS64 | 6109 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |