| 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/compilation-info.h" | 7 #include "src/compilation-info.h" | 
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" | 
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" | 
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" | 
| (...skipping 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2270       __ StoreP(temp, g.ToMemOperand(destination), r0); | 2270       __ StoreP(temp, g.ToMemOperand(destination), r0); | 
| 2271     } | 2271     } | 
| 2272   } else if (source->IsConstant()) { | 2272   } else if (source->IsConstant()) { | 
| 2273     Constant src = g.ToConstant(source); | 2273     Constant src = g.ToConstant(source); | 
| 2274     if (destination->IsRegister() || destination->IsStackSlot()) { | 2274     if (destination->IsRegister() || destination->IsStackSlot()) { | 
| 2275       Register dst = | 2275       Register dst = | 
| 2276           destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; | 2276           destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; | 
| 2277       switch (src.type()) { | 2277       switch (src.type()) { | 
| 2278         case Constant::kInt32: | 2278         case Constant::kInt32: | 
| 2279 #if V8_TARGET_ARCH_PPC64 | 2279 #if V8_TARGET_ARCH_PPC64 | 
| 2280           if (src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { | 2280           if (RelocInfo::IsWasmSizeReference(src.rmode())) { | 
| 2281 #else | 2281 #else | 
| 2282           if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || | 2282           if (RelocInfo::IsWasmReference(src.rmode())) { | 
| 2283               src.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE || |  | 
| 2284               src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { |  | 
| 2285 #endif | 2283 #endif | 
| 2286             __ mov(dst, Operand(src.ToInt32(), src.rmode())); | 2284             __ mov(dst, Operand(src.ToInt32(), src.rmode())); | 
| 2287           } else { | 2285           } else { | 
| 2288             __ mov(dst, Operand(src.ToInt32())); | 2286             __ mov(dst, Operand(src.ToInt32())); | 
| 2289           } | 2287           } | 
| 2290           break; | 2288           break; | 
| 2291         case Constant::kInt64: | 2289         case Constant::kInt64: | 
| 2292 #if V8_TARGET_ARCH_PPC64 | 2290 #if V8_TARGET_ARCH_PPC64 | 
| 2293           if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || | 2291           if (RelocInfo::IsWasmPtrReference(src.rmode())) { | 
| 2294               src.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE) { |  | 
| 2295             __ mov(dst, Operand(src.ToInt64(), src.rmode())); | 2292             __ mov(dst, Operand(src.ToInt64(), src.rmode())); | 
| 2296           } else { | 2293           } else { | 
| 2297             DCHECK(src.rmode() != RelocInfo::WASM_MEMORY_SIZE_REFERENCE); | 2294             DCHECK(!RelocInfo::IsWasmSizeReference(src.rmode())); | 
| 2298 #endif | 2295 #endif | 
| 2299             __ mov(dst, Operand(src.ToInt64())); | 2296             __ mov(dst, Operand(src.ToInt64())); | 
| 2300 #if V8_TARGET_ARCH_PPC64 | 2297 #if V8_TARGET_ARCH_PPC64 | 
| 2301           } | 2298           } | 
| 2302 #endif | 2299 #endif | 
| 2303           break; | 2300           break; | 
| 2304         case Constant::kFloat32: | 2301         case Constant::kFloat32: | 
| 2305           __ Move(dst, | 2302           __ Move(dst, | 
| 2306                   isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); | 2303                   isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); | 
| 2307           break; | 2304           break; | 
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2477       padding_size -= v8::internal::Assembler::kInstrSize; | 2474       padding_size -= v8::internal::Assembler::kInstrSize; | 
| 2478     } | 2475     } | 
| 2479   } | 2476   } | 
| 2480 } | 2477 } | 
| 2481 | 2478 | 
| 2482 #undef __ | 2479 #undef __ | 
| 2483 | 2480 | 
| 2484 }  // namespace compiler | 2481 }  // namespace compiler | 
| 2485 }  // namespace internal | 2482 }  // namespace internal | 
| 2486 }  // namespace v8 | 2483 }  // namespace v8 | 
| OLD | NEW | 
|---|