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 2568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2579 Check(le, kOperandIsNotAName); | 2579 Check(le, kOperandIsNotAName); |
2580 } | 2580 } |
2581 } | 2581 } |
2582 | 2582 |
2583 | 2583 |
2584 void MacroAssembler::AssertFunction(Register object) { | 2584 void MacroAssembler::AssertFunction(Register object) { |
2585 if (emit_debug_code()) { | 2585 if (emit_debug_code()) { |
2586 STATIC_ASSERT(kSmiTag == 0); | 2586 STATIC_ASSERT(kSmiTag == 0); |
2587 TestIfSmi(object, r0); | 2587 TestIfSmi(object, r0); |
2588 Check(ne, kOperandIsASmiAndNotAFunction, cr0); | 2588 Check(ne, kOperandIsASmiAndNotAFunction, cr0); |
2589 CompareObjectType(object, r0, r0, JS_FUNCTION_TYPE); | 2589 push(object); |
| 2590 CompareObjectType(object, object, object, JS_FUNCTION_TYPE); |
| 2591 pop(object); |
2590 Check(eq, kOperandIsNotAFunction); | 2592 Check(eq, kOperandIsNotAFunction); |
2591 } | 2593 } |
2592 } | 2594 } |
2593 | 2595 |
2594 | 2596 |
2595 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 2597 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
2596 Register scratch) { | 2598 Register scratch) { |
2597 if (emit_debug_code()) { | 2599 if (emit_debug_code()) { |
2598 Label done_checking; | 2600 Label done_checking; |
2599 AssertNotSmi(object); | 2601 AssertNotSmi(object); |
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4354 } | 4356 } |
4355 if (mag.shift > 0) srawi(result, result, mag.shift); | 4357 if (mag.shift > 0) srawi(result, result, mag.shift); |
4356 ExtractBit(r0, dividend, 31); | 4358 ExtractBit(r0, dividend, 31); |
4357 add(result, result, r0); | 4359 add(result, result, r0); |
4358 } | 4360 } |
4359 | 4361 |
4360 } // namespace internal | 4362 } // namespace internal |
4361 } // namespace v8 | 4363 } // namespace v8 |
4362 | 4364 |
4363 #endif // V8_TARGET_ARCH_PPC | 4365 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |