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

Side by Side Diff: src/compiler/x64/instruction-selector-x64.cc

Issue 1846083005: Revert of [compiler] Add relocatable pointer constants for wasm memory references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « src/compiler/x64/code-generator-x64.cc ('k') | src/x64/assembler-x64.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 <algorithm> 5 #include <algorithm>
6 6
7 #include "src/base/adapters.h" 7 #include "src/base/adapters.h"
8 #include "src/compiler/instruction-selector-impl.h" 8 #include "src/compiler/instruction-selector-impl.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 namespace compiler { 14 namespace compiler {
15 15
16 // Adds X64-specific methods for generating operands. 16 // Adds X64-specific methods for generating operands.
17 class X64OperandGenerator final : public OperandGenerator { 17 class X64OperandGenerator final : public OperandGenerator {
18 public: 18 public:
19 explicit X64OperandGenerator(InstructionSelector* selector) 19 explicit X64OperandGenerator(InstructionSelector* selector)
20 : OperandGenerator(selector) {} 20 : OperandGenerator(selector) {}
21 21
22 bool CanBeImmediate(Node* node) { 22 bool CanBeImmediate(Node* node) {
23 switch (node->opcode()) { 23 switch (node->opcode()) {
24 case IrOpcode::kInt32Constant: 24 case IrOpcode::kInt32Constant:
25 case IrOpcode::kRelocatableInt32Constant:
26 return true; 25 return true;
27 case IrOpcode::kInt64Constant: { 26 case IrOpcode::kInt64Constant: {
28 const int64_t value = OpParameter<int64_t>(node); 27 const int64_t value = OpParameter<int64_t>(node);
29 return value == static_cast<int64_t>(static_cast<int32_t>(value)); 28 return value == static_cast<int64_t>(static_cast<int32_t>(value));
30 } 29 }
31 case IrOpcode::kNumberConstant: { 30 case IrOpcode::kNumberConstant: {
32 const double value = OpParameter<double>(node); 31 const double value = OpParameter<double>(node);
33 return bit_cast<int64_t>(value) == 0; 32 return bit_cast<int64_t>(value) == 0;
34 } 33 }
35 default: 34 default:
(...skipping 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 MachineOperatorBuilder::kFloat64RoundTruncate | 1972 MachineOperatorBuilder::kFloat64RoundTruncate |
1974 MachineOperatorBuilder::kFloat32RoundTiesEven | 1973 MachineOperatorBuilder::kFloat32RoundTiesEven |
1975 MachineOperatorBuilder::kFloat64RoundTiesEven; 1974 MachineOperatorBuilder::kFloat64RoundTiesEven;
1976 } 1975 }
1977 return flags; 1976 return flags;
1978 } 1977 }
1979 1978
1980 } // namespace compiler 1979 } // namespace compiler
1981 } // namespace internal 1980 } // namespace internal
1982 } // namespace v8 1981 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698