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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 | 798 |
799 #if DEBUG | 799 #if DEBUG |
800 // Check if the function returned a valid JavaScript value. | 800 // Check if the function returned a valid JavaScript value. |
801 Label ok; | 801 Label ok; |
802 Register return_value = rax; | 802 Register return_value = rax; |
803 Register map = rcx; | 803 Register map = rcx; |
804 | 804 |
805 JumpIfSmi(return_value, &ok, Label::kNear); | 805 JumpIfSmi(return_value, &ok, Label::kNear); |
806 movp(map, FieldOperand(return_value, HeapObject::kMapOffset)); | 806 movp(map, FieldOperand(return_value, HeapObject::kMapOffset)); |
807 | 807 |
808 CmpInstanceType(map, FIRST_NONSTRING_TYPE); | 808 CmpInstanceType(map, LAST_NAME_TYPE); |
809 j(below, &ok, Label::kNear); | 809 j(below_equal, &ok, Label::kNear); |
810 | 810 |
811 CmpInstanceType(map, FIRST_SPEC_OBJECT_TYPE); | 811 CmpInstanceType(map, FIRST_SPEC_OBJECT_TYPE); |
812 j(above_equal, &ok, Label::kNear); | 812 j(above_equal, &ok, Label::kNear); |
813 | 813 |
814 CompareRoot(map, Heap::kHeapNumberMapRootIndex); | 814 CompareRoot(map, Heap::kHeapNumberMapRootIndex); |
815 j(equal, &ok, Label::kNear); | 815 j(equal, &ok, Label::kNear); |
816 | 816 |
817 CompareRoot(return_value, Heap::kUndefinedValueRootIndex); | 817 CompareRoot(return_value, Heap::kUndefinedValueRootIndex); |
818 j(equal, &ok, Label::kNear); | 818 j(equal, &ok, Label::kNear); |
819 | 819 |
(...skipping 4583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5403 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); | 5403 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); |
5404 movl(rax, dividend); | 5404 movl(rax, dividend); |
5405 shrl(rax, Immediate(31)); | 5405 shrl(rax, Immediate(31)); |
5406 addl(rdx, rax); | 5406 addl(rdx, rax); |
5407 } | 5407 } |
5408 | 5408 |
5409 | 5409 |
5410 } } // namespace v8::internal | 5410 } } // namespace v8::internal |
5411 | 5411 |
5412 #endif // V8_TARGET_ARCH_X64 | 5412 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |