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 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 __ Bind(&is_heap_number); | 2195 __ Bind(&is_heap_number); |
2196 DoubleRegister dbl_scratch = double_scratch(); | 2196 DoubleRegister dbl_scratch = double_scratch(); |
2197 DoubleRegister dbl_scratch2 = ToDoubleRegister(instr->temp1()); | 2197 DoubleRegister dbl_scratch2 = ToDoubleRegister(instr->temp1()); |
2198 __ Ldr(dbl_scratch, FieldMemOperand(input, HeapNumber::kValueOffset)); | 2198 __ Ldr(dbl_scratch, FieldMemOperand(input, HeapNumber::kValueOffset)); |
2199 __ ClampDoubleToUint8(result, dbl_scratch, dbl_scratch2); | 2199 __ ClampDoubleToUint8(result, dbl_scratch, dbl_scratch2); |
2200 | 2200 |
2201 __ Bind(&done); | 2201 __ Bind(&done); |
2202 } | 2202 } |
2203 | 2203 |
2204 | 2204 |
2205 void LCodeGen::DoDoubleBits(LDoubleBits* instr) { | |
2206 DoubleRegister value_reg = ToDoubleRegister(instr->value()); | |
2207 Register result_reg = ToRegister(instr->result()); | |
2208 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { | |
2209 __ Fmov(result_reg, value_reg); | |
2210 __ Lsr(result_reg, result_reg, 32); | |
2211 } else { | |
2212 __ Fmov(result_reg.W(), value_reg.S()); | |
2213 } | |
2214 } | |
2215 | |
2216 | |
2217 void LCodeGen::DoClassOfTestAndBranch(LClassOfTestAndBranch* instr) { | 2205 void LCodeGen::DoClassOfTestAndBranch(LClassOfTestAndBranch* instr) { |
2218 Handle<String> class_name = instr->hydrogen()->class_name(); | 2206 Handle<String> class_name = instr->hydrogen()->class_name(); |
2219 Label* true_label = instr->TrueLabel(chunk_); | 2207 Label* true_label = instr->TrueLabel(chunk_); |
2220 Label* false_label = instr->FalseLabel(chunk_); | 2208 Label* false_label = instr->FalseLabel(chunk_); |
2221 Register input = ToRegister(instr->value()); | 2209 Register input = ToRegister(instr->value()); |
2222 Register scratch1 = ToRegister(instr->temp1()); | 2210 Register scratch1 = ToRegister(instr->temp1()); |
2223 Register scratch2 = ToRegister(instr->temp2()); | 2211 Register scratch2 = ToRegister(instr->temp2()); |
2224 | 2212 |
2225 __ JumpIfSmi(input, false_label); | 2213 __ JumpIfSmi(input, false_label); |
2226 | 2214 |
(...skipping 3502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5729 // Index is equal to negated out of object property index plus 1. | 5717 // Index is equal to negated out of object property index plus 1. |
5730 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5718 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5731 __ Ldr(result, FieldMemOperand(result, | 5719 __ Ldr(result, FieldMemOperand(result, |
5732 FixedArray::kHeaderSize - kPointerSize)); | 5720 FixedArray::kHeaderSize - kPointerSize)); |
5733 __ Bind(deferred->exit()); | 5721 __ Bind(deferred->exit()); |
5734 __ Bind(&done); | 5722 __ Bind(&done); |
5735 } | 5723 } |
5736 | 5724 |
5737 } // namespace internal | 5725 } // namespace internal |
5738 } // namespace v8 | 5726 } // namespace v8 |
OLD | NEW |