Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: src/compiler/arm/code-generator-arm.cc

Issue 1759383003: [compiler] Add relocatable pointer constants for wasm memory references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix uninitialized variable causing msan failure Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/arm64/code-generator-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 __ mov(dst, Operand(src.ToInt32())); 1451 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
1452 __ mov(dst, Operand(src.ToInt32(), src.rmode()));
1453 } else {
1454 __ mov(dst, Operand(src.ToInt32()));
1455 }
1452 break; 1456 break;
1453 case Constant::kInt64: 1457 case Constant::kInt64:
1454 UNREACHABLE(); 1458 UNREACHABLE();
1455 break; 1459 break;
1456 case Constant::kFloat32: 1460 case Constant::kFloat32:
1457 __ Move(dst, 1461 __ Move(dst,
1458 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); 1462 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED));
1459 break; 1463 break;
1460 case Constant::kFloat64: 1464 case Constant::kFloat64:
1461 __ Move(dst, 1465 __ Move(dst,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 padding_size -= v8::internal::Assembler::kInstrSize; 1627 padding_size -= v8::internal::Assembler::kInstrSize;
1624 } 1628 }
1625 } 1629 }
1626 } 1630 }
1627 1631
1628 #undef __ 1632 #undef __
1629 1633
1630 } // namespace compiler 1634 } // namespace compiler
1631 } // namespace internal 1635 } // namespace internal
1632 } // namespace v8 1636 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/arm64/code-generator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698