OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // | 2 // |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" | 6 #include "src/crankshaft/s390/lithium-codegen-s390.h" |
7 | 7 |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 5186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5197 DoubleRegister value_reg = ToDoubleRegister(instr->value()); | 5197 DoubleRegister value_reg = ToDoubleRegister(instr->value()); |
5198 Register result_reg = ToRegister(instr->result()); | 5198 Register result_reg = ToRegister(instr->result()); |
5199 __ lgdr(result_reg, value_reg); | 5199 __ lgdr(result_reg, value_reg); |
5200 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { | 5200 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { |
5201 __ srlg(result_reg, result_reg, Operand(32)); | 5201 __ srlg(result_reg, result_reg, Operand(32)); |
5202 } else { | 5202 } else { |
5203 __ llgfr(result_reg, result_reg); | 5203 __ llgfr(result_reg, result_reg); |
5204 } | 5204 } |
5205 } | 5205 } |
5206 | 5206 |
5207 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { | |
5208 Register hi_reg = ToRegister(instr->hi()); | |
5209 Register lo_reg = ToRegister(instr->lo()); | |
5210 DoubleRegister result_reg = ToDoubleRegister(instr->result()); | |
5211 Register scratch = scratch0(); | |
5212 | |
5213 // Combine hi_reg:lo_reg into a single 64-bit register. | |
5214 __ sllg(scratch, hi_reg, Operand(32)); | |
5215 __ lr(scratch, lo_reg); | |
5216 | |
5217 // Bitwise convert from GPR to FPR | |
5218 __ ldgr(result_reg, scratch); | |
5219 } | |
5220 | |
5221 void LCodeGen::DoAllocate(LAllocate* instr) { | 5207 void LCodeGen::DoAllocate(LAllocate* instr) { |
5222 class DeferredAllocate final : public LDeferredCode { | 5208 class DeferredAllocate final : public LDeferredCode { |
5223 public: | 5209 public: |
5224 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) | 5210 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) |
5225 : LDeferredCode(codegen), instr_(instr) {} | 5211 : LDeferredCode(codegen), instr_(instr) {} |
5226 void Generate() override { codegen()->DoDeferredAllocate(instr_); } | 5212 void Generate() override { codegen()->DoDeferredAllocate(instr_); } |
5227 LInstruction* instr() override { return instr_; } | 5213 LInstruction* instr() override { return instr_; } |
5228 | 5214 |
5229 private: | 5215 private: |
5230 LAllocate* instr_; | 5216 LAllocate* instr_; |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5701 __ LoadP(result, | 5687 __ LoadP(result, |
5702 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5688 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5703 __ bind(deferred->exit()); | 5689 __ bind(deferred->exit()); |
5704 __ bind(&done); | 5690 __ bind(&done); |
5705 } | 5691 } |
5706 | 5692 |
5707 #undef __ | 5693 #undef __ |
5708 | 5694 |
5709 } // namespace internal | 5695 } // namespace internal |
5710 } // namespace v8 | 5696 } // namespace v8 |
OLD | NEW |