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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/instructions_dbc.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/instructions_dbc.cc
diff --git a/runtime/vm/instructions_dbc.cc b/runtime/vm/instructions_dbc.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b7b796c51f502a90674eb95e632a94a417521560
--- /dev/null
+++ b/runtime/vm/instructions_dbc.cc
@@ -0,0 +1,177 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC.
+#if defined(TARGET_ARCH_DBC)
+
+#include "vm/assembler.h"
+#include "vm/constants_dbc.h"
+#include "vm/cpu.h"
+#include "vm/instructions.h"
+#include "vm/object.h"
+
+namespace dart {
+
+CallPattern::CallPattern(uword pc, const Code& code)
+ : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
+ end_(pc),
+ ic_data_load_end_(0),
+ target_code_pool_index_(-1),
+ ic_data_(ICData::Handle()) {
+ UNIMPLEMENTED();
+}
+
+
+int CallPattern::DeoptCallPatternLengthInInstructions() {
+ UNIMPLEMENTED();
+ return 0;
+}
+
+int CallPattern::DeoptCallPatternLengthInBytes() {
+ UNIMPLEMENTED();
+ return 0;
+}
+
+
+NativeCallPattern::NativeCallPattern(uword pc, const Code& code)
+ : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
+ end_(pc),
+ native_function_pool_index_(-1),
+ target_code_pool_index_(-1) {
+ UNIMPLEMENTED();
+}
+
+
+RawCode* NativeCallPattern::target() const {
+ return reinterpret_cast<RawCode*>(
+ object_pool_.ObjectAt(target_code_pool_index_));
+}
+
+
+void NativeCallPattern::set_target(const Code& new_target) const {
+ object_pool_.SetObjectAt(target_code_pool_index_, new_target);
+ // No need to flush the instruction cache, since the code is not modified.
+}
+
+
+NativeFunction NativeCallPattern::native_function() const {
+ return reinterpret_cast<NativeFunction>(
+ object_pool_.RawValueAt(native_function_pool_index_));
+}
+
+
+void NativeCallPattern::set_native_function(NativeFunction func) const {
+ object_pool_.SetRawValueAt(native_function_pool_index_,
+ reinterpret_cast<uword>(func));
+}
+
+
+// Decodes a load sequence ending at 'end' (the last instruction of the load
+// sequence is the instruction before the one at end). Returns a pointer to
+// the first instruction in the sequence. Returns the register being loaded
+// and the loaded object in the output parameters 'reg' and 'obj'
+// respectively.
+uword InstructionPattern::DecodeLoadObject(uword end,
+ const ObjectPool& object_pool,
+ Register* reg,
+ Object* obj) {
+ UNIMPLEMENTED();
+ return 0;
+}
+
+
+// Decodes a load sequence ending at 'end' (the last instruction of the load
+// sequence is the instruction before the one at end). Returns a pointer to
+// the first instruction in the sequence. Returns the register being loaded
+// and the loaded immediate value in the output parameters 'reg' and 'value'
+// respectively.
+uword InstructionPattern::DecodeLoadWordImmediate(uword end,
+ Register* reg,
+ intptr_t* value) {
+ UNIMPLEMENTED();
+ return 0;
+}
+
+
+// Decodes a load sequence ending at 'end' (the last instruction of the load
+// sequence is the instruction before the one at end). Returns a pointer to
+// the first instruction in the sequence. Returns the register being loaded
+// and the index in the pool being read from in the output parameters 'reg'
+// and 'index' respectively.
+uword InstructionPattern::DecodeLoadWordFromPool(uword end,
+ Register* reg,
+ intptr_t* index) {
+ UNIMPLEMENTED();
+ return 0;
+}
+
+
+bool DecodeLoadObjectFromPoolOrThread(uword pc,
+ const Code& code,
+ Object* obj) {
+ UNIMPLEMENTED();
+ return false;
+}
+
+
+RawICData* CallPattern::IcData() {
+ UNIMPLEMENTED();
+ return ICData::null();
+}
+
+
+RawCode* CallPattern::TargetCode() const {
+ return reinterpret_cast<RawCode*>(
+ object_pool_.ObjectAt(target_code_pool_index_));
+}
+
+
+void CallPattern::SetTargetCode(const Code& target_code) const {
+ object_pool_.SetObjectAt(target_code_pool_index_, target_code);
+}
+
+
+void CallPattern::InsertDeoptCallAt(uword pc, uword target_address) {
+ UNIMPLEMENTED();
+}
+
+
+SwitchableCallPattern::SwitchableCallPattern(uword pc, const Code& code)
+ : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
+ cache_pool_index_(-1),
+ stub_pool_index_(-1) {
+ UNIMPLEMENTED();
+}
+
+
+RawObject* SwitchableCallPattern::cache() const {
+ return reinterpret_cast<RawCode*>(
+ object_pool_.ObjectAt(cache_pool_index_));
+}
+
+
+void SwitchableCallPattern::SetCache(const MegamorphicCache& cache) const {
+ ASSERT(Object::Handle(object_pool_.ObjectAt(cache_pool_index_)).IsICData());
+ object_pool_.SetObjectAt(cache_pool_index_, cache);
+}
+
+
+void SwitchableCallPattern::SetLookupStub(const Code& lookup_stub) const {
+ ASSERT(Object::Handle(object_pool_.ObjectAt(stub_pool_index_)).IsCode());
+ object_pool_.SetObjectAt(stub_pool_index_, lookup_stub);
+}
+
+
+ReturnPattern::ReturnPattern(uword pc) : pc_(pc) {
+}
+
+
+bool ReturnPattern::IsValid() const {
+ UNIMPLEMENTED();
+ return false;
+}
+
+} // namespace dart
+
+#endif // defined TARGET_ARCH_DBC
« 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