From 330e6111fa968ba711190249a4df27a9d3b69c27 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Thu, 12 Jul 2018 13:52:29 +0100 Subject: [PATCH] fuzz_with_unicorn: Randomize FPCR.RMode --- tests/A64/fuzz_with_unicorn.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/A64/fuzz_with_unicorn.cpp b/tests/A64/fuzz_with_unicorn.cpp index 1d2a760a..a5b25302 100644 --- a/tests/A64/fuzz_with_unicorn.cpp +++ b/tests/A64/fuzz_with_unicorn.cpp @@ -146,7 +146,7 @@ static u32 GenFloatInst(u64 pc, bool is_last_inst) { } } -static void RunTestInstance(const std::array& regs, const std::array& vecs, const size_t instructions_offset, const std::vector& instructions, const u32 pstate) { +static void RunTestInstance(const std::array& regs, const std::array& vecs, const size_t instructions_offset, const std::vector& instructions, const u32 pstate, const u32 fpcr) { static TestEnv jit_env; static TestEnv uni_env; @@ -164,14 +164,14 @@ static void RunTestInstance(const std::array& regs, const std::array(0, 0xF) << 28; + u32 fpcr = RandInt(0, 0x3) << 22; // randomize RMode INFO("Instruction: 0x" << std::hex << instructions[0]); - RunTestInstance(regs, vecs, 100, instructions, pstate); + RunTestInstance(regs, vecs, 100, instructions, pstate, fpcr); } }