OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/crankshaft/ppc/lithium-codegen-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" |
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/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 5274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5285 __ b(&done); | 5285 __ b(&done); |
5286 | 5286 |
5287 // smi | 5287 // smi |
5288 __ bind(&is_smi); | 5288 __ bind(&is_smi); |
5289 __ ClampUint8(result_reg, result_reg); | 5289 __ ClampUint8(result_reg, result_reg); |
5290 | 5290 |
5291 __ bind(&done); | 5291 __ bind(&done); |
5292 } | 5292 } |
5293 | 5293 |
5294 | 5294 |
5295 void LCodeGen::DoDoubleBits(LDoubleBits* instr) { | |
5296 DoubleRegister value_reg = ToDoubleRegister(instr->value()); | |
5297 Register result_reg = ToRegister(instr->result()); | |
5298 | |
5299 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { | |
5300 __ MovDoubleHighToInt(result_reg, value_reg); | |
5301 } else { | |
5302 __ MovDoubleLowToInt(result_reg, value_reg); | |
5303 } | |
5304 } | |
5305 | |
5306 | |
5307 void LCodeGen::DoAllocate(LAllocate* instr) { | 5295 void LCodeGen::DoAllocate(LAllocate* instr) { |
5308 class DeferredAllocate final : public LDeferredCode { | 5296 class DeferredAllocate final : public LDeferredCode { |
5309 public: | 5297 public: |
5310 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) | 5298 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) |
5311 : LDeferredCode(codegen), instr_(instr) { } | 5299 : LDeferredCode(codegen), instr_(instr) { } |
5312 void Generate() override { codegen()->DoDeferredAllocate(instr_); } | 5300 void Generate() override { codegen()->DoDeferredAllocate(instr_); } |
5313 LInstruction* instr() override { return instr_; } | 5301 LInstruction* instr() override { return instr_; } |
5314 | 5302 |
5315 private: | 5303 private: |
5316 LAllocate* instr_; | 5304 LAllocate* instr_; |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5799 __ LoadP(result, | 5787 __ LoadP(result, |
5800 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5788 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5801 __ bind(deferred->exit()); | 5789 __ bind(deferred->exit()); |
5802 __ bind(&done); | 5790 __ bind(&done); |
5803 } | 5791 } |
5804 | 5792 |
5805 #undef __ | 5793 #undef __ |
5806 | 5794 |
5807 } // namespace internal | 5795 } // namespace internal |
5808 } // namespace v8 | 5796 } // namespace v8 |
OLD | NEW |