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 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1563 __ str(temp, g.ToMemOperand(destination)); | 1563 __ str(temp, g.ToMemOperand(destination)); |
1564 } | 1564 } |
1565 } else if (source->IsConstant()) { | 1565 } else if (source->IsConstant()) { |
1566 Constant src = g.ToConstant(source); | 1566 Constant src = g.ToConstant(source); |
1567 if (destination->IsRegister() || destination->IsStackSlot()) { | 1567 if (destination->IsRegister() || destination->IsStackSlot()) { |
1568 Register dst = | 1568 Register dst = |
1569 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; | 1569 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; |
1570 switch (src.type()) { | 1570 switch (src.type()) { |
1571 case Constant::kInt32: | 1571 case Constant::kInt32: |
1572 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || | 1572 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || |
| 1573 src.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE || |
1573 src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { | 1574 src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { |
1574 __ mov(dst, Operand(src.ToInt32(), src.rmode())); | 1575 __ mov(dst, Operand(src.ToInt32(), src.rmode())); |
1575 } else { | 1576 } else { |
1576 __ mov(dst, Operand(src.ToInt32())); | 1577 __ mov(dst, Operand(src.ToInt32())); |
1577 } | 1578 } |
1578 break; | 1579 break; |
1579 case Constant::kInt64: | 1580 case Constant::kInt64: |
1580 UNREACHABLE(); | 1581 UNREACHABLE(); |
1581 break; | 1582 break; |
1582 case Constant::kFloat32: | 1583 case Constant::kFloat32: |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1798 padding_size -= v8::internal::Assembler::kInstrSize; | 1799 padding_size -= v8::internal::Assembler::kInstrSize; |
1799 } | 1800 } |
1800 } | 1801 } |
1801 } | 1802 } |
1802 | 1803 |
1803 #undef __ | 1804 #undef __ |
1804 | 1805 |
1805 } // namespace compiler | 1806 } // namespace compiler |
1806 } // namespace internal | 1807 } // namespace internal |
1807 } // namespace v8 | 1808 } // namespace v8 |
OLD | NEW |