unicorn/qemu
Peter Maydell edf81eb214
target/arm: Convert VFP VMLA to decodetree
Convert the VFP VMLA instruction to decodetree.

This is the first of the VFP 3-operand data processing instructions,
so we include in this patch the code which loops over the elements
for an old-style VFP vector operation. The existing code to do this
looping uses the deprecated cpu_F0s/F0d/F1s/F1d TCG globals; since
we are going to be converting instructions one at a time anyway
we can take the opportunity to make the new loop use TCG temporaries,
which means we can do that conversion one operation at a time
rather than needing to do it all in one go.

We include an UNDEF check which was missing in the old code:
short-vector operations (with stride or length non-zero) were
deprecated in v7A and must UNDEF in v8A, so if the MVFR0 FPShVec
field does not indicate that support for short vectors is present
we UNDEF the operations that would use them. (This is a change
of behaviour for Cortex-A7, Cortex-A15 and the v8 CPUs, which
previously were all incorrectly allowing short-vector operations.)

Note that the conversion fixes a bug in the old code for the
case of VFP short-vector "mixed scalar/vector operations". These
happen where the destination register is in a vector bank but
but the second operand is in a scalar bank. For example
vmla.f64 d10, d1, d16 with length 2 stride 2
is equivalent to the pair of scalar operations
vmla.f64 d10, d1, d16
vmla.f64 d8, d3, d16
where the destination and first input register cycle through
their vector but the second input is scalar (d16). In the
old decoder the gen_vfp_F1_mul() operation uses cpu_F1{s,d}
as a temporary output for the multiply, which trashes the
second input operand. For the fully-scalar case (where we
never do a second iteration) and the fully-vector case
(where the loop loads the new second input operand) this
doesn't matter, but for the mixed scalar/vector case we
will end up using the wrong value for later loop iterations.
In the new code we use TCG temporaries and so avoid the bug.
This bug is present for all the multiply-accumulate insns
that operate on short vectors: VMLA, VMLS, VNMLA, VNMLS.

Note 2: the expression used to calculate the next register
number in the vector bank is not in fact correct; we leave
this behaviour unchanged from the old decoder and will
fix this bug later in the series.

Backports commit 266bd25c485597c94209bfdb3891c1d0c573c164 from qemu
2019-06-13 17:59:16 -04:00
..
accel tcg: Fix typos in helper_gvec_sar{8,32,64}v 2019-06-13 16:09:16 -04:00
crypto
default-configs target/riscv: Initial introduction of the RISC-V target 2019-03-08 21:46:10 -05:00
docs
fpu
hw target/i386: Use env_cpu, env_archcpu 2019-06-12 11:46:35 -04:00
include cpu: Move icount_decr to CPUNegativeOffsetState 2019-06-13 15:34:28 -04:00
qapi
qobject
qom cpu: Move icount_decr to CPUNegativeOffsetState 2019-06-13 15:34:28 -04:00
scripts decodetree: Fix comparison of Field 2019-06-13 16:17:56 -04:00
target target/arm: Convert VFP VMLA to decodetree 2019-06-13 17:59:16 -04:00
tcg cpu: Move icount_decr to CPUNegativeOffsetState 2019-06-13 15:34:28 -04:00
util
aarch64.h tcg: Add support for vector compare select 2019-05-24 18:21:13 -04:00
aarch64eb.h tcg: Add support for vector compare select 2019-05-24 18:21:13 -04:00
accel.c
arm.h target/arm: Use tcg_gen_gvec_bitsel 2019-06-13 16:12:56 -04:00
armeb.h target/arm: Use tcg_gen_gvec_bitsel 2019-06-13 16:12:56 -04:00
CODING_STYLE
configure
COPYING
COPYING.LIB import 2015-08-21 15:04:50 +08:00
cpus.c Include qapi/error.h exactly where needed 2018-03-07 12:26:38 -05:00
exec.c exec.c: refactor function flatview_add_to_dispatch() 2019-03-11 17:00:46 -04:00
gen_all_header.sh
glib_compat.c
HACKING
header_gen.py target/arm: Use tcg_gen_gvec_bitsel 2019-06-13 16:12:56 -04:00
ioport.c
LICENSE
m68k.h tcg: Add support for vector compare select 2019-05-24 18:21:13 -04:00
Makefile config-all-devices.mak: rebuild on reconfigure 2019-03-29 19:31:32 -04:00
Makefile.objs
Makefile.target
memory_ldst.inc.c exec: Fix MAP_RAM for cached access 2018-07-03 01:11:12 -04:00
memory_mapping.c
memory.c
mips64.h target/mips: Refactor and fix INSERT.<B|H|W|D> instructions 2019-05-28 19:42:28 -04:00
mips64el.h target/mips: Refactor and fix INSERT.<B|H|W|D> instructions 2019-05-28 19:42:28 -04:00
mips.h target/mips: Refactor and fix INSERT.<B|H|W|D> instructions 2019-05-28 19:42:28 -04:00
mipsel.h target/mips: Refactor and fix INSERT.<B|H|W|D> instructions 2019-05-28 19:42:28 -04:00
powerpc.h tcg: Add support for vector compare select 2019-05-24 18:21:13 -04:00
qemu-timer.c
riscv32.h tcg: Add support for vector compare select 2019-05-24 18:21:13 -04:00
riscv64.h tcg: Add support for vector compare select 2019-05-24 18:21:13 -04:00
rules.mak
sparc64.h tcg: Add support for vector compare select 2019-05-24 18:21:13 -04:00
sparc.h tcg: Add support for vector compare select 2019-05-24 18:21:13 -04:00
unicorn_common.h
VERSION
vl.c
vl.h
x86_64.h tcg: Add support for vector compare select 2019-05-24 18:21:13 -04:00