From 868ec44f300a48d6799a5f0f0e94fc1ae03d47fe Mon Sep 17 00:00:00 2001 From: MerryMage Date: Tue, 31 Jul 2018 15:35:30 +0100 Subject: [PATCH] fuzz_with_unicorn: Randomize FPCR.FZ --- tests/A64/fuzz_with_unicorn.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/A64/fuzz_with_unicorn.cpp b/tests/A64/fuzz_with_unicorn.cpp index 3de70c22..fe2da527 100644 --- a/tests/A64/fuzz_with_unicorn.cpp +++ b/tests/A64/fuzz_with_unicorn.cpp @@ -42,6 +42,7 @@ static Vector RandomVector() { static u32 RandomFpcr() { FP::FPCR fpcr; fpcr.DN(RandInt(0, 1) == 0); + fpcr.FZ(RandInt(0, 1) == 0); fpcr.RMode(static_cast(RandInt(0, 3))); return fpcr.Value(); } @@ -215,6 +216,9 @@ static void RunTestInstance(const Unicorn::RegisterArray& regs, const Unicorn::V fmt::print("pc : {:016x}\n", instructions_offset * 4); fmt::print("p : {:08x}\n", pstate); fmt::print("fpcr {:08x}\n", fpcr); + fmt::print("fpcr.DN {}\n", FP::FPCR{fpcr}.DN()); + fmt::print("fpcr.FZ {}\n", FP::FPCR{fpcr}.FZ()); + fmt::print("fpcr.RMode {}\n", static_cast(FP::FPCR{fpcr}.RMode())); fmt::print("\n"); fmt::print("Final register listing:\n");