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

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: Removing additional check Created 4 years, 9 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') | src/compiler/verifier.cc » ('J')
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 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 __ ldr(temp, src); 1385 __ ldr(temp, src);
1386 __ str(temp, g.ToMemOperand(destination)); 1386 __ str(temp, g.ToMemOperand(destination));
1387 } 1387 }
1388 } else if (source->IsConstant()) { 1388 } else if (source->IsConstant()) {
1389 Constant src = g.ToConstant(source); 1389 Constant src = g.ToConstant(source);
1390 if (destination->IsRegister() || destination->IsStackSlot()) { 1390 if (destination->IsRegister() || destination->IsStackSlot()) {
1391 Register dst = 1391 Register dst =
1392 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; 1392 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg;
1393 switch (src.type()) { 1393 switch (src.type()) {
1394 case Constant::kInt32: 1394 case Constant::kInt32:
1395 __ mov(dst, Operand(src.ToInt32())); 1395 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
1396 __ mov(dst, Operand(src.ToInt32(), src.rmode()));
1397 } else {
1398 __ mov(dst, Operand(src.ToInt32()));
1399 }
1396 break; 1400 break;
1397 case Constant::kInt64: 1401 case Constant::kInt64:
1398 UNREACHABLE(); 1402 UNREACHABLE();
1399 break; 1403 break;
1400 case Constant::kFloat32: 1404 case Constant::kFloat32:
1401 __ Move(dst, 1405 __ Move(dst,
1402 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); 1406 isolate()->factory()->NewNumber(src.ToFloat32(), TENURED));
1403 break; 1407 break;
1404 case Constant::kFloat64: 1408 case Constant::kFloat64:
1405 __ Move(dst, 1409 __ Move(dst,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 padding_size -= v8::internal::Assembler::kInstrSize; 1571 padding_size -= v8::internal::Assembler::kInstrSize;
1568 } 1572 }
1569 } 1573 }
1570 } 1574 }
1571 1575
1572 #undef __ 1576 #undef __
1573 1577
1574 } // namespace compiler 1578 } // namespace compiler
1575 } // namespace internal 1579 } // namespace internal
1576 } // namespace v8 1580 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/arm64/code-generator-arm64.cc » ('j') | src/compiler/verifier.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698