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

Side by Side Diff: runtime/vm/instructions_dbc.cc

Issue 1858283002: Initial SIMDBC interpreter. (Closed) Base URL: git@github.com:dart-lang/sdk.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 | « runtime/vm/instructions_dbc.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC.
6 #if defined(TARGET_ARCH_DBC)
7
8 #include "vm/assembler.h"
9 #include "vm/constants_dbc.h"
10 #include "vm/cpu.h"
11 #include "vm/instructions.h"
12 #include "vm/object.h"
13
14 namespace dart {
15
16 CallPattern::CallPattern(uword pc, const Code& code)
17 : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
18 end_(pc),
19 ic_data_load_end_(0),
20 target_code_pool_index_(-1),
21 ic_data_(ICData::Handle()) {
22 UNIMPLEMENTED();
23 }
24
25
26 int CallPattern::DeoptCallPatternLengthInInstructions() {
27 UNIMPLEMENTED();
28 return 0;
29 }
30
31 int CallPattern::DeoptCallPatternLengthInBytes() {
32 UNIMPLEMENTED();
33 return 0;
34 }
35
36
37 NativeCallPattern::NativeCallPattern(uword pc, const Code& code)
38 : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
39 end_(pc),
40 native_function_pool_index_(-1),
41 target_code_pool_index_(-1) {
42 UNIMPLEMENTED();
43 }
44
45
46 RawCode* NativeCallPattern::target() const {
47 return reinterpret_cast<RawCode*>(
48 object_pool_.ObjectAt(target_code_pool_index_));
49 }
50
51
52 void NativeCallPattern::set_target(const Code& new_target) const {
53 object_pool_.SetObjectAt(target_code_pool_index_, new_target);
54 // No need to flush the instruction cache, since the code is not modified.
55 }
56
57
58 NativeFunction NativeCallPattern::native_function() const {
59 return reinterpret_cast<NativeFunction>(
60 object_pool_.RawValueAt(native_function_pool_index_));
61 }
62
63
64 void NativeCallPattern::set_native_function(NativeFunction func) const {
65 object_pool_.SetRawValueAt(native_function_pool_index_,
66 reinterpret_cast<uword>(func));
67 }
68
69
70 // Decodes a load sequence ending at 'end' (the last instruction of the load
71 // sequence is the instruction before the one at end). Returns a pointer to
72 // the first instruction in the sequence. Returns the register being loaded
73 // and the loaded object in the output parameters 'reg' and 'obj'
74 // respectively.
75 uword InstructionPattern::DecodeLoadObject(uword end,
76 const ObjectPool& object_pool,
77 Register* reg,
78 Object* obj) {
79 UNIMPLEMENTED();
80 return 0;
81 }
82
83
84 // Decodes a load sequence ending at 'end' (the last instruction of the load
85 // sequence is the instruction before the one at end). Returns a pointer to
86 // the first instruction in the sequence. Returns the register being loaded
87 // and the loaded immediate value in the output parameters 'reg' and 'value'
88 // respectively.
89 uword InstructionPattern::DecodeLoadWordImmediate(uword end,
90 Register* reg,
91 intptr_t* value) {
92 UNIMPLEMENTED();
93 return 0;
94 }
95
96
97 // Decodes a load sequence ending at 'end' (the last instruction of the load
98 // sequence is the instruction before the one at end). Returns a pointer to
99 // the first instruction in the sequence. Returns the register being loaded
100 // and the index in the pool being read from in the output parameters 'reg'
101 // and 'index' respectively.
102 uword InstructionPattern::DecodeLoadWordFromPool(uword end,
103 Register* reg,
104 intptr_t* index) {
105 UNIMPLEMENTED();
106 return 0;
107 }
108
109
110 bool DecodeLoadObjectFromPoolOrThread(uword pc,
111 const Code& code,
112 Object* obj) {
113 UNIMPLEMENTED();
114 return false;
115 }
116
117
118 RawICData* CallPattern::IcData() {
119 UNIMPLEMENTED();
120 return ICData::null();
121 }
122
123
124 RawCode* CallPattern::TargetCode() const {
125 return reinterpret_cast<RawCode*>(
126 object_pool_.ObjectAt(target_code_pool_index_));
127 }
128
129
130 void CallPattern::SetTargetCode(const Code& target_code) const {
131 object_pool_.SetObjectAt(target_code_pool_index_, target_code);
132 }
133
134
135 void CallPattern::InsertDeoptCallAt(uword pc, uword target_address) {
136 UNIMPLEMENTED();
137 }
138
139
140 SwitchableCallPattern::SwitchableCallPattern(uword pc, const Code& code)
141 : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
142 cache_pool_index_(-1),
143 stub_pool_index_(-1) {
144 UNIMPLEMENTED();
145 }
146
147
148 RawObject* SwitchableCallPattern::cache() const {
149 return reinterpret_cast<RawCode*>(
150 object_pool_.ObjectAt(cache_pool_index_));
151 }
152
153
154 void SwitchableCallPattern::SetCache(const MegamorphicCache& cache) const {
155 ASSERT(Object::Handle(object_pool_.ObjectAt(cache_pool_index_)).IsICData());
156 object_pool_.SetObjectAt(cache_pool_index_, cache);
157 }
158
159
160 void SwitchableCallPattern::SetLookupStub(const Code& lookup_stub) const {
161 ASSERT(Object::Handle(object_pool_.ObjectAt(stub_pool_index_)).IsCode());
162 object_pool_.SetObjectAt(stub_pool_index_, lookup_stub);
163 }
164
165
166 ReturnPattern::ReturnPattern(uword pc) : pc_(pc) {
167 }
168
169
170 bool ReturnPattern::IsValid() const {
171 UNIMPLEMENTED();
172 return false;
173 }
174
175 } // namespace dart
176
177 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/instructions_dbc.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698