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 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 __ ldr(temp, src); | 1513 __ ldr(temp, src); |
1514 __ str(temp, g.ToMemOperand(destination)); | 1514 __ str(temp, g.ToMemOperand(destination)); |
1515 } | 1515 } |
1516 } else if (source->IsConstant()) { | 1516 } else if (source->IsConstant()) { |
1517 Constant src = g.ToConstant(source); | 1517 Constant src = g.ToConstant(source); |
1518 if (destination->IsRegister() || destination->IsStackSlot()) { | 1518 if (destination->IsRegister() || destination->IsStackSlot()) { |
1519 Register dst = | 1519 Register dst = |
1520 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; | 1520 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; |
1521 switch (src.type()) { | 1521 switch (src.type()) { |
1522 case Constant::kInt32: | 1522 case Constant::kInt32: |
1523 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { | 1523 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || |
| 1524 src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { |
1524 __ mov(dst, Operand(src.ToInt32(), src.rmode())); | 1525 __ mov(dst, Operand(src.ToInt32(), src.rmode())); |
1525 } else { | 1526 } else { |
1526 __ mov(dst, Operand(src.ToInt32())); | 1527 __ mov(dst, Operand(src.ToInt32())); |
1527 } | 1528 } |
1528 break; | 1529 break; |
1529 case Constant::kInt64: | 1530 case Constant::kInt64: |
1530 UNREACHABLE(); | 1531 UNREACHABLE(); |
1531 break; | 1532 break; |
1532 case Constant::kFloat32: | 1533 case Constant::kFloat32: |
1533 __ Move(dst, | 1534 __ Move(dst, |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1694 padding_size -= v8::internal::Assembler::kInstrSize; | 1695 padding_size -= v8::internal::Assembler::kInstrSize; |
1695 } | 1696 } |
1696 } | 1697 } |
1697 } | 1698 } |
1698 | 1699 |
1699 #undef __ | 1700 #undef __ |
1700 | 1701 |
1701 } // namespace compiler | 1702 } // namespace compiler |
1702 } // namespace internal | 1703 } // namespace internal |
1703 } // namespace v8 | 1704 } // namespace v8 |
OLD | NEW |