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/compilation-info.h" | 8 #include "src/compilation-info.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 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1983 __ ldr(temp, src); | 1983 __ ldr(temp, src); |
1984 __ str(temp, g.ToMemOperand(destination)); | 1984 __ str(temp, g.ToMemOperand(destination)); |
1985 } | 1985 } |
1986 } else if (source->IsConstant()) { | 1986 } else if (source->IsConstant()) { |
1987 Constant src = g.ToConstant(source); | 1987 Constant src = g.ToConstant(source); |
1988 if (destination->IsRegister() || destination->IsStackSlot()) { | 1988 if (destination->IsRegister() || destination->IsStackSlot()) { |
1989 Register dst = | 1989 Register dst = |
1990 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; | 1990 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; |
1991 switch (src.type()) { | 1991 switch (src.type()) { |
1992 case Constant::kInt32: | 1992 case Constant::kInt32: |
1993 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || | 1993 if (RelocInfo::IsWasmReference(src.rmode())) { |
1994 src.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE || | |
1995 src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { | |
1996 __ mov(dst, Operand(src.ToInt32(), src.rmode())); | 1994 __ mov(dst, Operand(src.ToInt32(), src.rmode())); |
1997 } else { | 1995 } else { |
1998 __ mov(dst, Operand(src.ToInt32())); | 1996 __ mov(dst, Operand(src.ToInt32())); |
1999 } | 1997 } |
2000 break; | 1998 break; |
2001 case Constant::kInt64: | 1999 case Constant::kInt64: |
2002 UNREACHABLE(); | 2000 UNREACHABLE(); |
2003 break; | 2001 break; |
2004 case Constant::kFloat32: | 2002 case Constant::kFloat32: |
2005 __ Move(dst, | 2003 __ Move(dst, |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2269 padding_size -= v8::internal::Assembler::kInstrSize; | 2267 padding_size -= v8::internal::Assembler::kInstrSize; |
2270 } | 2268 } |
2271 } | 2269 } |
2272 } | 2270 } |
2273 | 2271 |
2274 #undef __ | 2272 #undef __ |
2275 | 2273 |
2276 } // namespace compiler | 2274 } // namespace compiler |
2277 } // namespace internal | 2275 } // namespace internal |
2278 } // namespace v8 | 2276 } // namespace v8 |
OLD | NEW |