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 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
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 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2211 Register result_reg = ToRegister(instr->result()); | 2211 Register result_reg = ToRegister(instr->result()); |
2212 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { | 2212 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { |
2213 __ Fmov(result_reg, value_reg); | 2213 __ Fmov(result_reg, value_reg); |
2214 __ Lsr(result_reg, result_reg, 32); | 2214 __ Lsr(result_reg, result_reg, 32); |
2215 } else { | 2215 } else { |
2216 __ Fmov(result_reg.W(), value_reg.S()); | 2216 __ Fmov(result_reg.W(), value_reg.S()); |
2217 } | 2217 } |
2218 } | 2218 } |
2219 | 2219 |
2220 | 2220 |
2221 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { | |
2222 Register hi_reg = ToRegister(instr->hi()); | |
2223 Register lo_reg = ToRegister(instr->lo()); | |
2224 DoubleRegister result_reg = ToDoubleRegister(instr->result()); | |
2225 | |
2226 // Insert the least significant 32 bits of hi_reg into the most significant | |
2227 // 32 bits of lo_reg, and move to a floating point register. | |
2228 __ Bfi(lo_reg, hi_reg, 32, 32); | |
2229 __ Fmov(result_reg, lo_reg); | |
2230 } | |
2231 | |
2232 | |
2233 void LCodeGen::DoClassOfTestAndBranch(LClassOfTestAndBranch* instr) { | 2221 void LCodeGen::DoClassOfTestAndBranch(LClassOfTestAndBranch* instr) { |
2234 Handle<String> class_name = instr->hydrogen()->class_name(); | 2222 Handle<String> class_name = instr->hydrogen()->class_name(); |
2235 Label* true_label = instr->TrueLabel(chunk_); | 2223 Label* true_label = instr->TrueLabel(chunk_); |
2236 Label* false_label = instr->FalseLabel(chunk_); | 2224 Label* false_label = instr->FalseLabel(chunk_); |
2237 Register input = ToRegister(instr->value()); | 2225 Register input = ToRegister(instr->value()); |
2238 Register scratch1 = ToRegister(instr->temp1()); | 2226 Register scratch1 = ToRegister(instr->temp1()); |
2239 Register scratch2 = ToRegister(instr->temp2()); | 2227 Register scratch2 = ToRegister(instr->temp2()); |
2240 | 2228 |
2241 __ JumpIfSmi(input, false_label); | 2229 __ JumpIfSmi(input, false_label); |
2242 | 2230 |
(...skipping 3502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5745 // Index is equal to negated out of object property index plus 1. | 5733 // Index is equal to negated out of object property index plus 1. |
5746 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5734 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5747 __ Ldr(result, FieldMemOperand(result, | 5735 __ Ldr(result, FieldMemOperand(result, |
5748 FixedArray::kHeaderSize - kPointerSize)); | 5736 FixedArray::kHeaderSize - kPointerSize)); |
5749 __ Bind(deferred->exit()); | 5737 __ Bind(deferred->exit()); |
5750 __ Bind(&done); | 5738 __ Bind(&done); |
5751 } | 5739 } |
5752 | 5740 |
5753 } // namespace internal | 5741 } // namespace internal |
5754 } // namespace v8 | 5742 } // namespace v8 |
OLD | NEW |