summaryrefslogtreecommitdiffstats
path: root/tests/tcg
diff options
context:
space:
mode:
authorMichael Lambert2022-02-10 03:15:45 +0100
committerTaylor Simpson2022-03-12 18:14:22 +0100
commit58ff2981667262f77d57219fc9cef2a43a740159 (patch)
treefbe8008234bcedcfe8405d9b57137a12d8ae9e7a /tests/tcg
parentMerge remote-tracking branch 'remotes/mcayland/tags/q800-updates-for-7.0-2022... (diff)
downloadqemu-58ff2981667262f77d57219fc9cef2a43a740159.tar.gz
qemu-58ff2981667262f77d57219fc9cef2a43a740159.tar.xz
qemu-58ff2981667262f77d57219fc9cef2a43a740159.zip
Hexagon (target/hexagon) fix bug in circular addressing
Versions V3 and earlier should treat the "K_const" and "length" values as unsigned. Modified circ_test_v3() in tests/tcg/hexagon/circ.c to reproduce the bug Signed-off-by: Michael Lambert <mlambert@quicinc.com> Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Message-Id: <20220210021556.9217-2-tsimpson@quicinc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests/tcg')
-rw-r--r--tests/tcg/hexagon/circ.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/tcg/hexagon/circ.c b/tests/tcg/hexagon/circ.c
index 67a1aa3054..354416eb6d 100644
--- a/tests/tcg/hexagon/circ.c
+++ b/tests/tcg/hexagon/circ.c
@@ -1,5 +1,5 @@
/*
- * Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
+ * Copyright(c) 2019-2022 Qualcomm Innovation Center, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -415,7 +415,8 @@ static void circ_test_v3(void)
{
int *p = wbuf;
int size = 15;
- int K = 4; /* 64 bytes */
+ /* set high bit in K to test unsigned extract in fcirc */
+ int K = 8; /* 1024 bytes */
int element;
int i;