[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 23/69] target/arm: Fix decode of fp16 vector fabs, fneg, fsqrt
From: |
Richard Henderson |
Subject: |
[PATCH v3 23/69] target/arm: Fix decode of fp16 vector fabs, fneg, fsqrt |
Date: |
Wed, 11 Dec 2024 10:29:50 -0600 |
These opcodes are only supported as vector operations,
not as advsimd scalar. Set only_in_vector, and remove
the unreachable implementation of scalar fneg.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/tcg/translate-a64.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c
index a99f3d0d13..3c1784593a 100644
--- a/target/arm/tcg/translate-a64.c
+++ b/target/arm/tcg/translate-a64.c
@@ -10816,10 +10816,13 @@ static void disas_simd_two_reg_misc_fp16(DisasContext
*s, uint32_t insn)
break;
case 0x2f: /* FABS */
case 0x6f: /* FNEG */
+ only_in_vector = true;
need_fpst = false;
break;
case 0x7d: /* FRSQRTE */
+ break;
case 0x7f: /* FSQRT (vector) */
+ only_in_vector = true;
break;
default:
unallocated_encoding(s);
@@ -10877,9 +10880,6 @@ static void disas_simd_two_reg_misc_fp16(DisasContext
*s, uint32_t insn)
case 0x7b: /* FCVTZU */
gen_helper_advsimd_f16touinth(tcg_res, tcg_op, tcg_fpstatus);
break;
- case 0x6f: /* FNEG */
- tcg_gen_xori_i32(tcg_res, tcg_op, 0x8000);
- break;
case 0x7d: /* FRSQRTE */
gen_helper_rsqrte_f16(tcg_res, tcg_op, tcg_fpstatus);
break;
--
2.43.0
- [PATCH v3 30/69] target/arm: Convert FRINT{32, 64}[ZX] (scalar) to decodetree, (continued)
- [PATCH v3 30/69] target/arm: Convert FRINT{32, 64}[ZX] (scalar) to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 33/69] target/arm: Convert FJCVTZS to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 38/69] target/arm: Convert CLS, CLZ (vector) to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 39/69] target/arm: Introduce gen_gvec_cnt, gen_gvec_rbit, Richard Henderson, 2024/12/11
- [PATCH v3 21/69] target/arm: Introduce fp_access_check_vector_hsd, Richard Henderson, 2024/12/11
- [PATCH v3 26/69] target/arm: Remove helper_sqrt_f16, Richard Henderson, 2024/12/11
- [PATCH v3 25/69] target/arm: Pass fpstatus to vfp_sqrt*, Richard Henderson, 2024/12/11
- [PATCH v3 31/69] target/arm: Convert FCVT (scalar) to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 37/69] target/arm: Introduce gen_gvec_cls, gen_gvec_clz, Richard Henderson, 2024/12/11
- [PATCH v3 32/69] target/arm: Convert handle_fpfpcvt to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 23/69] target/arm: Fix decode of fp16 vector fabs, fneg, fsqrt,
Richard Henderson <=
- [PATCH v3 27/69] target/arm: Convert FSQRT (scalar) to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 29/69] target/arm: Convert BFCVT to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 28/69] target/arm: Convert FRINT[NPMSAXI] (scalar) to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 35/69] target/arm: Convert SQABS, SQNEG to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 34/69] target/arm: Convert handle_fmov to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 36/69] target/arm: Convert ABS, NEG to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 41/69] target/arm: Convert CMGT, CMGE, GMLT, GMLE, CMEQ (zero) to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 43/69] target/arm: Convert handle_rev to decodetree, Richard Henderson, 2024/12/11
- [PATCH v3 42/69] target/arm: Introduce gen_gvec_rev{16,32,64}, Richard Henderson, 2024/12/11