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

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

Issue 1895673002: X87: [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/x87/code-generator-x87.cc ('k') | no next file » | 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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 InstructionOperand CreateImmediate(int imm) { 54 InstructionOperand CreateImmediate(int imm) {
55 return sequence()->AddImmediate(Constant(imm)); 55 return sequence()->AddImmediate(Constant(imm));
56 } 56 }
57 57
58 bool CanBeImmediate(Node* node) { 58 bool CanBeImmediate(Node* node) {
59 switch (node->opcode()) { 59 switch (node->opcode()) {
60 case IrOpcode::kInt32Constant: 60 case IrOpcode::kInt32Constant:
61 case IrOpcode::kNumberConstant: 61 case IrOpcode::kNumberConstant:
62 case IrOpcode::kExternalConstant: 62 case IrOpcode::kExternalConstant:
63 case IrOpcode::kRelocatableInt32Constant:
64 case IrOpcode::kRelocatableInt64Constant:
63 return true; 65 return true;
64 case IrOpcode::kHeapConstant: { 66 case IrOpcode::kHeapConstant: {
65 // Constants in new space cannot be used as immediates in V8 because 67 // Constants in new space cannot be used as immediates in V8 because
66 // the GC does not scan code objects when collecting the new generation. 68 // the GC does not scan code objects when collecting the new generation.
67 Handle<HeapObject> value = OpParameter<Handle<HeapObject>>(node); 69 Handle<HeapObject> value = OpParameter<Handle<HeapObject>>(node);
68 Isolate* isolate = value->GetIsolate(); 70 Isolate* isolate = value->GetIsolate();
69 return !isolate->heap()->InNewSpace(*value); 71 return !isolate->heap()->InNewSpace(*value);
70 } 72 }
71 default: 73 default:
72 return false; 74 return false;
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 MachineOperatorBuilder::kFloat32RoundTruncate | 1611 MachineOperatorBuilder::kFloat32RoundTruncate |
1610 MachineOperatorBuilder::kFloat64RoundTruncate | 1612 MachineOperatorBuilder::kFloat64RoundTruncate |
1611 MachineOperatorBuilder::kFloat32RoundTiesEven | 1613 MachineOperatorBuilder::kFloat32RoundTiesEven |
1612 MachineOperatorBuilder::kFloat64RoundTiesEven; 1614 MachineOperatorBuilder::kFloat64RoundTiesEven;
1613 return flags; 1615 return flags;
1614 } 1616 }
1615 1617
1616 } // namespace compiler 1618 } // namespace compiler
1617 } // namespace internal 1619 } // namespace internal
1618 } // namespace v8 1620 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x87/code-generator-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698