Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future fix for semaphore_406e #6116

Merged
merged 1 commit into from Jun 21, 2019

Conversation

@elad335
Copy link
Contributor

commented Jun 20, 2019

Fix pain in the future.

@Nekotekina

This comment has been minimized.

Copy link
Member

commented Jun 20, 2019

Better would be to initialize be_t<u32> arg_be = arg; and then compare arg_be with data loaded from memory in loop. If you want to optimize it so much, could just add raw() method to se_t class templates and compare raw values.

@elad335 elad335 force-pushed the elad335:sema branch 7 times, most recently from 4b7f169 to 4989cd4 Jun 20, 2019

@@ -490,6 +490,11 @@ class se_t<T, true, Align>
return storage::from(m_data);
}

type raw() const

This comment has been minimized.

Copy link
@Nekotekina

Nekotekina Jun 20, 2019

Member

It should just return m_data. Preferably reference to, like in atomic_t. Casting it to the type is not meaningful.

const auto& sema = vm::_ref<le_t<u32>>(addr);
#else
// Preswap value
arg = static_cast<u32>(be_t<u32>(arg));

This comment has been minimized.

Copy link
@Nekotekina

Nekotekina Jun 20, 2019

Member

This expression doesn't actually swap bytes. I recommended to create a new (const) variable.

@elad335 elad335 force-pushed the elad335:sema branch 7 times, most recently from 0994e2f to a96977f Jun 21, 2019

Show resolved Hide resolved rpcs3/Emu/RSX/RSXThread.cpp
Show resolved Hide resolved rpcs3/Emu/RSX/rsx_methods.cpp

@elad335 elad335 force-pushed the elad335:sema branch 2 times, most recently from 7a15646 to f7d9a59 Jun 21, 2019

@elad335 elad335 force-pushed the elad335:sema branch from f7d9a59 to 87916e9 Jun 21, 2019

@Nekotekina Nekotekina merged commit cd0ef99 into RPCS3:master Jun 21, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Snakegodeater

This comment has been minimized.

Copy link

commented Jun 21, 2019

I still get this error with God of War ascension !
4790k + R9 380

E {RSX [0x028269c]} RSX: nv406e::semaphore_acquire has timed out. semaphore_address=0x50300510

@elad335 elad335 deleted the elad335:sema branch Jun 22, 2019

Yahfz added a commit to Yahfz/rpcs3 that referenced this pull request Jul 11, 2019

Fix BE endianess arch support in semaphore_406e (RPCS3#6116)
Add raw() methods for endianness support types and make use of it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.