OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 2508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2519 __ JumpIfSmi(rax, if_false); | 2519 __ JumpIfSmi(rax, if_false); |
2520 __ CompareRoot(rax, Heap::kNullValueRootIndex); | 2520 __ CompareRoot(rax, Heap::kNullValueRootIndex); |
2521 __ j(equal, if_true); | 2521 __ j(equal, if_true); |
2522 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | 2522 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
2523 __ CmpObjectType(rax, FIRST_JS_RECEIVER_TYPE, rdx); | 2523 __ CmpObjectType(rax, FIRST_JS_RECEIVER_TYPE, rdx); |
2524 __ j(below, if_false); | 2524 __ j(below, if_false); |
2525 // Check for callable or undetectable objects => false. | 2525 // Check for callable or undetectable objects => false. |
2526 __ testb(FieldOperand(rdx, Map::kBitFieldOffset), | 2526 __ testb(FieldOperand(rdx, Map::kBitFieldOffset), |
2527 Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); | 2527 Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); |
2528 Split(zero, if_true, if_false, fall_through); | 2528 Split(zero, if_true, if_false, fall_through); |
| 2529 // clang-format off |
| 2530 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ |
| 2531 } else if (String::Equals(check, factory->type##_string())) { \ |
| 2532 __ JumpIfSmi(rax, if_false); \ |
| 2533 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); \ |
| 2534 __ CompareRoot(rax, Heap::k##Type##MapRootIndex); \ |
| 2535 Split(equal, if_true, if_false, fall_through); |
| 2536 SIMD128_TYPES(SIMD128_TYPE) |
| 2537 #undef SIMD128_TYPE |
| 2538 // clang-format on |
2529 } else { | 2539 } else { |
2530 if (if_false != fall_through) __ jmp(if_false); | 2540 if (if_false != fall_through) __ jmp(if_false); |
2531 } | 2541 } |
2532 context()->Plug(if_true, if_false); | 2542 context()->Plug(if_true, if_false); |
2533 } | 2543 } |
2534 | 2544 |
2535 | 2545 |
2536 void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { | 2546 void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { |
2537 Comment cmnt(masm_, "[ CompareOperation"); | 2547 Comment cmnt(masm_, "[ CompareOperation"); |
2538 | 2548 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2750 DCHECK_EQ( | 2760 DCHECK_EQ( |
2751 isolate->builtins()->OnStackReplacement()->entry(), | 2761 isolate->builtins()->OnStackReplacement()->entry(), |
2752 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2762 Assembler::target_address_at(call_target_address, unoptimized_code)); |
2753 return ON_STACK_REPLACEMENT; | 2763 return ON_STACK_REPLACEMENT; |
2754 } | 2764 } |
2755 | 2765 |
2756 } // namespace internal | 2766 } // namespace internal |
2757 } // namespace v8 | 2767 } // namespace v8 |
2758 | 2768 |
2759 #endif // V8_TARGET_ARCH_X64 | 2769 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |