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_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 3228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3239 int handler_index) { | 3239 int handler_index) { |
3240 // Adjust this code if not the case. | 3240 // Adjust this code if not the case. |
3241 STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize); | 3241 STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize); |
3242 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); | 3242 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); |
3243 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize); | 3243 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize); |
3244 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize); | 3244 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize); |
3245 | 3245 |
3246 // For the JSEntry handler, we must preserve a0-a3 and s0. | 3246 // For the JSEntry handler, we must preserve a0-a3 and s0. |
3247 // t1-t3 are available. We will build up the handler from the bottom by | 3247 // t1-t3 are available. We will build up the handler from the bottom by |
3248 // pushing on the stack. | 3248 // pushing on the stack. |
3249 // Set up the the state (t2) for pushing. | 3249 // Set up the the index (t2) for pushing. |
3250 unsigned state = | 3250 li(t2, Operand(handler_index)); |
3251 StackHandler::IndexField::encode(handler_index) | | |
3252 StackHandler::KindField::encode(kind); | |
3253 li(t2, Operand(state)); | |
3254 | 3251 |
3255 // Push the context and state. | 3252 // Push the context and index. |
3256 if (kind == StackHandler::JS_ENTRY) { | 3253 if (kind == StackHandler::JS_ENTRY) { |
3257 DCHECK(Smi::FromInt(0) == 0); | 3254 DCHECK(Smi::FromInt(0) == 0); |
3258 // The zero_reg indicates no context. | 3255 // The zero_reg indicates no context. |
3259 // The operands are reversed to match the order of MultiPush/Pop. | 3256 // The operands are reversed to match the order of MultiPush/Pop. |
3260 Push(zero_reg, t2); | 3257 Push(zero_reg, t2); |
3261 } else { | 3258 } else { |
3262 MultiPush(t2.bit() | cp.bit()); | 3259 MultiPush(t2.bit() | cp.bit()); |
3263 } | 3260 } |
3264 | 3261 |
3265 // Link the current handler as the next handler. | 3262 // Link the current handler as the next handler. |
(...skipping 2818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6084 } | 6081 } |
6085 if (mag.shift > 0) sra(result, result, mag.shift); | 6082 if (mag.shift > 0) sra(result, result, mag.shift); |
6086 srl(at, dividend, 31); | 6083 srl(at, dividend, 31); |
6087 Addu(result, result, Operand(at)); | 6084 Addu(result, result, Operand(at)); |
6088 } | 6085 } |
6089 | 6086 |
6090 | 6087 |
6091 } } // namespace v8::internal | 6088 } } // namespace v8::internal |
6092 | 6089 |
6093 #endif // V8_TARGET_ARCH_MIPS | 6090 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |