mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-04-17 22:41:56 +00:00
tcg: Do not recreate INDEX_op_neg_vec unless supported
Use tcg_can_emit_vec_op instead of just TCG_TARGET_HAS_neg_vec, so that we check the type and vece for the actual operation. Backports commit ac383dde33405106469d04a78de1d76f1a730cb1 from qemu
This commit is contained in:
parent
f3b4a64d27
commit
9a9b681b38
|
@ -733,9 +733,13 @@ void tcg_optimize(TCGContext *s)
|
|||
} else if (opc == INDEX_op_sub_i64) {
|
||||
neg_op = INDEX_op_neg_i64;
|
||||
have_neg = TCG_TARGET_HAS_neg_i64;
|
||||
} else {
|
||||
} else if (TCG_TARGET_HAS_neg_vec) {
|
||||
TCGType type = TCGOP_VECL(op) + TCG_TYPE_V64;
|
||||
unsigned vece = TCGOP_VECE(op);
|
||||
neg_op = INDEX_op_neg_vec;
|
||||
have_neg = TCG_TARGET_HAS_neg_vec;
|
||||
have_neg = tcg_can_emit_vec_op(neg_op, type, vece) > 0;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
if (!have_neg) {
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue