Skip to content

Commit

Permalink
hashtest: filter out instructions that can write to multiple register…
Browse files Browse the repository at this point in the history
… banks

PiperOrigin-RevId: 675262225
  • Loading branch information
ncbray authored and copybara-github committed Sep 16, 2024
1 parent a274d8b commit 3670366
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions fuzzer/hashtest/candidate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,25 @@ bool IsCandidate(const xed_inst_t* instruction,
}
}

// Instructions like ENCODEKEY128 can write to multiple register banks.
// Currently we do not support these kind of instructions.
int num_output_banks = 0;
if (candidate.reg_written.gp) {
num_output_banks++;
}
if (candidate.reg_written.vec) {
num_output_banks++;
}
if (candidate.reg_written.mask) {
num_output_banks++;
}
if (candidate.reg_written.mmx) {
num_output_banks++;
}
if (num_output_banks > 1) {
return false;
}

return true;
}

Expand Down

0 comments on commit 3670366

Please sign in to comment.