target/arm: Demultiplex AESE and AESMC

Split these helpers so that we are not passing 'decrypt'
within the simd descriptor.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2023-06-01 22:42:43 -07:00
parent 44a0c4a8cc
commit 0f23908c5c
6 changed files with 41 additions and 27 deletions

View file

@ -13210,7 +13210,6 @@ static void disas_crypto_aes(DisasContext *s, uint32_t insn)
int opcode = extract32(insn, 12, 5);
int rn = extract32(insn, 5, 5);
int rd = extract32(insn, 0, 5);
int decrypt;
gen_helper_gvec_2 *genfn2 = NULL;
gen_helper_gvec_3 *genfn3 = NULL;
@ -13221,20 +13220,16 @@ static void disas_crypto_aes(DisasContext *s, uint32_t insn)
switch (opcode) {
case 0x4: /* AESE */
decrypt = 0;
genfn3 = gen_helper_crypto_aese;
break;
case 0x6: /* AESMC */
decrypt = 0;
genfn2 = gen_helper_crypto_aesmc;
break;
case 0x5: /* AESD */
decrypt = 1;
genfn3 = gen_helper_crypto_aese;
genfn3 = gen_helper_crypto_aesd;
break;
case 0x7: /* AESIMC */
decrypt = 1;
genfn2 = gen_helper_crypto_aesmc;
genfn2 = gen_helper_crypto_aesimc;
break;
default:
unallocated_encoding(s);
@ -13245,9 +13240,9 @@ static void disas_crypto_aes(DisasContext *s, uint32_t insn)
return;
}
if (genfn2) {
gen_gvec_op2_ool(s, true, rd, rn, decrypt, genfn2);
gen_gvec_op2_ool(s, true, rd, rn, 0, genfn2);
} else {
gen_gvec_op3_ool(s, true, rd, rd, rn, decrypt, genfn3);
gen_gvec_op3_ool(s, true, rd, rd, rn, 0, genfn3);
}
}