| 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 2627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2638 TestIfSmi(object, r0); | 2638 TestIfSmi(object, r0); |
| 2639 Check(ne, kOperandIsASmiAndNotAFunction, cr0); | 2639 Check(ne, kOperandIsASmiAndNotAFunction, cr0); |
| 2640 push(object); | 2640 push(object); |
| 2641 CompareObjectType(object, object, object, JS_FUNCTION_TYPE); | 2641 CompareObjectType(object, object, object, JS_FUNCTION_TYPE); |
| 2642 pop(object); | 2642 pop(object); |
| 2643 Check(eq, kOperandIsNotAFunction); | 2643 Check(eq, kOperandIsNotAFunction); |
| 2644 } | 2644 } |
| 2645 } | 2645 } |
| 2646 | 2646 |
| 2647 | 2647 |
| 2648 void MacroAssembler::AssertBoundFunction(Register object) { |
| 2649 if (emit_debug_code()) { |
| 2650 STATIC_ASSERT(kSmiTag == 0); |
| 2651 TestIfSmi(object, r0); |
| 2652 Check(ne, kOperandIsASmiAndNotABoundFunction, cr0); |
| 2653 push(object); |
| 2654 CompareObjectType(object, object, object, JS_BOUND_FUNCTION_TYPE); |
| 2655 pop(object); |
| 2656 Check(eq, kOperandIsNotABoundFunction); |
| 2657 } |
| 2658 } |
| 2659 |
| 2660 |
| 2648 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 2661 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
| 2649 Register scratch) { | 2662 Register scratch) { |
| 2650 if (emit_debug_code()) { | 2663 if (emit_debug_code()) { |
| 2651 Label done_checking; | 2664 Label done_checking; |
| 2652 AssertNotSmi(object); | 2665 AssertNotSmi(object); |
| 2653 CompareRoot(object, Heap::kUndefinedValueRootIndex); | 2666 CompareRoot(object, Heap::kUndefinedValueRootIndex); |
| 2654 beq(&done_checking); | 2667 beq(&done_checking); |
| 2655 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 2668 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 2656 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); | 2669 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
| 2657 Assert(eq, kExpectedUndefinedOrCell); | 2670 Assert(eq, kExpectedUndefinedOrCell); |
| (...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4292 } | 4305 } |
| 4293 if (mag.shift > 0) srawi(result, result, mag.shift); | 4306 if (mag.shift > 0) srawi(result, result, mag.shift); |
| 4294 ExtractBit(r0, dividend, 31); | 4307 ExtractBit(r0, dividend, 31); |
| 4295 add(result, result, r0); | 4308 add(result, result, r0); |
| 4296 } | 4309 } |
| 4297 | 4310 |
| 4298 } // namespace internal | 4311 } // namespace internal |
| 4299 } // namespace v8 | 4312 } // namespace v8 |
| 4300 | 4313 |
| 4301 #endif // V8_TARGET_ARCH_PPC | 4314 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |