tcg: Use memset for large vector byte replication
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 15 Dec 2020 17:47:59 +0000 (11:47 -0600)
committerSoonKyu Park <sk7.park@samsung.com>
Tue, 23 Nov 2021 04:45:25 +0000 (13:45 +0900)
commit2f36b5c349cb780a40a92d15a7f4b4c653b203c1
tree9457f7cff16de2a33b59e152999fb0ab2c94120b
parent26c9d9ef6130787dfce7ecababb7ee5a2920123a
tcg: Use memset for large vector byte replication

Git-commit: 6d3ef04893bdea3e7aa08be3cce5141902836a31

In f47db80cc07, we handled odd-sized tail clearing for
the case of hosts that have vector operations, but did
not handle the case of hosts that do not have vector ops.

This was ok until e2e7168a214b, which changed the encoding
of simd_desc such that the odd sizes are impossible.

Add memset as a tcg helper, and use that for all out-of-line
byte stores to vectors.  This includes, but is not limited to,
the tail clearing operation in question.

Cc: qemu-stable@nongnu.org
Buglink: https://bugs.launchpad.net/bugs/1907817
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Bruce Rogers <brogers@suse.com>
accel/tcg/tcg-runtime.h
include/exec/helper-proto.h
tcg/tcg-op-gvec.c