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_S390 | 8 #if V8_TARGET_ARCH_S390 |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2406 if (!emit_debug_code()) return; | 2406 if (!emit_debug_code()) return; |
2407 TestIfSmi(object); | 2407 TestIfSmi(object); |
2408 Check(ne, kOperandIsASmiAndNotAGeneratorObject, cr0); | 2408 Check(ne, kOperandIsASmiAndNotAGeneratorObject, cr0); |
2409 | 2409 |
2410 // Load map | 2410 // Load map |
2411 Register map = object; | 2411 Register map = object; |
2412 push(object); | 2412 push(object); |
2413 LoadP(map, FieldMemOperand(object, HeapObject::kMapOffset)); | 2413 LoadP(map, FieldMemOperand(object, HeapObject::kMapOffset)); |
2414 | 2414 |
2415 Label async, do_check; | 2415 Label async, do_check; |
2416 And(ip, flags, Operand(static_cast<int>(SuspendFlags::kGeneratorTypeMask))); | 2416 tmll(flags, Operand(static_cast<int>(SuspendFlags::kGeneratorTypeMask))); |
2417 CmpP(ip, Operand(static_cast<int>(SuspendFlags::kGeneratorTypeMask))); | |
2418 bne(&async); | 2417 bne(&async); |
2419 | 2418 |
2420 // Check if JSGeneratorObject | 2419 // Check if JSGeneratorObject |
2421 CompareInstanceType(map, object, JS_GENERATOR_OBJECT_TYPE); | 2420 CompareInstanceType(map, object, JS_GENERATOR_OBJECT_TYPE); |
2422 b(&do_check); | 2421 b(&do_check); |
2423 | 2422 |
2424 bind(&async); | 2423 bind(&async); |
2425 // Check if JSAsyncGeneratorObject | 2424 // Check if JSAsyncGeneratorObject |
2426 CompareInstanceType(map, object, JS_ASYNC_GENERATOR_OBJECT_TYPE); | 2425 CompareInstanceType(map, object, JS_ASYNC_GENERATOR_OBJECT_TYPE); |
2427 | 2426 |
(...skipping 2950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5378 } | 5377 } |
5379 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5378 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
5380 ExtractBit(r0, dividend, 31); | 5379 ExtractBit(r0, dividend, 31); |
5381 AddP(result, r0); | 5380 AddP(result, r0); |
5382 } | 5381 } |
5383 | 5382 |
5384 } // namespace internal | 5383 } // namespace internal |
5385 } // namespace v8 | 5384 } // namespace v8 |
5386 | 5385 |
5387 #endif // V8_TARGET_ARCH_S390 | 5386 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |