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 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2630 STATIC_ASSERT(kSmiTag == 0); | 2630 STATIC_ASSERT(kSmiTag == 0); |
2631 TestIfSmi(object, r0); | 2631 TestIfSmi(object, r0); |
2632 Check(ne, kOperandIsASmiAndNotAGeneratorObject, cr0); | 2632 Check(ne, kOperandIsASmiAndNotAGeneratorObject, cr0); |
2633 push(object); | 2633 push(object); |
2634 CompareObjectType(object, object, object, JS_GENERATOR_OBJECT_TYPE); | 2634 CompareObjectType(object, object, object, JS_GENERATOR_OBJECT_TYPE); |
2635 pop(object); | 2635 pop(object); |
2636 Check(eq, kOperandIsNotAGeneratorObject); | 2636 Check(eq, kOperandIsNotAGeneratorObject); |
2637 } | 2637 } |
2638 } | 2638 } |
2639 | 2639 |
| 2640 void MacroAssembler::AssertAsyncGeneratorObject(Register object) { |
| 2641 if (emit_debug_code()) { |
| 2642 STATIC_ASSERT(kSmiTag == 0); |
| 2643 TestIfSmi(object, r0); |
| 2644 Check(ne, kOperandIsASmiAndNotAGeneratorObject); |
| 2645 push(object); |
| 2646 CompareObjectType(object, object, object, JS_ASYNC_GENERATOR_OBJECT_TYPE); |
| 2647 pop(object); |
| 2648 Check(eq, kOperandIsNotAGeneratorObject); |
| 2649 } |
| 2650 } |
| 2651 |
2640 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, | 2652 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, |
2641 Register scratch) { | 2653 Register scratch) { |
2642 if (emit_debug_code()) { | 2654 if (emit_debug_code()) { |
2643 Label done_checking; | 2655 Label done_checking; |
2644 AssertNotSmi(object); | 2656 AssertNotSmi(object); |
2645 CompareRoot(object, Heap::kUndefinedValueRootIndex); | 2657 CompareRoot(object, Heap::kUndefinedValueRootIndex); |
2646 beq(&done_checking); | 2658 beq(&done_checking); |
2647 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 2659 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
2648 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); | 2660 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); |
2649 Assert(eq, kExpectedUndefinedOrCell); | 2661 Assert(eq, kExpectedUndefinedOrCell); |
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4239 } | 4251 } |
4240 if (mag.shift > 0) srawi(result, result, mag.shift); | 4252 if (mag.shift > 0) srawi(result, result, mag.shift); |
4241 ExtractBit(r0, dividend, 31); | 4253 ExtractBit(r0, dividend, 31); |
4242 add(result, result, r0); | 4254 add(result, result, r0); |
4243 } | 4255 } |
4244 | 4256 |
4245 } // namespace internal | 4257 } // namespace internal |
4246 } // namespace v8 | 4258 } // namespace v8 |
4247 | 4259 |
4248 #endif // V8_TARGET_ARCH_PPC | 4260 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |