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 5172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5183 __ ClampDoubleToUint8(result_reg, temp_reg, double_scratch0()); | 5183 __ ClampDoubleToUint8(result_reg, temp_reg, double_scratch0()); |
5184 __ b(&done, Label::kNear); | 5184 __ b(&done, Label::kNear); |
5185 | 5185 |
5186 // smi | 5186 // smi |
5187 __ bind(&is_smi); | 5187 __ bind(&is_smi); |
5188 __ ClampUint8(result_reg, result_reg); | 5188 __ ClampUint8(result_reg, result_reg); |
5189 | 5189 |
5190 __ bind(&done); | 5190 __ bind(&done); |
5191 } | 5191 } |
5192 | 5192 |
5193 void LCodeGen::DoDoubleBits(LDoubleBits* instr) { | |
5194 DoubleRegister value_reg = ToDoubleRegister(instr->value()); | |
5195 Register result_reg = ToRegister(instr->result()); | |
5196 __ lgdr(result_reg, value_reg); | |
5197 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { | |
5198 __ srlg(result_reg, result_reg, Operand(32)); | |
5199 } else { | |
5200 __ llgfr(result_reg, result_reg); | |
5201 } | |
5202 } | |
5203 | |
5204 void LCodeGen::DoAllocate(LAllocate* instr) { | 5193 void LCodeGen::DoAllocate(LAllocate* instr) { |
5205 class DeferredAllocate final : public LDeferredCode { | 5194 class DeferredAllocate final : public LDeferredCode { |
5206 public: | 5195 public: |
5207 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) | 5196 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) |
5208 : LDeferredCode(codegen), instr_(instr) {} | 5197 : LDeferredCode(codegen), instr_(instr) {} |
5209 void Generate() override { codegen()->DoDeferredAllocate(instr_); } | 5198 void Generate() override { codegen()->DoDeferredAllocate(instr_); } |
5210 LInstruction* instr() override { return instr_; } | 5199 LInstruction* instr() override { return instr_; } |
5211 | 5200 |
5212 private: | 5201 private: |
5213 LAllocate* instr_; | 5202 LAllocate* instr_; |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5684 __ LoadP(result, | 5673 __ LoadP(result, |
5685 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5674 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5686 __ bind(deferred->exit()); | 5675 __ bind(deferred->exit()); |
5687 __ bind(&done); | 5676 __ bind(&done); |
5688 } | 5677 } |
5689 | 5678 |
5690 #undef __ | 5679 #undef __ |
5691 | 5680 |
5692 } // namespace internal | 5681 } // namespace internal |
5693 } // namespace v8 | 5682 } // namespace v8 |
OLD | NEW |