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 5360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5371 pop(object); | 5371 pop(object); |
5372 } | 5372 } |
5373 } | 5373 } |
5374 | 5374 |
5375 | 5375 |
5376 void MacroAssembler::AssertFunction(Register object) { | 5376 void MacroAssembler::AssertFunction(Register object) { |
5377 if (emit_debug_code()) { | 5377 if (emit_debug_code()) { |
5378 STATIC_ASSERT(kSmiTag == 0); | 5378 STATIC_ASSERT(kSmiTag == 0); |
5379 SmiTst(object, t0); | 5379 SmiTst(object, t0); |
5380 Check(ne, kOperandIsASmiAndNotAFunction, t0, Operand(zero_reg)); | 5380 Check(ne, kOperandIsASmiAndNotAFunction, t0, Operand(zero_reg)); |
5381 push(object); | 5381 GetObjectType(object, t0, t0); |
5382 GetObjectType(object, object, object); | 5382 Check(eq, kOperandIsNotAFunction, t0, Operand(JS_FUNCTION_TYPE)); |
5383 pop(object); | |
5384 Check(eq, kOperandIsNotAFunction, object, Operand(JS_FUNCTION_TYPE)); | |
5385 } | 5383 } |
5386 } | 5384 } |
5387 | 5385 |
5388 | 5386 |
5389 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 5387 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
5390 Register scratch) { | 5388 Register scratch) { |
5391 if (emit_debug_code()) { | 5389 if (emit_debug_code()) { |
5392 Label done_checking; | 5390 Label done_checking; |
5393 AssertNotSmi(object); | 5391 AssertNotSmi(object); |
5394 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); | 5392 LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6218 if (mag.shift > 0) sra(result, result, mag.shift); | 6216 if (mag.shift > 0) sra(result, result, mag.shift); |
6219 srl(at, dividend, 31); | 6217 srl(at, dividend, 31); |
6220 Addu(result, result, Operand(at)); | 6218 Addu(result, result, Operand(at)); |
6221 } | 6219 } |
6222 | 6220 |
6223 | 6221 |
6224 } // namespace internal | 6222 } // namespace internal |
6225 } // namespace v8 | 6223 } // namespace v8 |
6226 | 6224 |
6227 #endif // V8_TARGET_ARCH_MIPS64 | 6225 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |