mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
target/arm: Implement SVE2 crypto destructive binary operations
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210525010358.152808-70-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
b2bcd1be4b
commit
3cc7a88e0d
3 changed files with 50 additions and 0 deletions
|
@ -8159,3 +8159,41 @@ static bool trans_AESMC(DisasContext *s, arg_AESMC *a)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool do_aese(DisasContext *s, arg_rrr_esz *a, bool decrypt)
|
||||
{
|
||||
if (!dc_isar_feature(aa64_sve2_aes, s)) {
|
||||
return false;
|
||||
}
|
||||
if (sve_access_check(s)) {
|
||||
gen_gvec_ool_zzz(s, gen_helper_crypto_aese,
|
||||
a->rd, a->rn, a->rm, decrypt);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool trans_AESE(DisasContext *s, arg_rrr_esz *a)
|
||||
{
|
||||
return do_aese(s, a, false);
|
||||
}
|
||||
|
||||
static bool trans_AESD(DisasContext *s, arg_rrr_esz *a)
|
||||
{
|
||||
return do_aese(s, a, true);
|
||||
}
|
||||
|
||||
static bool do_sm4(DisasContext *s, arg_rrr_esz *a, gen_helper_gvec_3 *fn)
|
||||
{
|
||||
if (!dc_isar_feature(aa64_sve2_sm4, s)) {
|
||||
return false;
|
||||
}
|
||||
if (sve_access_check(s)) {
|
||||
gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, 0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool trans_SM4E(DisasContext *s, arg_rrr_esz *a)
|
||||
{
|
||||
return do_sm4(s, a, gen_helper_crypto_sm4e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue