OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 __ j(equal, &heap_number, Label::kNear); | 859 __ j(equal, &heap_number, Label::kNear); |
860 if (cc != equal) { | 860 if (cc != equal) { |
861 __ movp(rcx, FieldOperand(rax, HeapObject::kMapOffset)); | 861 __ movp(rcx, FieldOperand(rax, HeapObject::kMapOffset)); |
862 __ movzxbl(rcx, FieldOperand(rcx, Map::kInstanceTypeOffset)); | 862 __ movzxbl(rcx, FieldOperand(rcx, Map::kInstanceTypeOffset)); |
863 // Call runtime on identical objects. Otherwise return equal. | 863 // Call runtime on identical objects. Otherwise return equal. |
864 __ cmpb(rcx, Immediate(static_cast<uint8_t>(FIRST_JS_RECEIVER_TYPE))); | 864 __ cmpb(rcx, Immediate(static_cast<uint8_t>(FIRST_JS_RECEIVER_TYPE))); |
865 __ j(above_equal, &runtime_call, Label::kFar); | 865 __ j(above_equal, &runtime_call, Label::kFar); |
866 // Call runtime on identical symbols since we need to throw a TypeError. | 866 // Call runtime on identical symbols since we need to throw a TypeError. |
867 __ cmpb(rcx, Immediate(static_cast<uint8_t>(SYMBOL_TYPE))); | 867 __ cmpb(rcx, Immediate(static_cast<uint8_t>(SYMBOL_TYPE))); |
868 __ j(equal, &runtime_call, Label::kFar); | 868 __ j(equal, &runtime_call, Label::kFar); |
869 // Call runtime on identical SIMD values since we must throw a TypeError. | |
870 __ cmpb(rcx, Immediate(static_cast<uint8_t>(SIMD128_VALUE_TYPE))); | |
871 __ j(equal, &runtime_call, Label::kFar); | |
872 } | 869 } |
873 __ Set(rax, EQUAL); | 870 __ Set(rax, EQUAL); |
874 __ ret(0); | 871 __ ret(0); |
875 | 872 |
876 __ bind(&heap_number); | 873 __ bind(&heap_number); |
877 // It is a heap number, so return equal if it's not NaN. | 874 // It is a heap number, so return equal if it's not NaN. |
878 // For NaN, return 1 for every condition except greater and | 875 // For NaN, return 1 for every condition except greater and |
879 // greater-equal. Return -1 for them, so the comparison yields | 876 // greater-equal. Return -1 for them, so the comparison yields |
880 // false for all conditions except not-equal. | 877 // false for all conditions except not-equal. |
881 __ Set(rax, EQUAL); | 878 __ Set(rax, EQUAL); |
(...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3317 kStackUnwindSpace, nullptr, return_value_operand, | 3314 kStackUnwindSpace, nullptr, return_value_operand, |
3318 NULL); | 3315 NULL); |
3319 } | 3316 } |
3320 | 3317 |
3321 #undef __ | 3318 #undef __ |
3322 | 3319 |
3323 } // namespace internal | 3320 } // namespace internal |
3324 } // namespace v8 | 3321 } // namespace v8 |
3325 | 3322 |
3326 #endif // V8_TARGET_ARCH_X64 | 3323 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |