mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-30 05:06:12 +02:00
[dynarmic] remove decode matcher function handlers using std::function<>, use raw function pointers (#3920)
issues: - std::function<> is used, which is famously bad - storage of tehse in tables makes big fucking tables for no good reason - lets just store a normal pointer and stuff! :) this pr attempts to address that Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3920 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
This commit is contained in:
parent
a6423a88cc
commit
eec460ec2e
15 changed files with 187 additions and 276 deletions
|
|
@ -51,7 +51,7 @@ TEST_CASE("ASIMD Decoder: Ensure table order correctness", "[decode][a32][.]") {
|
|||
|
||||
const bool iserr = is_decode_error(*iter, instruction);
|
||||
const auto alternative = std::find_if(table.cbegin(), iter, [instruction](const auto& m) {
|
||||
return m.Matches(instruction);
|
||||
return (instruction & mask) == expect;
|
||||
});
|
||||
const bool altiserr = is_decode_error(*alternative, instruction);
|
||||
|
||||
|
|
|
|||
|
|
@ -43,12 +43,12 @@
|
|||
using namespace Dynarmic;
|
||||
|
||||
std::string_view GetNameOfA32Instruction(u32 instruction) {
|
||||
if (auto const vfp_decoder = A32::DecodeVFP<A32::TranslatorVisitor>(instruction))
|
||||
return *A32::GetNameVFP<A32::TranslatorVisitor>(instruction);
|
||||
else if (auto const asimd_decoder = A32::DecodeASIMD<A32::TranslatorVisitor>(instruction))
|
||||
return *A32::GetNameASIMD<A32::TranslatorVisitor>(instruction);
|
||||
else if (auto const decoder = A32::DecodeArm<A32::TranslatorVisitor>(instruction))
|
||||
return *A32::GetNameARM<A32::TranslatorVisitor>(instruction);
|
||||
if (auto const vfp_decoder = A32::GetNameVFP<A32::TranslatorVisitor>(instruction))
|
||||
return *vfp_decoder;
|
||||
else if (auto const asimd_decoder = A32::GetNameASIMD<A32::TranslatorVisitor>(instruction))
|
||||
return *asimd_decoder;
|
||||
else if (auto const decoder = A32::GetNameArm<A32::TranslatorVisitor>(instruction))
|
||||
return *decoder;
|
||||
return "<null>";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue