diff options
author | Mukilan Thiyagarajan <quic_mthiyaga@quicinc.com> | 2022-12-29 13:48:36 +0530 |
---|---|---|
committer | Taylor Simpson <tsimpson@quicinc.com> | 2023-01-05 09:19:02 -0800 |
commit | eaee3b6faf9de49b0cf327df570e1990a3d810cb (patch) | |
tree | af9663643621a7b5cbfc206e8dd71fad7c75e830 /tests/tcg | |
parent | 72895676e73c06a5c331777015b3780efda4edd0 (diff) | |
download | qemu-eaee3b6faf9de49b0cf327df570e1990a3d810cb.zip qemu-eaee3b6faf9de49b0cf327df570e1990a3d810cb.tar.gz qemu-eaee3b6faf9de49b0cf327df570e1990a3d810cb.tar.bz2 |
tests/tcg/hexagon: fix underspecifed asm constraints
There are two test cases where the inline asm doesn't
have the correct constraints causing them to fail.
In misc.c, the 'result' output needs the early clobber
modifier since the rest of the inputs are read after
assignment to the output register.
In mem_noshuf.c, the register r7 is written to but
not specified in the clobber list.
Signed-off-by: Mukilan Thiyagarajan <quic_mthiyaga@quicinc.com>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Message-Id: <20221229081836.12130-1-quic_mthiyaga@quicinc.com>
Diffstat (limited to 'tests/tcg')
-rw-r--r-- | tests/tcg/hexagon/mem_noshuf.c | 2 | ||||
-rw-r--r-- | tests/tcg/hexagon/misc.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/tcg/hexagon/mem_noshuf.c b/tests/tcg/hexagon/mem_noshuf.c index 0f4064e..210b2f1 100644 --- a/tests/tcg/hexagon/mem_noshuf.c +++ b/tests/tcg/hexagon/mem_noshuf.c @@ -144,7 +144,7 @@ static inline long long pred_ld_sd_pi(int pred, long long *p, long long *q, "}:mem_noshuf\n" : "=&r"(ret) : "r"(p), "r"(q), "r"(x), "r"(y), "r"(pred) - : "p0", "memory"); + : "r7", "p0", "memory"); return ret; } diff --git a/tests/tcg/hexagon/misc.c b/tests/tcg/hexagon/misc.c index f0b1947..e73ab57 100644 --- a/tests/tcg/hexagon/misc.c +++ b/tests/tcg/hexagon/misc.c @@ -186,10 +186,10 @@ static int L2_ploadrifnew_pi(void *p, int pred) int result; asm volatile("%0 = #31\n\t" "{\n\t" - " p0 = cmp.eq(%1, #1)\n\t" - " if (!p0.new) %0 = memw(%2++#4)\n\t" + " p0 = cmp.eq(%2, #1)\n\t" + " if (!p0.new) %0 = memw(%1++#4)\n\t" "}\n\t" - : "=r"(result) : "r"(pred), "r"(p) + : "=&r"(result), "+r"(p) : "r"(pred) : "p0"); return result; } |