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

Unified Diff: runtime/vm/thread.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/thread.h ('k') | runtime/vm/unit_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread.cc
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 5775145f60431576e7d18b72f94501fd2b884bfa..3c7efeeebeb16259343d6bce5361bad10d36cd11 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -318,6 +318,7 @@ void Thread::PrepareForGC() {
void Thread::SetStackLimitFromStackBase(uword stack_base) {
// Set stack limit.
+#if !defined(TARGET_ARCH_DBC)
#if defined(USING_SIMULATOR)
// Ignore passed-in native stack top and use Simulator stack top.
Simulator* sim = Simulator::Current(); // May allocate a simulator.
@@ -326,6 +327,9 @@ void Thread::SetStackLimitFromStackBase(uword stack_base) {
// The overflow area is accounted for by the simulator.
#endif
SetStackLimit(stack_base - OSThread::GetSpecifiedStackSize());
+#else
+ SetStackLimit(Simulator::Current()->StackTop());
+#endif // !defined(TARGET_ARCH_DBC)
}
@@ -348,11 +352,15 @@ void Thread::ClearStackLimit() {
/* static */
uword Thread::GetCurrentStackPointer() {
+#if !defined(TARGET_ARCH_DBC)
// Since AddressSanitizer's detect_stack_use_after_return instruments the
// C++ code to give out fake stack addresses, we call a stub in that case.
ASSERT(StubCode::GetStackPointer_entry() != NULL);
uword (*func)() = reinterpret_cast<uword (*)()>(
StubCode::GetStackPointer_entry()->EntryPoint());
+#else
+ uword (*func)() = NULL;
+#endif
// But for performance (and to support simulators), we normally use a local.
#if defined(__has_feature)
#if __has_feature(address_sanitizer)
@@ -390,7 +398,7 @@ void Thread::ScheduleInterruptsLocked(uword interrupt_bits) {
}
if (stack_limit_ == saved_stack_limit_) {
- stack_limit_ = (~static_cast<uword>(0)) & ~kInterruptsMask;
+ stack_limit_ = kInterruptStackLimit & ~kInterruptsMask;
}
stack_limit_ |= interrupt_bits;
}
@@ -437,7 +445,7 @@ void Thread::RestoreOOBMessageInterrupts() {
deferred_interrupts_mask_ = 0;
if (deferred_interrupts_ != 0) {
if (stack_limit_ == saved_stack_limit_) {
- stack_limit_ = (~static_cast<uword>(0)) & ~kInterruptsMask;
+ stack_limit_ = kInterruptStackLimit & ~kInterruptsMask;
}
stack_limit_ |= deferred_interrupts_;
deferred_interrupts_ = 0;
« no previous file with comments | « runtime/vm/thread.h ('k') | runtime/vm/unit_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698