OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <assert.h> // For assert | 5 #include <assert.h> // For assert |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_PPC | 8 #if V8_TARGET_ARCH_PPC |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 2580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2591 | 2591 |
2592 | 2592 |
2593 void MacroAssembler::AssertSmi(Register object) { | 2593 void MacroAssembler::AssertSmi(Register object) { |
2594 if (emit_debug_code()) { | 2594 if (emit_debug_code()) { |
2595 STATIC_ASSERT(kSmiTag == 0); | 2595 STATIC_ASSERT(kSmiTag == 0); |
2596 TestIfSmi(object, r0); | 2596 TestIfSmi(object, r0); |
2597 Check(eq, kOperandIsNotSmi, cr0); | 2597 Check(eq, kOperandIsNotSmi, cr0); |
2598 } | 2598 } |
2599 } | 2599 } |
2600 | 2600 |
| 2601 void MacroAssembler::AssertFixedArray(Register object) { |
| 2602 if (emit_debug_code()) { |
| 2603 STATIC_ASSERT(kSmiTag == 0); |
| 2604 TestIfSmi(object, r0); |
| 2605 Check(ne, kOperandIsASmiAndNotAFixedArray, cr0); |
| 2606 push(object); |
| 2607 CompareObjectType(object, object, object, FIXED_ARRAY_TYPE); |
| 2608 pop(object); |
| 2609 Check(eq, kOperandIsNotAFixedArray); |
| 2610 } |
| 2611 } |
2601 | 2612 |
2602 void MacroAssembler::AssertFunction(Register object) { | 2613 void MacroAssembler::AssertFunction(Register object) { |
2603 if (emit_debug_code()) { | 2614 if (emit_debug_code()) { |
2604 STATIC_ASSERT(kSmiTag == 0); | 2615 STATIC_ASSERT(kSmiTag == 0); |
2605 TestIfSmi(object, r0); | 2616 TestIfSmi(object, r0); |
2606 Check(ne, kOperandIsASmiAndNotAFunction, cr0); | 2617 Check(ne, kOperandIsASmiAndNotAFunction, cr0); |
2607 push(object); | 2618 push(object); |
2608 CompareObjectType(object, object, object, JS_FUNCTION_TYPE); | 2619 CompareObjectType(object, object, object, JS_FUNCTION_TYPE); |
2609 pop(object); | 2620 pop(object); |
2610 Check(eq, kOperandIsNotAFunction); | 2621 Check(eq, kOperandIsNotAFunction); |
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4255 } | 4266 } |
4256 if (mag.shift > 0) srawi(result, result, mag.shift); | 4267 if (mag.shift > 0) srawi(result, result, mag.shift); |
4257 ExtractBit(r0, dividend, 31); | 4268 ExtractBit(r0, dividend, 31); |
4258 add(result, result, r0); | 4269 add(result, result, r0); |
4259 } | 4270 } |
4260 | 4271 |
4261 } // namespace internal | 4272 } // namespace internal |
4262 } // namespace v8 | 4273 } // namespace v8 |
4263 | 4274 |
4264 #endif // V8_TARGET_ARCH_PPC | 4275 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |