mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
target/arm: Add read/write_neon_element32
Model these off the aa64 read/write_vec_element functions. Use it within translate-neon.c.inc. The new functions do not allocate or free temps, so this rearranges the calling code a bit. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20201030022618.785675-6-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
d8719785fd
commit
a712266f5d
2 changed files with 183 additions and 99 deletions
|
@ -1165,6 +1165,32 @@ static inline void neon_store_reg32(TCGv_i32 var, int reg)
|
|||
tcg_gen_st_i32(var, cpu_env, vfp_reg_offset(false, reg));
|
||||
}
|
||||
|
||||
static void read_neon_element32(TCGv_i32 dest, int reg, int ele, MemOp size)
|
||||
{
|
||||
long off = neon_element_offset(reg, ele, size);
|
||||
|
||||
switch (size) {
|
||||
case MO_32:
|
||||
tcg_gen_ld_i32(dest, cpu_env, off);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
}
|
||||
}
|
||||
|
||||
static void write_neon_element32(TCGv_i32 src, int reg, int ele, MemOp size)
|
||||
{
|
||||
long off = neon_element_offset(reg, ele, size);
|
||||
|
||||
switch (size) {
|
||||
case MO_32:
|
||||
tcg_gen_st_i32(src, cpu_env, off);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
}
|
||||
}
|
||||
|
||||
static TCGv_ptr vfp_reg_ptr(bool dp, int reg)
|
||||
{
|
||||
TCGv_ptr ret = tcg_temp_new_ptr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue