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

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

Issue 1921203002: Add new relocation type WASM_MEMORY_SIZE_REFERENCE, use relocatable pointers to update wasm memory … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add compiler test Created 4 years, 7 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
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 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 __ ldr(temp, src); 1490 __ ldr(temp, src);
1491 __ str(temp, g.ToMemOperand(destination)); 1491 __ str(temp, g.ToMemOperand(destination));
1492 } 1492 }
1493 } else if (source->IsConstant()) { 1493 } else if (source->IsConstant()) {
1494 Constant src = g.ToConstant(source); 1494 Constant src = g.ToConstant(source);
1495 if (destination->IsRegister() || destination->IsStackSlot()) { 1495 if (destination->IsRegister() || destination->IsStackSlot()) {
1496 Register dst = 1496 Register dst =
1497 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; 1497 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg;
1498 switch (src.type()) { 1498 switch (src.type()) {
1499 case Constant::kInt32: 1499 case Constant::kInt32:
1500 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { 1500 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE ||
1501 src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) {
1501 __ mov(dst, Operand(src.ToInt32(), src.rmode())); 1502 __ mov(dst, Operand(src.ToInt32(), src.rmode()));
1502 } else { 1503 } else {
1503 __ mov(dst, Operand(src.ToInt32())); 1504 __ mov(dst, Operand(src.ToInt32()));
1504 } 1505 }
1505 break; 1506 break;
1506 case Constant::kInt64: 1507 case Constant::kInt64:
1507 UNREACHABLE(); 1508 UNREACHABLE();
1508 break; 1509 break;
1509 case Constant::kFloat32: 1510 case Constant::kFloat32:
1510 __ Move(dst, 1511 __ Move(dst,
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 padding_size -= v8::internal::Assembler::kInstrSize; 1677 padding_size -= v8::internal::Assembler::kInstrSize;
1677 } 1678 }
1678 } 1679 }
1679 } 1680 }
1680 1681
1681 #undef __ 1682 #undef __
1682 1683
1683 } // namespace compiler 1684 } // namespace compiler
1684 } // namespace internal 1685 } // namespace internal
1685 } // namespace v8 1686 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698