fuzz_with_unicorn: Dehardcode some constants

This commit is contained in:
Lioncash 2018-01-27 14:58:49 -05:00 committed by MerryMage
parent 52268298a8
commit cd69c6a17c

View file

@ -98,9 +98,9 @@ static void RunTestInstance(const std::array<u64, 31>& regs, const std::array<Ve
TEST_CASE("A64: Single random instruction", "[a64]") {
for (size_t iteration = 0; iteration < 100000; ++iteration) {
std::array<u64, 31> regs;
std::generate_n(regs.begin(), 31, []{ return RandInt<u64>(0, ~u64(0)); });
std::generate(regs.begin(), regs.end(), []{ return RandInt<u64>(0, ~u64(0)); });
std::array<Vector, 32> vecs;
std::generate_n(vecs.begin(), 32, []{ return RandomVector(); });
std::generate(vecs.begin(), vecs.end(), RandomVector);
std::vector<u32> instructions;
instructions.push_back(GenRandomInst(0, true));
u32 pstate = RandInt<u32>(0, 0xF) << 28;