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/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 5061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5072 | 5072 |
5073 // smi | 5073 // smi |
5074 __ bind(&is_smi); | 5074 __ bind(&is_smi); |
5075 __ SmiToInteger32(input_reg, input_reg); | 5075 __ SmiToInteger32(input_reg, input_reg); |
5076 __ ClampUint8(input_reg); | 5076 __ ClampUint8(input_reg); |
5077 | 5077 |
5078 __ bind(&done); | 5078 __ bind(&done); |
5079 } | 5079 } |
5080 | 5080 |
5081 | 5081 |
5082 void LCodeGen::DoDoubleBits(LDoubleBits* instr) { | |
5083 XMMRegister value_reg = ToDoubleRegister(instr->value()); | |
5084 Register result_reg = ToRegister(instr->result()); | |
5085 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { | |
5086 __ Movq(result_reg, value_reg); | |
5087 __ shrq(result_reg, Immediate(32)); | |
5088 } else { | |
5089 __ Movd(result_reg, value_reg); | |
5090 } | |
5091 } | |
5092 | |
5093 | |
5094 void LCodeGen::DoAllocate(LAllocate* instr) { | 5082 void LCodeGen::DoAllocate(LAllocate* instr) { |
5095 class DeferredAllocate final : public LDeferredCode { | 5083 class DeferredAllocate final : public LDeferredCode { |
5096 public: | 5084 public: |
5097 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) | 5085 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) |
5098 : LDeferredCode(codegen), instr_(instr) { } | 5086 : LDeferredCode(codegen), instr_(instr) { } |
5099 void Generate() override { codegen()->DoDeferredAllocate(instr_); } | 5087 void Generate() override { codegen()->DoDeferredAllocate(instr_); } |
5100 LInstruction* instr() override { return instr_; } | 5088 LInstruction* instr() override { return instr_; } |
5101 | 5089 |
5102 private: | 5090 private: |
5103 LAllocate* instr_; | 5091 LAllocate* instr_; |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5585 __ bind(deferred->exit()); | 5573 __ bind(deferred->exit()); |
5586 __ bind(&done); | 5574 __ bind(&done); |
5587 } | 5575 } |
5588 | 5576 |
5589 #undef __ | 5577 #undef __ |
5590 | 5578 |
5591 } // namespace internal | 5579 } // namespace internal |
5592 } // namespace v8 | 5580 } // namespace v8 |
5593 | 5581 |
5594 #endif // V8_TARGET_ARCH_X64 | 5582 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |