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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1708 } | 1708 } |
1709 | 1709 |
1710 | 1710 |
1711 void LCodeGen::DoConstantS(LConstantS* instr) { | 1711 void LCodeGen::DoConstantS(LConstantS* instr) { |
1712 __ Move(ToRegister(instr->result()), Immediate(instr->value())); | 1712 __ Move(ToRegister(instr->result()), Immediate(instr->value())); |
1713 } | 1713 } |
1714 | 1714 |
1715 | 1715 |
1716 void LCodeGen::DoConstantD(LConstantD* instr) { | 1716 void LCodeGen::DoConstantD(LConstantD* instr) { |
1717 double v = instr->value(); | 1717 double v = instr->value(); |
1718 uint64_t int_val = BitCast<uint64_t, double>(v); | 1718 uint64_t int_val = bit_cast<uint64_t, double>(v); |
1719 int32_t lower = static_cast<int32_t>(int_val); | 1719 int32_t lower = static_cast<int32_t>(int_val); |
1720 int32_t upper = static_cast<int32_t>(int_val >> (kBitsPerInt)); | 1720 int32_t upper = static_cast<int32_t>(int_val >> (kBitsPerInt)); |
1721 DCHECK(instr->result()->IsDoubleRegister()); | 1721 DCHECK(instr->result()->IsDoubleRegister()); |
1722 | 1722 |
1723 XMMRegister res = ToDoubleRegister(instr->result()); | 1723 XMMRegister res = ToDoubleRegister(instr->result()); |
1724 if (int_val == 0) { | 1724 if (int_val == 0) { |
1725 __ xorps(res, res); | 1725 __ xorps(res, res); |
1726 } else { | 1726 } else { |
1727 Register temp = ToRegister(instr->temp()); | 1727 Register temp = ToRegister(instr->temp()); |
1728 if (CpuFeatures::IsSupported(SSE4_1)) { | 1728 if (CpuFeatures::IsSupported(SSE4_1)) { |
(...skipping 3941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5670 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5670 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5671 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5671 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5672 } | 5672 } |
5673 | 5673 |
5674 | 5674 |
5675 #undef __ | 5675 #undef __ |
5676 | 5676 |
5677 } } // namespace v8::internal | 5677 } } // namespace v8::internal |
5678 | 5678 |
5679 #endif // V8_TARGET_ARCH_IA32 | 5679 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |