| 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 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1441 __ ldr(temp, src); | 1441 __ ldr(temp, src); |
| 1442 __ str(temp, g.ToMemOperand(destination)); | 1442 __ str(temp, g.ToMemOperand(destination)); |
| 1443 } | 1443 } |
| 1444 } else if (source->IsConstant()) { | 1444 } else if (source->IsConstant()) { |
| 1445 Constant src = g.ToConstant(source); | 1445 Constant src = g.ToConstant(source); |
| 1446 if (destination->IsRegister() || destination->IsStackSlot()) { | 1446 if (destination->IsRegister() || destination->IsStackSlot()) { |
| 1447 Register dst = | 1447 Register dst = |
| 1448 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; | 1448 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; |
| 1449 switch (src.type()) { | 1449 switch (src.type()) { |
| 1450 case Constant::kInt32: | 1450 case Constant::kInt32: |
| 1451 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { | 1451 __ mov(dst, Operand(src.ToInt32())); |
| 1452 __ mov(dst, Operand(src.ToInt32(), src.rmode())); | |
| 1453 } else { | |
| 1454 __ mov(dst, Operand(src.ToInt32())); | |
| 1455 } | |
| 1456 break; | 1452 break; |
| 1457 case Constant::kInt64: | 1453 case Constant::kInt64: |
| 1458 UNREACHABLE(); | 1454 UNREACHABLE(); |
| 1459 break; | 1455 break; |
| 1460 case Constant::kFloat32: | 1456 case Constant::kFloat32: |
| 1461 __ Move(dst, | 1457 __ Move(dst, |
| 1462 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); | 1458 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); |
| 1463 break; | 1459 break; |
| 1464 case Constant::kFloat64: | 1460 case Constant::kFloat64: |
| 1465 __ Move(dst, | 1461 __ Move(dst, |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1627 padding_size -= v8::internal::Assembler::kInstrSize; | 1623 padding_size -= v8::internal::Assembler::kInstrSize; |
| 1628 } | 1624 } |
| 1629 } | 1625 } |
| 1630 } | 1626 } |
| 1631 | 1627 |
| 1632 #undef __ | 1628 #undef __ |
| 1633 | 1629 |
| 1634 } // namespace compiler | 1630 } // namespace compiler |
| 1635 } // namespace internal | 1631 } // namespace internal |
| 1636 } // namespace v8 | 1632 } // namespace v8 |
| OLD | NEW |