fuzz_with_unicorn: Randomize FPCR.FZ
This commit is contained in:
parent
b393e15ab6
commit
868ec44f30
1 changed files with 4 additions and 0 deletions
|
@ -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<FP::RoundingMode>(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<size_t>(FP::FPCR{fpcr}.RMode()));
|
||||
fmt::print("\n");
|
||||
|
||||
fmt::print("Final register listing:\n");
|
||||
|
|
Loading…
Reference in a new issue