OSDN Git Service

target/s390x: Use a 16-bit immediate in VREP
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 7 Aug 2023 16:34:31 +0000 (18:34 +0200)
committerThomas Huth <thuth@redhat.com>
Wed, 23 Aug 2023 10:06:44 +0000 (12:06 +0200)
commit23e87d419f347b6b5f4da3bf70d222acc24cdb64
tree5f4c9f6c10a1e0e17278bb44bdc0ce0d5b2318d4
parent93af6e0a61f45fe0704e27f04e759924afa59e6e
target/s390x: Use a 16-bit immediate in VREP

Unlike most other instructions that contain an immediate element index,
VREP's one is 16-bit, and not 4-bit. The code uses only 8 bits, so
using, e.g., 0x101 does not lead to a specification exception.

Fix by checking all 16 bits.

Cc: qemu-stable@nongnu.org
Fixes: 28d08731b1d8 ("s390x/tcg: Implement VECTOR REPLICATE")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230807163459.849766-1-iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
target/s390x/tcg/translate_vx.c.inc