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/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 4756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4767 // Load value into temp_xmm which will be preserved across potential call to | 4767 // Load value into temp_xmm which will be preserved across potential call to |
4768 // runtime (MacroAssembler::EnterExitFrameEpilogue preserves only allocatable | 4768 // runtime (MacroAssembler::EnterExitFrameEpilogue preserves only allocatable |
4769 // XMM registers on x64). | 4769 // XMM registers on x64). |
4770 if (signedness == SIGNED_INT32) { | 4770 if (signedness == SIGNED_INT32) { |
4771 DCHECK(SmiValuesAre31Bits()); | 4771 DCHECK(SmiValuesAre31Bits()); |
4772 // There was overflow, so bits 30 and 31 of the original integer | 4772 // There was overflow, so bits 30 and 31 of the original integer |
4773 // disagree. Try to allocate a heap number in new space and store | 4773 // disagree. Try to allocate a heap number in new space and store |
4774 // the value in there. If that fails, call the runtime system. | 4774 // the value in there. If that fails, call the runtime system. |
4775 __ SmiToInteger32(reg, reg); | 4775 __ SmiToInteger32(reg, reg); |
4776 __ xorl(reg, Immediate(0x80000000)); | 4776 __ xorl(reg, Immediate(0x80000000)); |
4777 __ cvtlsi2sd(temp_xmm, reg); | 4777 __ Cvtlsi2sd(temp_xmm, reg); |
4778 } else { | 4778 } else { |
4779 DCHECK(signedness == UNSIGNED_INT32); | 4779 DCHECK(signedness == UNSIGNED_INT32); |
4780 __ LoadUint32(temp_xmm, reg); | 4780 __ LoadUint32(temp_xmm, reg); |
4781 } | 4781 } |
4782 | 4782 |
4783 if (FLAG_inline_new) { | 4783 if (FLAG_inline_new) { |
4784 __ AllocateHeapNumber(reg, tmp, &slow); | 4784 __ AllocateHeapNumber(reg, tmp, &slow); |
4785 __ jmp(&done, kPointerSize == kInt64Size ? Label::kNear : Label::kFar); | 4785 __ jmp(&done, kPointerSize == kInt64Size ? Label::kNear : Label::kFar); |
4786 } | 4786 } |
4787 | 4787 |
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5905 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5905 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5906 } | 5906 } |
5907 | 5907 |
5908 | 5908 |
5909 #undef __ | 5909 #undef __ |
5910 | 5910 |
5911 } // namespace internal | 5911 } // namespace internal |
5912 } // namespace v8 | 5912 } // namespace v8 |
5913 | 5913 |
5914 #endif // V8_TARGET_ARCH_X64 | 5914 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |