| 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 6317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6328 | 6328 |
| 6329 | 6329 |
| 6330 void MacroAssembler::AssertSmi(Register object) { | 6330 void MacroAssembler::AssertSmi(Register object) { |
| 6331 if (emit_debug_code()) { | 6331 if (emit_debug_code()) { |
| 6332 STATIC_ASSERT(kSmiTag == 0); | 6332 STATIC_ASSERT(kSmiTag == 0); |
| 6333 andi(at, object, kSmiTagMask); | 6333 andi(at, object, kSmiTagMask); |
| 6334 Check(eq, kOperandIsASmi, at, Operand(zero_reg)); | 6334 Check(eq, kOperandIsASmi, at, Operand(zero_reg)); |
| 6335 } | 6335 } |
| 6336 } | 6336 } |
| 6337 | 6337 |
| 6338 void MacroAssembler::AssertFixedArray(Register object) { |
| 6339 if (emit_debug_code()) { |
| 6340 STATIC_ASSERT(kSmiTag == 0); |
| 6341 SmiTst(object, t8); |
| 6342 Check(ne, kOperandIsASmiAndNotAFixedArray, t8, Operand(zero_reg)); |
| 6343 GetObjectType(object, t8, t8); |
| 6344 Check(eq, kOperandIsNotAFixedArray, t8, Operand(FIXED_ARRAY_TYPE)); |
| 6345 } |
| 6346 } |
| 6338 | 6347 |
| 6339 void MacroAssembler::AssertFunction(Register object) { | 6348 void MacroAssembler::AssertFunction(Register object) { |
| 6340 if (emit_debug_code()) { | 6349 if (emit_debug_code()) { |
| 6341 STATIC_ASSERT(kSmiTag == 0); | 6350 STATIC_ASSERT(kSmiTag == 0); |
| 6342 SmiTst(object, t8); | 6351 SmiTst(object, t8); |
| 6343 Check(ne, kOperandIsASmiAndNotAFunction, t8, Operand(zero_reg)); | 6352 Check(ne, kOperandIsASmiAndNotAFunction, t8, Operand(zero_reg)); |
| 6344 GetObjectType(object, t8, t8); | 6353 GetObjectType(object, t8, t8); |
| 6345 Check(eq, kOperandIsNotAFunction, t8, Operand(JS_FUNCTION_TYPE)); | 6354 Check(eq, kOperandIsNotAFunction, t8, Operand(JS_FUNCTION_TYPE)); |
| 6346 } | 6355 } |
| 6347 } | 6356 } |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7156 if (mag.shift > 0) sra(result, result, mag.shift); | 7165 if (mag.shift > 0) sra(result, result, mag.shift); |
| 7157 srl(at, dividend, 31); | 7166 srl(at, dividend, 31); |
| 7158 Addu(result, result, Operand(at)); | 7167 Addu(result, result, Operand(at)); |
| 7159 } | 7168 } |
| 7160 | 7169 |
| 7161 | 7170 |
| 7162 } // namespace internal | 7171 } // namespace internal |
| 7163 } // namespace v8 | 7172 } // namespace v8 |
| 7164 | 7173 |
| 7165 #endif // V8_TARGET_ARCH_MIPS64 | 7174 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |