mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
target/arm: Convert VCMLA (vector) to decodetree
Convert the VCMLA (vector) insns in the 3same extension group to decodetree. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20200430181003.21682-5-peter.maydell@linaro.org
This commit is contained in:
parent
625e3dd44a
commit
afff8de0d4
@ -25,3 +25,14 @@
|
||||
# More specifically, this covers:
|
||||
# 2reg scalar ext: 0b1111_1110_xxxx_xxxx_xxxx_1x0x_xxxx_xxxx
|
||||
# 3same ext: 0b1111_110x_xxxx_xxxx_xxxx_1x0x_xxxx_xxxx
|
||||
|
||||
# VFP/Neon register fields; same as vfp.decode
|
||||
%vm_dp 5:1 0:4
|
||||
%vm_sp 0:4 5:1
|
||||
%vn_dp 7:1 16:4
|
||||
%vn_sp 16:4 7:1
|
||||
%vd_dp 22:1 12:4
|
||||
%vd_sp 12:4 22:1
|
||||
|
||||
VCMLA 1111 110 rot:2 . 1 size:1 .... .... 1000 . q:1 . 0 .... \
|
||||
vm=%vm_dp vn=%vn_dp vd=%vd_dp
|
||||
|
@ -30,3 +30,40 @@
|
||||
#include "decode-neon-dp.inc.c"
|
||||
#include "decode-neon-ls.inc.c"
|
||||
#include "decode-neon-shared.inc.c"
|
||||
|
||||
static bool trans_VCMLA(DisasContext *s, arg_VCMLA *a)
|
||||
{
|
||||
int opr_sz;
|
||||
TCGv_ptr fpst;
|
||||
gen_helper_gvec_3_ptr *fn_gvec_ptr;
|
||||
|
||||
if (!dc_isar_feature(aa32_vcma, s)
|
||||
|| (!a->size && !dc_isar_feature(aa32_fp16_arith, s))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* UNDEF accesses to D16-D31 if they don't exist. */
|
||||
if (!dc_isar_feature(aa32_simd_r32, s) &&
|
||||
((a->vd | a->vn | a->vm) & 0x10)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((a->vn | a->vm | a->vd) & a->q) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!vfp_access_check(s)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
opr_sz = (1 + a->q) * 8;
|
||||
fpst = get_fpstatus_ptr(1);
|
||||
fn_gvec_ptr = a->size ? gen_helper_gvec_fcmlas : gen_helper_gvec_fcmlah;
|
||||
tcg_gen_gvec_3_ptr(vfp_reg_offset(1, a->vd),
|
||||
vfp_reg_offset(1, a->vn),
|
||||
vfp_reg_offset(1, a->vm),
|
||||
fpst, opr_sz, opr_sz, a->rot,
|
||||
fn_gvec_ptr);
|
||||
tcg_temp_free_ptr(fpst);
|
||||
return true;
|
||||
}
|
||||
|
@ -7048,16 +7048,7 @@ static int disas_neon_insn_3same_ext(DisasContext *s, uint32_t insn)
|
||||
bool is_long = false, q = extract32(insn, 6, 1);
|
||||
bool ptr_is_env = false;
|
||||
|
||||
if ((insn & 0xfe200f10) == 0xfc200800) {
|
||||
/* VCMLA -- 1111 110R R.1S .... .... 1000 ...0 .... */
|
||||
int size = extract32(insn, 20, 1);
|
||||
data = extract32(insn, 23, 2); /* rot */
|
||||
if (!dc_isar_feature(aa32_vcma, s)
|
||||
|| (!size && !dc_isar_feature(aa32_fp16_arith, s))) {
|
||||
return 1;
|
||||
}
|
||||
fn_gvec_ptr = size ? gen_helper_gvec_fcmlas : gen_helper_gvec_fcmlah;
|
||||
} else if ((insn & 0xfea00f10) == 0xfc800800) {
|
||||
if ((insn & 0xfea00f10) == 0xfc800800) {
|
||||
/* VCADD -- 1111 110R 1.0S .... .... 1000 ...0 .... */
|
||||
int size = extract32(insn, 20, 1);
|
||||
data = extract32(insn, 24, 1); /* rot */
|
||||
|
Loading…
Reference in New Issue
Block a user