diff options
author | Peter Maydell | 2019-06-11 17:39:52 +0200 |
---|---|---|
committer | Peter Maydell | 2019-06-13 16:14:06 +0200 |
commit | 92073e947487e2109f3dfebfeaa48d6323cbd981 (patch) | |
tree | be09f057b515566aae35d6b15298ac53a3b5f99b /target/arm/translate-vfp.inc.c | |
parent | target/arm: Convert integer-to-float insns to decodetree (diff) | |
download | qemu-92073e947487e2109f3dfebfeaa48d6323cbd981.tar.gz qemu-92073e947487e2109f3dfebfeaa48d6323cbd981.tar.xz qemu-92073e947487e2109f3dfebfeaa48d6323cbd981.zip |
target/arm: Convert VJCVT to decodetree
Convert the VJCVT instruction to decodetree.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/arm/translate-vfp.inc.c')
-rw-r--r-- | target/arm/translate-vfp.inc.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c index cc3f61d9c4..161f0fdd88 100644 --- a/target/arm/translate-vfp.inc.c +++ b/target/arm/translate-vfp.inc.c @@ -2426,3 +2426,31 @@ static bool trans_VCVT_int_dp(DisasContext *s, arg_VCVT_int_dp *a) tcg_temp_free_ptr(fpst); return true; } + +static bool trans_VJCVT(DisasContext *s, arg_VJCVT *a) +{ + TCGv_i32 vd; + TCGv_i64 vm; + + if (!dc_isar_feature(aa32_jscvt, s)) { + return false; + } + + /* UNDEF accesses to D16-D31 if they don't exist. */ + if (!dc_isar_feature(aa32_fp_d32, s) && (a->vm & 0x10)) { + return false; + } + + if (!vfp_access_check(s)) { + return true; + } + + vm = tcg_temp_new_i64(); + vd = tcg_temp_new_i32(); + neon_load_reg64(vm, a->vm); + gen_helper_vjcvt(vd, vm, cpu_env); + neon_store_reg32(vd, a->vd); + tcg_temp_free_i64(vm); + tcg_temp_free_i32(vd); + return true; +} |