diff options
author | Peter Maydell | 2020-11-19 22:55:53 +0100 |
---|---|---|
committer | Peter Maydell | 2020-12-10 12:44:55 +0100 |
commit | 83ff3d6add965c9752324de11eac5687121ea826 (patch) | |
tree | 9b2a432d974acc6bb8ffddc3f0329c8111b023f8 /target/arm/translate.c | |
parent | target/arm: Don't clobber ID_PFR1.Security on M-profile cores (diff) | |
download | qemu-83ff3d6add965c9752324de11eac5687121ea826.tar.gz qemu-83ff3d6add965c9752324de11eac5687121ea826.tar.xz qemu-83ff3d6add965c9752324de11eac5687121ea826.zip |
target/arm: Implement VSCCLRM insn
Implement the v8.1M VSCCLRM insn, which zeros floating point
registers if there is an active floating point context.
This requires support in write_neon_element32() for the MO_32
element size, so add it.
Because we want to use arm_gen_condlabel(), we need to move
the definition of that function up in translate.c so it is
before the #include of translate-vfp.c.inc.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20201119215617.29887-5-peter.maydell@linaro.org
Diffstat (limited to 'target/arm/translate.c')
-rw-r--r-- | target/arm/translate.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/target/arm/translate.c b/target/arm/translate.c index 6d04ca3a8a..9f2b6018a2 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -100,6 +100,15 @@ void arm_translate_init(void) a64_translate_init(); } +/* Generate a label used for skipping this instruction */ +static void arm_gen_condlabel(DisasContext *s) +{ + if (!s->condjmp) { + s->condlabel = gen_new_label(); + s->condjmp = 1; + } +} + /* Flags for the disas_set_da_iss info argument: * lower bits hold the Rt register number, higher bits are flags. */ @@ -1221,6 +1230,9 @@ static void write_neon_element64(TCGv_i64 src, int reg, int ele, MemOp memop) long off = neon_element_offset(reg, ele, memop); switch (memop) { + case MO_32: + tcg_gen_st32_i64(src, cpu_env, off); + break; case MO_64: tcg_gen_st_i64(src, cpu_env, off); break; @@ -5156,15 +5168,6 @@ static void gen_srs(DisasContext *s, s->base.is_jmp = DISAS_UPDATE_EXIT; } -/* Generate a label used for skipping this instruction */ -static void arm_gen_condlabel(DisasContext *s) -{ - if (!s->condjmp) { - s->condlabel = gen_new_label(); - s->condjmp = 1; - } -} - /* Skip this instruction if the ARM condition is false */ static void arm_skip_unless(DisasContext *s, uint32_t cond) { |