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 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2367 } | 2367 } |
2368 | 2368 |
2369 void MacroAssembler::AssertSmi(Register object) { | 2369 void MacroAssembler::AssertSmi(Register object) { |
2370 if (emit_debug_code()) { | 2370 if (emit_debug_code()) { |
2371 STATIC_ASSERT(kSmiTag == 0); | 2371 STATIC_ASSERT(kSmiTag == 0); |
2372 TestIfSmi(object); | 2372 TestIfSmi(object); |
2373 Check(eq, kOperandIsNotSmi, cr0); | 2373 Check(eq, kOperandIsNotSmi, cr0); |
2374 } | 2374 } |
2375 } | 2375 } |
2376 | 2376 |
| 2377 void MacroAssembler::AssertFixedArray(Register object) { |
| 2378 if (emit_debug_code()) { |
| 2379 STATIC_ASSERT(kSmiTag == 0); |
| 2380 TestIfSmi(object); |
| 2381 Check(ne, kOperandIsASmiAndNotAFixedArray, cr0); |
| 2382 push(object); |
| 2383 CompareObjectType(object, object, object, FIXED_ARRAY_TYPE); |
| 2384 pop(object); |
| 2385 Check(eq, kOperandIsNotAFixedArray); |
| 2386 } |
| 2387 } |
| 2388 |
2377 void MacroAssembler::AssertFunction(Register object) { | 2389 void MacroAssembler::AssertFunction(Register object) { |
2378 if (emit_debug_code()) { | 2390 if (emit_debug_code()) { |
2379 STATIC_ASSERT(kSmiTag == 0); | 2391 STATIC_ASSERT(kSmiTag == 0); |
2380 TestIfSmi(object); | 2392 TestIfSmi(object); |
2381 Check(ne, kOperandIsASmiAndNotAFunction, cr0); | 2393 Check(ne, kOperandIsASmiAndNotAFunction, cr0); |
2382 push(object); | 2394 push(object); |
2383 CompareObjectType(object, object, object, JS_FUNCTION_TYPE); | 2395 CompareObjectType(object, object, object, JS_FUNCTION_TYPE); |
2384 pop(object); | 2396 pop(object); |
2385 Check(eq, kOperandIsNotAFunction); | 2397 Check(eq, kOperandIsNotAFunction); |
2386 } | 2398 } |
(...skipping 2987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5374 } | 5386 } |
5375 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); | 5387 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); |
5376 ExtractBit(r0, dividend, 31); | 5388 ExtractBit(r0, dividend, 31); |
5377 AddP(result, r0); | 5389 AddP(result, r0); |
5378 } | 5390 } |
5379 | 5391 |
5380 } // namespace internal | 5392 } // namespace internal |
5381 } // namespace v8 | 5393 } // namespace v8 |
5382 | 5394 |
5383 #endif // V8_TARGET_ARCH_S390 | 5395 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |