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 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1495 __ ldr(temp, src); | 1495 __ ldr(temp, src); |
1496 __ str(temp, g.ToMemOperand(destination)); | 1496 __ str(temp, g.ToMemOperand(destination)); |
1497 } | 1497 } |
1498 } else if (source->IsConstant()) { | 1498 } else if (source->IsConstant()) { |
1499 Constant src = g.ToConstant(source); | 1499 Constant src = g.ToConstant(source); |
1500 if (destination->IsRegister() || destination->IsStackSlot()) { | 1500 if (destination->IsRegister() || destination->IsStackSlot()) { |
1501 Register dst = | 1501 Register dst = |
1502 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; | 1502 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; |
1503 switch (src.type()) { | 1503 switch (src.type()) { |
1504 case Constant::kInt32: | 1504 case Constant::kInt32: |
1505 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { | 1505 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || |
| 1506 src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { |
1506 __ mov(dst, Operand(src.ToInt32(), src.rmode())); | 1507 __ mov(dst, Operand(src.ToInt32(), src.rmode())); |
1507 } else { | 1508 } else { |
1508 __ mov(dst, Operand(src.ToInt32())); | 1509 __ mov(dst, Operand(src.ToInt32())); |
1509 } | 1510 } |
1510 break; | 1511 break; |
1511 case Constant::kInt64: | 1512 case Constant::kInt64: |
1512 UNREACHABLE(); | 1513 UNREACHABLE(); |
1513 break; | 1514 break; |
1514 case Constant::kFloat32: | 1515 case Constant::kFloat32: |
1515 __ Move(dst, | 1516 __ Move(dst, |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 padding_size -= v8::internal::Assembler::kInstrSize; | 1682 padding_size -= v8::internal::Assembler::kInstrSize; |
1682 } | 1683 } |
1683 } | 1684 } |
1684 } | 1685 } |
1685 | 1686 |
1686 #undef __ | 1687 #undef __ |
1687 | 1688 |
1688 } // namespace compiler | 1689 } // namespace compiler |
1689 } // namespace internal | 1690 } // namespace internal |
1690 } // namespace v8 | 1691 } // namespace v8 |
OLD | NEW |