summaryrefslogtreecommitdiffstats
path: root/target/arm/translate.c
diff options
context:
space:
mode:
authorPeter Maydell2021-06-14 17:09:18 +0200
committerPeter Maydell2021-06-16 15:33:52 +0200
commit40a36f003c0375bb9d347eeb3f60bac7bbeb82c3 (patch)
treeab2d064fae0431a4ad9284e18c9fbda2c6fe0895 /target/arm/translate.c
parenttarget/arm: Implement MVE WLSTP insn (diff)
downloadqemu-40a36f003c0375bb9d347eeb3f60bac7bbeb82c3.tar.gz
qemu-40a36f003c0375bb9d347eeb3f60bac7bbeb82c3.tar.xz
qemu-40a36f003c0375bb9d347eeb3f60bac7bbeb82c3.zip
target/arm: Implement MVE DLSTP
Implement the MVE DLSTP insn; this is like the existing DLS insn, except that it must do an FPU access check and it sets LTPSIZE to the value specified in the insn. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210614151007.4545-9-peter.maydell@linaro.org
Diffstat (limited to 'target/arm/translate.c')
-rw-r--r--target/arm/translate.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 78878e9b19..1ad0e61fac 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -8114,13 +8114,32 @@ static bool trans_DLS(DisasContext *s, arg_DLS *a)
return false;
}
if (a->rn == 13 || a->rn == 15) {
- /* CONSTRAINED UNPREDICTABLE: we choose to UNDEF */
+ /*
+ * For DLSTP rn == 15 is a related encoding (LCTP); the
+ * other cases caught by this condition are all
+ * CONSTRAINED UNPREDICTABLE: we choose to UNDEF
+ */
return false;
}
- /* Not a while loop, no tail predication: just set LR to the count */
+ if (a->size != 4) {
+ /* DLSTP */
+ if (!dc_isar_feature(aa32_mve, s)) {
+ return false;
+ }
+ if (!vfp_access_check(s)) {
+ return true;
+ }
+ }
+
+ /* Not a while loop: set LR to the count, and set LTPSIZE for DLSTP */
tmp = load_reg(s, a->rn);
store_reg(s, 14, tmp);
+ if (a->size != 4) {
+ /* DLSTP: set FPSCR.LTPSIZE */
+ tmp = tcg_const_i32(a->size);
+ store_cpu_field(tmp, v7m.ltpsize);
+ }
return true;
}