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

Side by Side Diff: src/compiler/raw-machine-assembler.h

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 | « src/compiler/opcodes.h ('k') | src/compiler/raw-machine-assembler.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 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 5 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 // Constants. 70 // Constants.
71 Node* PointerConstant(void* value) { 71 Node* PointerConstant(void* value) {
72 return IntPtrConstant(reinterpret_cast<intptr_t>(value)); 72 return IntPtrConstant(reinterpret_cast<intptr_t>(value));
73 } 73 }
74 Node* IntPtrConstant(intptr_t value) { 74 Node* IntPtrConstant(intptr_t value) {
75 // TODO(dcarney): mark generated code as unserializable if value != 0. 75 // TODO(dcarney): mark generated code as unserializable if value != 0.
76 return kPointerSize == 8 ? Int64Constant(value) 76 return kPointerSize == 8 ? Int64Constant(value)
77 : Int32Constant(static_cast<int>(value)); 77 : Int32Constant(static_cast<int>(value));
78 } 78 }
79 Node* RelocatableIntPtrConstant(intptr_t value, RelocInfo::Mode rmode);
79 Node* Int32Constant(int32_t value) { 80 Node* Int32Constant(int32_t value) {
80 return AddNode(common()->Int32Constant(value)); 81 return AddNode(common()->Int32Constant(value));
81 } 82 }
82 Node* StackSlot(MachineRepresentation rep) { 83 Node* StackSlot(MachineRepresentation rep) {
83 return AddNode(machine()->StackSlot(rep)); 84 return AddNode(machine()->StackSlot(rep));
84 } 85 }
85 Node* Int64Constant(int64_t value) { 86 Node* Int64Constant(int64_t value) {
86 return AddNode(common()->Int64Constant(value)); 87 return AddNode(common()->Int64Constant(value));
87 } 88 }
88 Node* NumberConstant(double value) { 89 Node* NumberConstant(double value) {
89 return AddNode(common()->NumberConstant(value)); 90 return AddNode(common()->NumberConstant(value));
90 } 91 }
91 Node* Float32Constant(float value) { 92 Node* Float32Constant(float value) {
92 return AddNode(common()->Float32Constant(value)); 93 return AddNode(common()->Float32Constant(value));
93 } 94 }
94 Node* Float64Constant(double value) { 95 Node* Float64Constant(double value) {
95 return AddNode(common()->Float64Constant(value)); 96 return AddNode(common()->Float64Constant(value));
96 } 97 }
97 Node* HeapConstant(Handle<HeapObject> object) { 98 Node* HeapConstant(Handle<HeapObject> object) {
98 return AddNode(common()->HeapConstant(object)); 99 return AddNode(common()->HeapConstant(object));
99 } 100 }
100 Node* BooleanConstant(bool value) { 101 Node* BooleanConstant(bool value) {
101 Handle<Object> object = isolate()->factory()->ToBoolean(value); 102 Handle<Object> object = isolate()->factory()->ToBoolean(value);
102 return HeapConstant(Handle<HeapObject>::cast(object)); 103 return HeapConstant(Handle<HeapObject>::cast(object));
103 } 104 }
104 Node* ExternalConstant(ExternalReference address) { 105 Node* ExternalConstant(ExternalReference address) {
105 return AddNode(common()->ExternalConstant(address)); 106 return AddNode(common()->ExternalConstant(address));
106 } 107 }
108 Node* RelocatableInt32Constant(int32_t value, RelocInfo::Mode rmode) {
109 return AddNode(common()->RelocatableInt32Constant(value, rmode));
110 }
111 Node* RelocatableInt64Constant(int64_t value, RelocInfo::Mode rmode) {
112 return AddNode(common()->RelocatableInt64Constant(value, rmode));
113 }
107 114
108 Node* Projection(int index, Node* a) { 115 Node* Projection(int index, Node* a) {
109 return AddNode(common()->Projection(index), a); 116 return AddNode(common()->Projection(index), a);
110 } 117 }
111 118
112 // Memory Operations. 119 // Memory Operations.
113 Node* Load(MachineType rep, Node* base) { 120 Node* Load(MachineType rep, Node* base) {
114 return Load(rep, base, IntPtrConstant(0)); 121 return Load(rep, base, IntPtrConstant(0));
115 } 122 }
116 Node* Load(MachineType rep, Node* base, Node* index) { 123 Node* Load(MachineType rep, Node* base, Node* index) {
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 bool deferred_; 747 bool deferred_;
741 friend class RawMachineAssembler; 748 friend class RawMachineAssembler;
742 DISALLOW_COPY_AND_ASSIGN(RawMachineLabel); 749 DISALLOW_COPY_AND_ASSIGN(RawMachineLabel);
743 }; 750 };
744 751
745 } // namespace compiler 752 } // namespace compiler
746 } // namespace internal 753 } // namespace internal
747 } // namespace v8 754 } // namespace v8
748 755
749 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 756 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698