unicorn/qemu/tcg/i386
Richard Henderson b358f771f6 tcg/i386: Bound shift count expanding sari_vec
A given RISU testcase for SVE can produce

tcg-op-vec.c:511: do_shifti: Assertion `i >= 0 && i < (8 << vece)' failed.

because expand_vec_sari gave a shift count of 32 to a MO_32
vector shift.

In 44f1441dbe1, we changed from direct expansion of vector opcodes
to re-use of the tcg expanders. So while the comment correctly notes
that the hw will handle such a shift count, we now have to take our
own sanity checks into account. Which is easy in this particular case.

Fixes: 44f1441dbe1

Backports commit 312b426fea4d6dd322d7472c80010a8ba7a166d2 from qemu
2020-04-30 06:26:42 -04:00
..
tcg-target.h tcg/i386: Support vector comparison select value 2019-05-24 18:33:16 -04:00
tcg-target.inc.c tcg/i386: Bound shift count expanding sari_vec 2020-04-30 06:26:42 -04:00
tcg-target.opc.h tcg/i386: Add vector operations 2018-03-07 08:07:40 -05:00