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 5315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5326 } else { | 5326 } else { |
5327 __ Movd(result_reg, value_reg); | 5327 __ Movd(result_reg, value_reg); |
5328 } | 5328 } |
5329 } | 5329 } |
5330 | 5330 |
5331 | 5331 |
5332 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { | 5332 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { |
5333 Register hi_reg = ToRegister(instr->hi()); | 5333 Register hi_reg = ToRegister(instr->hi()); |
5334 Register lo_reg = ToRegister(instr->lo()); | 5334 Register lo_reg = ToRegister(instr->lo()); |
5335 XMMRegister result_reg = ToDoubleRegister(instr->result()); | 5335 XMMRegister result_reg = ToDoubleRegister(instr->result()); |
5336 XMMRegister xmm_scratch = double_scratch0(); | 5336 __ movl(kScratchRegister, hi_reg); |
5337 __ Movd(result_reg, hi_reg); | 5337 __ shlq(kScratchRegister, Immediate(32)); |
5338 __ psllq(result_reg, 32); | 5338 __ orq(kScratchRegister, lo_reg); |
5339 __ Movd(xmm_scratch, lo_reg); | 5339 __ Movq(result_reg, kScratchRegister); |
5340 __ orps(result_reg, xmm_scratch); | |
5341 } | 5340 } |
5342 | 5341 |
5343 | 5342 |
5344 void LCodeGen::DoAllocate(LAllocate* instr) { | 5343 void LCodeGen::DoAllocate(LAllocate* instr) { |
5345 class DeferredAllocate final : public LDeferredCode { | 5344 class DeferredAllocate final : public LDeferredCode { |
5346 public: | 5345 public: |
5347 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) | 5346 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) |
5348 : LDeferredCode(codegen), instr_(instr) { } | 5347 : LDeferredCode(codegen), instr_(instr) { } |
5349 void Generate() override { codegen()->DoDeferredAllocate(instr_); } | 5348 void Generate() override { codegen()->DoDeferredAllocate(instr_); } |
5350 LInstruction* instr() override { return instr_; } | 5349 LInstruction* instr() override { return instr_; } |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5904 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5903 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5905 } | 5904 } |
5906 | 5905 |
5907 | 5906 |
5908 #undef __ | 5907 #undef __ |
5909 | 5908 |
5910 } // namespace internal | 5909 } // namespace internal |
5911 } // namespace v8 | 5910 } // namespace v8 |
5912 | 5911 |
5913 #endif // V8_TARGET_ARCH_X64 | 5912 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |