diff options
| author | lizzie <lizzie@eden-emu.dev> | 2025-10-31 17:22:06 +0100 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-10-31 17:22:06 +0100 |
| commit | f9773fa908536c67aacd4b56f7837548ca869c08 (patch) | |
| tree | e1f4440aff964445e73cc17f7a06873673f0102c /src/dynarmic/tests/test_generator.cpp | |
| parent | 2dc6d773eefcd0575cf8df3ea20bfba66f3a47b5 (diff) | |
[dynarmic] simplify assert macro usage (Only ASSERT/DEBUG_ASSERT are needed) (#2890)
- 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>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2890
Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src/dynarmic/tests/test_generator.cpp')
| -rw-r--r-- | src/dynarmic/tests/test_generator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dynarmic/tests/test_generator.cpp b/src/dynarmic/tests/test_generator.cpp index bdf2a0593d..7330e143b6 100644 --- a/src/dynarmic/tests/test_generator.cpp +++ b/src/dynarmic/tests/test_generator.cpp @@ -306,7 +306,7 @@ std::vector<u16> GenRandomThumbInst(u32 pc, bool is_last_inst, A32::ITState it_s } else if (bitstring.substr(0, 8) == "11110100") { bitstring.replace(0, 8, "11111001"); } else { - ASSERT_FALSE("Unhandled ASIMD instruction: {} {}", fn, bs); + UNREACHABLE(); // "Unhandled ASIMD instruction: {} {}", fn, bs); } if (std::find(do_not_test.begin(), do_not_test.end(), fn) != do_not_test.end()) { invalid.emplace_back(InstructionGenerator{bitstring.c_str()}); |
