From 64c17a2489d92e8df7b93a81916298c00965988c Mon Sep 17 00:00:00 2001 From: MerryMage Date: Tue, 2 Aug 2016 13:48:06 +0100 Subject: [PATCH] tests/FuzzArm: Print out IR upon failure --- tests/arm/fuzz_arm.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/arm/fuzz_arm.cpp b/tests/arm/fuzz_arm.cpp index fc5ca0d1..88823bde 100644 --- a/tests/arm/fuzz_arm.cpp +++ b/tests/arm/fuzz_arm.cpp @@ -228,6 +228,12 @@ void FuzzJitArm(const size_t instruction_count, const size_t instructions_to_exe } printf("CPSR: %08x %08x %s\n", interp.Cpsr, jit.Cpsr(), interp.Cpsr != jit.Cpsr() ? "*" : ""); + Dynarmic::IR::Block ir_block = Dynarmic::Arm::Translate({0, false, false, 0}, &MemoryRead32); + Dynarmic::Optimization::GetSetElimination(ir_block); + Dynarmic::Optimization::DeadCodeElimination(ir_block); + Dynarmic::Optimization::VerificationPass(ir_block); + printf("\n\nIR:\n%s", Dynarmic::IR::DumpBlock(ir_block).c_str()); + #ifdef _MSC_VER __debugbreak(); #endif