Adding thread stack padding.

This commit is contained in:
Ben Vanik 2014-01-05 16:22:49 -08:00
parent 56476d276d
commit de113a4a05
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,10 @@ XenonThreadState::XenonThreadState(
context_->r[1] = stack_address_ + stack_size; context_->r[1] = stack_address_ + stack_size;
context_->r[13] = thread_state_address_; context_->r[13] = thread_state_address_;
// Pad out stack a bit, as some games seem to overwrite the caller by about
// 16 to 32b.
context_->r[1] -= 64;
raw_context_ = context_; raw_context_ = context_;
alloy::tracing::WriteEvent(EventType::ThreadInit({ alloy::tracing::WriteEvent(EventType::ThreadInit({