Skip to content

Fix a bug in tcg_gen_not_vec operation. #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions tcg/tcg-op-vec.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,11 +590,17 @@ void tcg_gen_eqv_vec(unsigned vece, TCGv_vec r, TCGv_vec a, TCGv_vec b)

void tcg_gen_not_vec(unsigned vece, TCGv_vec r, TCGv_vec a)
{
if (TCG_TARGET_HAS_not_vec) {
vec_gen_op2(INDEX_op_not_vec, 0, r, a);
} else {
/* TODO (SymQEMU):
* This instruction is not instrumented yet.
* For now, we make sure that alternative instructions below, which are instrumented, are always used.
* Directly instrumenting this instruction would improve performance of SymQEMU.
*/

// if (TCG_TARGET_HAS_not_vec) {
// vec_gen_op2(INDEX_op_not_vec, 0, r, a);
// } else {
tcg_gen_xor_vec(0, r, a, tcg_constant_vec_matching(r, 0, -1));
}
// }
}

void tcg_gen_neg_vec(unsigned vece, TCGv_vec r, TCGv_vec a)
Expand Down