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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compiler/code-generator-impl.h" | 9 #include "src/compiler/code-generator-impl.h" |
10 #include "src/compiler/gap-resolver.h" | 10 #include "src/compiler/gap-resolver.h" |
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 __ ldr(temp, src); | 1401 __ ldr(temp, src); |
1402 __ str(temp, g.ToMemOperand(destination)); | 1402 __ str(temp, g.ToMemOperand(destination)); |
1403 } | 1403 } |
1404 } else if (source->IsConstant()) { | 1404 } else if (source->IsConstant()) { |
1405 Constant src = g.ToConstant(source); | 1405 Constant src = g.ToConstant(source); |
1406 if (destination->IsRegister() || destination->IsStackSlot()) { | 1406 if (destination->IsRegister() || destination->IsStackSlot()) { |
1407 Register dst = | 1407 Register dst = |
1408 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; | 1408 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; |
1409 switch (src.type()) { | 1409 switch (src.type()) { |
1410 case Constant::kInt32: | 1410 case Constant::kInt32: |
1411 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { | 1411 __ mov(dst, Operand(src.ToInt32())); |
1412 __ mov(dst, Operand(src.ToInt32(), src.rmode())); | |
1413 } else { | |
1414 __ mov(dst, Operand(src.ToInt32())); | |
1415 } | |
1416 break; | 1412 break; |
1417 case Constant::kInt64: | 1413 case Constant::kInt64: |
1418 UNREACHABLE(); | 1414 UNREACHABLE(); |
1419 break; | 1415 break; |
1420 case Constant::kFloat32: | 1416 case Constant::kFloat32: |
1421 __ Move(dst, | 1417 __ Move(dst, |
1422 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); | 1418 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); |
1423 break; | 1419 break; |
1424 case Constant::kFloat64: | 1420 case Constant::kFloat64: |
1425 __ Move(dst, | 1421 __ Move(dst, |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 padding_size -= v8::internal::Assembler::kInstrSize; | 1583 padding_size -= v8::internal::Assembler::kInstrSize; |
1588 } | 1584 } |
1589 } | 1585 } |
1590 } | 1586 } |
1591 | 1587 |
1592 #undef __ | 1588 #undef __ |
1593 | 1589 |
1594 } // namespace compiler | 1590 } // namespace compiler |
1595 } // namespace internal | 1591 } // namespace internal |
1596 } // namespace v8 | 1592 } // namespace v8 |
OLD | NEW |