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

Unified Diff: runtime/vm/stack_frame.h

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/simulator_mips.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame.h
diff --git a/runtime/vm/stack_frame.h b/runtime/vm/stack_frame.h
index 2d1b12c2f2e7967c0c53c01026d4d88cc9e125e6..dac3e5fb714523dfb0f8bbaf14a9ddbfc7b3c1f1 100644
--- a/runtime/vm/stack_frame.h
+++ b/runtime/vm/stack_frame.h
@@ -19,6 +19,8 @@
#include "vm/stack_frame_arm64.h"
#elif defined(TARGET_ARCH_MIPS)
#include "vm/stack_frame_mips.h"
+#elif defined(TARGET_ARCH_DBC)
+#include "vm/stack_frame_dbc.h"
#else
#error Unknown architecture.
#endif
@@ -101,10 +103,12 @@ class StackFrame : public ValueObject {
uword GetCallerSp() const {
return fp() + (kCallerSpSlotFromFp * kWordSize);
}
+
uword GetCallerFp() const {
return *(reinterpret_cast<uword*>(
- fp() + (kSavedCallerFpSlotFromFp * kWordSize)));
+ fp() + (kSavedCallerFpSlotFromFp * kWordSize)));
}
+
uword GetCallerPc() const {
return *(reinterpret_cast<uword*>(
fp() + (kSavedCallerPcSlotFromFp * kWordSize)));
@@ -188,10 +192,12 @@ class StackFrameIterator : public ValueObject {
StackFrameIterator(uword last_fp, bool validate,
Thread* thread = Thread::Current());
+#if !defined(TARGET_ARCH_DBC)
// Iterator for iterating over all frames from the current frame (given by its
// fp, sp, and pc) to the first EntryFrame.
StackFrameIterator(uword fp, uword sp, uword pc, bool validate,
Thread* thread = Thread::Current());
+#endif
// Checks if a next frame exists.
bool HasNextFrame() const { return frames_.fp_ != 0; }
@@ -272,6 +278,8 @@ class DartFrameIterator : public ValueObject {
DartFrameIterator(uword last_fp,
Thread* thread = Thread::Current())
: frames_(last_fp, StackFrameIterator::kDontValidateFrames, thread) { }
+
+#if !defined(TARGET_ARCH_DBC)
DartFrameIterator(uword fp,
uword sp,
uword pc,
@@ -279,6 +287,8 @@ class DartFrameIterator : public ValueObject {
: frames_(fp, sp, pc,
StackFrameIterator::kDontValidateFrames, thread) {
}
+#endif
+
// Get next dart frame.
StackFrame* NextFrame() {
StackFrame* frame = frames_.NextFrame();
@@ -336,6 +346,27 @@ class InlinedFunctionsIterator : public ValueObject {
DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator);
};
+#if !defined(TARGET_ARCH_DBC)
+DART_FORCE_INLINE static uword LocalVarAddress(uword fp, intptr_t index) {
+ return fp + (index * kWordSize);
+}
+
+
+DART_FORCE_INLINE static uword ParamAddress(uword fp, intptr_t reverse_index) {
+ return fp + (kParamEndSlotFromFp * kWordSize) + (reverse_index * kWordSize);
+}
+
+
+DART_FORCE_INLINE static bool IsCalleeFrameOf(uword fp, uword other_fp) {
+ return other_fp < fp;
+}
+
+// Value for stack limit that is used to cause an interrupt.
+// Note that on DBC stack is growing upwards so interrupt limit is 0 unlike
+// on all other architectures.
+static const uword kInterruptStackLimit = ~static_cast<uword>(0);
+#endif
+
} // namespace dart
#endif // VM_STACK_FRAME_H_
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698