* [PATCH 0/2] Update hexagon toolchain @ 2023-03-21 14:12 Marco Liebel 2023-03-21 14:12 ` [PATCH 1/2] Use hexagon toolchain version 16.0.0 Marco Liebel 2023-03-21 14:12 ` [PATCH 2/2] Add test for storing .new vector Marco Liebel 0 siblings, 2 replies; 6+ messages in thread From: Marco Liebel @ 2023-03-21 14:12 UTC (permalink / raw) To: qemu-devel; +Cc: Taylor Simpson, Matheus Bernardino, Marco Liebel Updates the hexagon toolchain and adds a test for a bug that was fixed by the new version. Marco Liebel (2): Use hexagon toolchain version 16.0.0 Add test for storing .new vector .../dockerfiles/debian-hexagon-cross.docker | 2 +- tests/tcg/hexagon/hvx_misc.c | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] Use hexagon toolchain version 16.0.0 2023-03-21 14:12 [PATCH 0/2] Update hexagon toolchain Marco Liebel @ 2023-03-21 14:12 ` Marco Liebel 2023-03-21 14:12 ` [PATCH 2/2] Add test for storing .new vector Marco Liebel 1 sibling, 0 replies; 6+ messages in thread From: Marco Liebel @ 2023-03-21 14:12 UTC (permalink / raw) To: qemu-devel; +Cc: Taylor Simpson, Matheus Bernardino, Marco Liebel Signed-off-by: Marco Liebel <quic_mliebel@quicinc.com> --- tests/docker/dockerfiles/debian-hexagon-cross.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/docker/dockerfiles/debian-hexagon-cross.docker index 5308ccb8fe..b99d99f943 100644 --- a/tests/docker/dockerfiles/debian-hexagon-cross.docker +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker @@ -27,7 +27,7 @@ RUN apt-get update && \ ENV TOOLCHAIN_INSTALL /opt -ENV TOOLCHAIN_RELEASE 15.0.3 +ENV TOOLCHAIN_RELEASE 16.0.0 ENV TOOLCHAIN_BASENAME "clang+llvm-${TOOLCHAIN_RELEASE}-cross-hexagon-unknown-linux-musl" ENV TOOLCHAIN_URL https://codelinaro.jfrog.io/artifactory/codelinaro-toolchain-for-hexagon/v${TOOLCHAIN_RELEASE}/${TOOLCHAIN_BASENAME}.tar.xz -- 2.25.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] Add test for storing .new vector 2023-03-21 14:12 [PATCH 0/2] Update hexagon toolchain Marco Liebel 2023-03-21 14:12 ` [PATCH 1/2] Use hexagon toolchain version 16.0.0 Marco Liebel @ 2023-03-21 14:12 ` Marco Liebel 2023-03-21 16:52 ` Taylor Simpson 2023-03-21 17:19 ` Peter Maydell 1 sibling, 2 replies; 6+ messages in thread From: Marco Liebel @ 2023-03-21 14:12 UTC (permalink / raw) To: qemu-devel; +Cc: Taylor Simpson, Matheus Bernardino, Marco Liebel Hexagon toolchain version 16.0.0 fixes a bug where the ecoding of storing a .new vector was incorrect. This resulted in an incorrect valued being stored. The test checks that the correct value is used. Signed-off-by: Marco Liebel <quic_mliebel@quicinc.com> --- tests/tcg/hexagon/hvx_misc.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/tcg/hexagon/hvx_misc.c b/tests/tcg/hexagon/hvx_misc.c index 53d5c9b44f..657e556dd4 100644 --- a/tests/tcg/hexagon/hvx_misc.c +++ b/tests/tcg/hexagon/hvx_misc.c @@ -211,6 +211,34 @@ static void test_store_unaligned(void) check_output_w(__LINE__, 2); } +static void test_store_new(void) +{ + asm volatile( + "r0 = #0x00000003\n\t" + "v0 = vsplat(r0)\n\t" + "r0 = #expect\n\t" + "vmem(r0+#0) = v0\n\t" + + "r0 = #output\n\t" + "r1 = #0x00000001\n\t" + "r2 = #0x00000002\n\t" + "r3 = #0x00000004\n\t" + + "v1 = vsplat(r1)\n\t" + "v2 = vsplat(r2)\n\t" + "v3 = vsplat(r3)\n\t" + + "{" + " v3.w,q0 = vadd(v1.w, v2.w):carry\n\t" + " vmem(r0+#0) = v3.new\n\t" + "}" + + ::: "r0", "r1", "r2", "r3", "v0", "v1", "v2", "v3", "q0", "memory" + ); + + check_output_w(__LINE__, 1); +} + static void test_masked_store(bool invert) { void *p0 = buffer0; @@ -620,6 +648,7 @@ int main() test_load_unaligned(); test_store_aligned(); test_store_unaligned(); + test_store_new(); test_masked_store(false); test_masked_store(true); test_new_value_store(); -- 2.25.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH 2/2] Add test for storing .new vector 2023-03-21 14:12 ` [PATCH 2/2] Add test for storing .new vector Marco Liebel @ 2023-03-21 16:52 ` Taylor Simpson 2023-03-21 17:19 ` Peter Maydell 1 sibling, 0 replies; 6+ messages in thread From: Taylor Simpson @ 2023-03-21 16:52 UTC (permalink / raw) To: Marco Liebel (QUIC), qemu-devel@nongnu.org; +Cc: Matheus Bernardino (QUIC) > -----Original Message----- > From: Marco Liebel (QUIC) <quic_mliebel@quicinc.com> > Sent: Tuesday, March 21, 2023 8:12 AM > To: qemu-devel@nongnu.org > Cc: Taylor Simpson <tsimpson@quicinc.com>; Matheus Bernardino (QUIC) > <quic_mathbern@quicinc.com>; Marco Liebel (QUIC) > <quic_mliebel@quicinc.com> > Subject: [PATCH 2/2] Add test for storing .new vector > > Hexagon toolchain version 16.0.0 fixes a bug where the ecoding of storing a > .new vector was incorrect. This resulted in an incorrect valued being stored. > The test checks that the correct value is used. > > Signed-off-by: Marco Liebel <quic_mliebel@quicinc.com> > --- > tests/tcg/hexagon/hvx_misc.c | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/tests/tcg/hexagon/hvx_misc.c b/tests/tcg/hexagon/hvx_misc.c > index 53d5c9b44f..657e556dd4 100644 > --- a/tests/tcg/hexagon/hvx_misc.c > +++ b/tests/tcg/hexagon/hvx_misc.c > @@ -211,6 +211,34 @@ static void test_store_unaligned(void) > check_output_w(__LINE__, 2); > } > > +static void test_store_new(void) > +{ > + asm volatile( > + "r0 = #0x00000003\n\t" > + "v0 = vsplat(r0)\n\t" > + "r0 = #expect\n\t" > + "vmem(r0+#0) = v0\n\t" The idiom used in this file is the inline asm stores into the output buffer and there is vanilla C that writes to the expect buffer. So, move the above to something like this (after the inline asm). for (int j = 0; I < MAX_VEC_SIZE_BYTES / 4; j++) { expect[0].w[j] = 3; } Thanks, Taylor ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Add test for storing .new vector 2023-03-21 14:12 ` [PATCH 2/2] Add test for storing .new vector Marco Liebel 2023-03-21 16:52 ` Taylor Simpson @ 2023-03-21 17:19 ` Peter Maydell 2023-03-21 18:20 ` Marco Liebel 1 sibling, 1 reply; 6+ messages in thread From: Peter Maydell @ 2023-03-21 17:19 UTC (permalink / raw) To: Marco Liebel; +Cc: qemu-devel, Taylor Simpson, Matheus Bernardino On Tue, 21 Mar 2023 at 14:13, Marco Liebel <quic_mliebel@quicinc.com> wrote: > > Hexagon toolchain version 16.0.0 fixes a bug where the ecoding of > storing a .new vector was incorrect. This resulted in an incorrect > valued being stored. The test checks that the correct value is used. So is this a compiler/assembler bug? Do we need to have tests relating to those in QEMU's test suite ? thanks -- PMM ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 2/2] Add test for storing .new vector 2023-03-21 17:19 ` Peter Maydell @ 2023-03-21 18:20 ` Marco Liebel 0 siblings, 0 replies; 6+ messages in thread From: Marco Liebel @ 2023-03-21 18:20 UTC (permalink / raw) To: Peter Maydell, Marco Liebel (QUIC) Cc: qemu-devel@nongnu.org, Taylor Simpson, Matheus Bernardino (QUIC) > -----Original Message----- > From: Peter Maydell <peter.maydell@linaro.org> > Sent: Dienstag, 21. März 2023 18:20 > To: Marco Liebel (QUIC) <quic_mliebel@quicinc.com> > Cc: qemu-devel@nongnu.org; Taylor Simpson <tsimpson@quicinc.com>; > Matheus Bernardino (QUIC) <quic_mathbern@quicinc.com> > Subject: Re: [PATCH 2/2] Add test for storing .new vector > > WARNING: This email originated from outside of Qualcomm. Please be wary > of any links or attachments, and do not enable macros. > > On Tue, 21 Mar 2023 at 14:13, Marco Liebel <quic_mliebel@quicinc.com> > wrote: > > > > Hexagon toolchain version 16.0.0 fixes a bug where the ecoding of > > storing a .new vector was incorrect. This resulted in an incorrect > > valued being stored. The test checks that the correct value is used. > > So is this a compiler/assembler bug? Do we need to have tests > relating to those in QEMU's test suite ? > > thanks > -- PMM The bug was in the assembler. For the instruction that does the store of the .new vector (vmem(r0+#0) = v3.new) it created the wrong output. So there should be no need to have more tests, other than the one provided by this patch. Marco ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-03-21 18:21 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-03-21 14:12 [PATCH 0/2] Update hexagon toolchain Marco Liebel 2023-03-21 14:12 ` [PATCH 1/2] Use hexagon toolchain version 16.0.0 Marco Liebel 2023-03-21 14:12 ` [PATCH 2/2] Add test for storing .new vector Marco Liebel 2023-03-21 16:52 ` Taylor Simpson 2023-03-21 17:19 ` Peter Maydell 2023-03-21 18:20 ` Marco Liebel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).