aboutsummaryrefslogtreecommitdiff
path: root/target/s390x
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2023-07-24 10:16:00 +0200
committerThomas Huth <thuth@redhat.com>2023-07-24 18:44:47 +0200
commitff537b0370ab5918052b8d8a798e803c47272406 (patch)
treedb167f47c7a90d124456e08715590ba8c5732626 /target/s390x
parent9c028c057adce49304c6e4a51f6b426bd4f8f6b8 (diff)
downloadqemu-ff537b0370ab5918052b8d8a798e803c47272406.zip
qemu-ff537b0370ab5918052b8d8a798e803c47272406.tar.gz
qemu-ff537b0370ab5918052b8d8a798e803c47272406.tar.bz2
target/s390x: Fix assertion failure in VFMIN/VFMAX with type 13
Type 13 is reserved, so using it should result in specification exception. Due to an off-by-1 error the code triggers an assertion at a later point in time instead. Cc: qemu-stable@nongnu.org Fixes: da4807527f3b ("s390x/tcg: Implement VECTOR FP (MAXIMUM|MINIMUM)") Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20230724082032.66864-8-iii@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target/s390x')
-rw-r--r--target/s390x/tcg/translate_vx.c.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/s390x/tcg/translate_vx.c.inc b/target/s390x/tcg/translate_vx.c.inc
index 43dfbfd..f8df121 100644
--- a/target/s390x/tcg/translate_vx.c.inc
+++ b/target/s390x/tcg/translate_vx.c.inc
@@ -3047,7 +3047,7 @@ static DisasJumpType op_vfmax(DisasContext *s, DisasOps *o)
const uint8_t m5 = get_field(s, m5);
gen_helper_gvec_3_ptr *fn;
- if (m6 == 5 || m6 == 6 || m6 == 7 || m6 > 13) {
+ if (m6 == 5 || m6 == 6 || m6 == 7 || m6 >= 13) {
gen_program_exception(s, PGM_SPECIFICATION);
return DISAS_NORETURN;
}