print_info: Use VFP and ASIMD decoders to get dynarmic name for instruction

This commit is contained in:
MerryMage 2020-05-17 22:40:20 +01:00
parent d0075f4ea6
commit d0d50c4824

View file

@ -18,6 +18,8 @@
#include "common/common_types.h"
#include "common/llvm_disassemble.h"
#include "frontend/A32/decoder/arm.h"
#include "frontend/A32/decoder/asimd.h"
#include "frontend/A32/decoder/vfp.h"
#include "frontend/A32/location_descriptor.h"
#include "frontend/A32/translate/impl/translate_arm.h"
#include "frontend/A32/translate/translate.h"
@ -34,7 +36,11 @@
using namespace Dynarmic;
const char* GetNameOfA32Instruction(u32 instruction) {
if (auto decoder = A32::DecodeArm<A32::ArmTranslatorVisitor>(instruction)) {
if (auto vfp_decoder = A32::DecodeVFP<A32::ArmTranslatorVisitor>(instruction)) {
return vfp_decoder->get().GetName();
} else if (auto asimd_decoder = A32::DecodeASIMD<A32::ArmTranslatorVisitor>(instruction)) {
return asimd_decoder->get().GetName();
} else if (auto decoder = A32::DecodeArm<A32::ArmTranslatorVisitor>(instruction)) {
return decoder->get().GetName();
}
return "<null>";