[dynarmic] simplify assert macro usage (Only ASSERT/DEBUG_ASSERT are needed) #2890

Open
Lizzie wants to merge 12 commits from assert-simplify-only-one-macro into master
Member
  • replace instances of ASSERT() with those where UNREACHABLE() should be used instead
  • debuggers exist for a reason, you can't just debug an issue in dynarmic with just printing fancy text... you need to inspect values and alldat - while yes the asserts are "useful"; there is this beautiful thing called backtraces
  • this will indirectly speedup the main decoder loop because of the added UNREACHABLE()
  • this also removes a bunch of macros that were redundant
  • the weird trick of &{}() is really funky, just do what everyone has done for the past 30 years and use a do { <thing> } while(0) :)

I may or may not have missed one assert or messed up my regex substitutions...

Signed-off-by: lizzie lizzie@eden-emu.dev

- replace instances of ASSERT() with those where UNREACHABLE() should be used instead - debuggers exist for a reason, you can't just debug an issue in dynarmic with just printing fancy text... you need to inspect values and alldat - while yes the asserts are "useful"; there is this beautiful thing called backtraces - this will indirectly speedup the main decoder loop because of the added UNREACHABLE() - this also removes a bunch of macros that were redundant - the weird trick of [&](){}() is really funky, just do what everyone has done for the past 30 years and use a `do { <thing> } while(0)` :) I may or may not have missed one assert or messed up my regex substitutions... Signed-off-by: lizzie <lizzie@eden-emu.dev>
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Signed-off-by: lizzie <lizzie@eden-emu.dev>
better unreachables
Some checks failed
eden-license / license-header (pull_request) Failing after 30s
GitHub Actions [CI] Build failed
f376790ca1
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Lizzie changed title from [dynarmic] simplify assert macro usage (Only ASSERT/DEBUG_ASSERT are needed) to WIP: [dynarmic] simplify assert macro usage (Only ASSERT/DEBUG_ASSERT are needed) 2025-10-29 08:29:43 +01:00
Signed-off-by: lizzie <lizzie@eden-emu.dev>
oopsie
Some checks failed
eden-license / license-header (pull_request) Failing after 31s
GitHub Actions [CI] Build failed
383d7280cd
Signed-off-by: lizzie <lizzie@eden-emu.dev>
licenses :)
Some checks failed
eden-license / license-header (pull_request) Successful in 31s
GitHub Actions [CI] Build failed
6fea1f8847
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Lizzie changed title from WIP: [dynarmic] simplify assert macro usage (Only ASSERT/DEBUG_ASSERT are needed) to [dynarmic] simplify assert macro usage (Only ASSERT/DEBUG_ASSERT are needed) 2025-10-29 09:36:09 +01:00
Lizzie force-pushed assert-simplify-only-one-macro from 6fea1f8847
Some checks failed
eden-license / license-header (pull_request) Successful in 31s
GitHub Actions [CI] Build failed
to 2e2066979f
Some checks failed
eden-license / license-header (pull_request) Successful in 31s
GitHub Actions [CI] Build failed
2025-10-29 19:32:23 +01:00
Compare
fx
Some checks reported errors
eden-license / license-header (pull_request) Successful in 32s
GitHub Actions [CI] Build cancelled
561ea20520
Signed-off-by: lizzie <lizzie@eden-emu.dev>
OH MY GOD i love string concat
All checks were successful
eden-license / license-header (pull_request) Successful in 31s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Build succeeded – Release published
3de073818f
Signed-off-by: lizzie <lizzie@eden-emu.dev>
DraVee approved these changes 2025-10-30 16:48:44 +01:00
Shinmegumi approved these changes 2025-10-30 18:42:00 +01:00
Owner

delete zydis from here because conflicts

delete zydis from here because conflicts
All checks were successful
eden-license / license-header (pull_request) Successful in 31s
Required
Details
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Build succeeded – Release published
This pull request has changes conflicting with the target branch.
  • docs/Deps.md
  • src/dynarmic/src/dynarmic/backend/arm64/a32_interface.cpp
  • src/dynarmic/src/dynarmic/backend/arm64/a64_interface.cpp
  • src/dynarmic/src/dynarmic/backend/x64/emit_x64_memory.cpp.inc
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin assert-simplify-only-one-macro:assert-simplify-only-one-macro
git switch assert-simplify-only-one-macro
Sign in to join this conversation.
No description provided.