diff mbox series

[v5,10/14] Hexagon (tests/tcg/hexagon) Enable HVX tests

Message ID 20230131225647.25274-11-tsimpson@quicinc.com
State New
Headers show
Series Hexagon: COF overrides, new generator, test/bug update | expand

Commit Message

Taylor Simpson Jan. 31, 2023, 10:56 p.m. UTC
Made possible by new toolchain container

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
---
 tests/tcg/hexagon/Makefile.target | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Comments

Taylor Simpson Feb. 8, 2023, 3:18 p.m. UTC | #1
> -----Original Message-----
> From: Anton Johansson <anjo@rev.ng>
> Sent: Wednesday, February 8, 2023 6:54 AM
> To: Taylor Simpson <tsimpson@quicinc.com>; qemu-devel@nongnu.org
> Cc: richard.henderson@linaro.org; philmd@linaro.org; ale@rev.ng; Brian Cain
> <bcain@quicinc.com>; Matheus Bernardino (QUIC)
> <quic_mathbern@quicinc.com>
> Subject: Re: [PATCH v5 10/14] Hexagon (tests/tcg/hexagon) Enable HVX tests
> 
> WARNING: This email originated from outside of Qualcomm. Please be wary
> of any links or attachments, and do not enable macros.
> 
> On 1/31/23 23:56, Taylor Simpson wrote:
> > +HEX_TESTS += hvx_histogram
> >
> >   HEX_TESTS += test_abs
> >   HEX_TESTS += test_bitcnt
> > @@ -78,3 +82,10 @@ TESTS += $(HEX_TESTS)
> >   usr: usr.c
> >       $(CC) $(CFLAGS) -mv67t -O2 -Wno-inline-asm
> > -Wno-expansion-to-defined $< -o $@ $(LDFLAGS)
> >
> > +scatter_gather: CFLAGS += -mhvx
> > +vector_add_int: CFLAGS += -mhvx -fvectorize
> > +hvx_misc: CFLAGS += -mhvx
> > +hvx_histogram: CFLAGS += -mhvx -Wno-gnu-folding-constant
> > +
> > +hvx_histogram: hvx_histogram.c hvx_histogram_row.S
> > +     $(CC) $(CFLAGS) $(CROSS_CC_GUEST_CFLAGS) $^ -o $@
> 
> I am not able to run check-tcg locally, hvx_histogram fails due to missing ld-
> musl-hexagon
> 
>      TEST    hvx_histogram on hexagon
>    qemu-hexagon: Could not open '/lib/ld-musl-hexagon.so.1': No such file or
> directory
> 
> --
> Anton Johansson,
> rev.ng Labs Srl.

Strange.  These are supposed to build statically.  I'll investigate.
Taylor Simpson Feb. 8, 2023, 8:29 p.m. UTC | #2
> -----Original Message-----
> From: Taylor Simpson
> Sent: Wednesday, February 8, 2023 9:19 AM
> To: anjo@rev.ng; qemu-devel@nongnu.org
> Cc: richard.henderson@linaro.org; philmd@linaro.org; ale@rev.ng; Brian Cain
> <bcain@quicinc.com>; Matheus Bernardino (QUIC)
> <quic_mathbern@quicinc.com>
> Subject: RE: [PATCH v5 10/14] Hexagon (tests/tcg/hexagon) Enable HVX tests
> 
> 
> 
> > -----Original Message-----
> > From: Anton Johansson <anjo@rev.ng>
> > Sent: Wednesday, February 8, 2023 6:54 AM
> > To: Taylor Simpson <tsimpson@quicinc.com>; qemu-devel@nongnu.org
> > Cc: richard.henderson@linaro.org; philmd@linaro.org; ale@rev.ng; Brian
> Cain
> > <bcain@quicinc.com>; Matheus Bernardino (QUIC)
> > <quic_mathbern@quicinc.com>
> > Subject: Re: [PATCH v5 10/14] Hexagon (tests/tcg/hexagon) Enable HVX
> tests
> >
> > WARNING: This email originated from outside of Qualcomm. Please be
> wary
> > of any links or attachments, and do not enable macros.
> >
> > On 1/31/23 23:56, Taylor Simpson wrote:
> > > +HEX_TESTS += hvx_histogram
> > >
> > >   HEX_TESTS += test_abs
> > >   HEX_TESTS += test_bitcnt
> > > @@ -78,3 +82,10 @@ TESTS += $(HEX_TESTS)
> > >   usr: usr.c
> > >       $(CC) $(CFLAGS) -mv67t -O2 -Wno-inline-asm
> > > -Wno-expansion-to-defined $< -o $@ $(LDFLAGS)
> > >
> > > +scatter_gather: CFLAGS += -mhvx
> > > +vector_add_int: CFLAGS += -mhvx -fvectorize
> > > +hvx_misc: CFLAGS += -mhvx
> > > +hvx_histogram: CFLAGS += -mhvx -Wno-gnu-folding-constant
> > > +
> > > +hvx_histogram: hvx_histogram.c hvx_histogram_row.S
> > > +     $(CC) $(CFLAGS) $(CROSS_CC_GUEST_CFLAGS) $^ -o $@
> >
> > I am not able to run check-tcg locally, hvx_histogram fails due to missing ld-
> > musl-hexagon
> >
> >      TEST    hvx_histogram on hexagon
> >    qemu-hexagon: Could not open '/lib/ld-musl-hexagon.so.1': No such file
> or
> > directory
> >
> > --
> > Anton Johansson,
> > rev.ng Labs Srl.
> 
> Strange.  These are supposed to build statically.  I'll investigate.

I need to add $(LDFLAGS) to the build command.
-- a/tests/tcg/hexagon/Makefile.target
+++ b/tests/tcg/hexagon/Makefile.target
@@ -88,4 +88,4 @@ hvx_misc: CFLAGS += -mhvx
 hvx_histogram: CFLAGS += -mhvx -Wno-gnu-folding-constant
 
 hvx_histogram: hvx_histogram.c hvx_histogram_row.S
-       $(CC) $(CFLAGS) $(CROSS_CC_GUEST_CFLAGS) $^ -o $@
+       $(CC) $(CFLAGS) $(CROSS_CC_GUEST_CFLAGS) $^ -o $@ $(LDFLAGS)


I'll include this change in the next rev of the patch series.

Thanks,
Taylor
diff mbox series

Patch

diff --git a/tests/tcg/hexagon/Makefile.target b/tests/tcg/hexagon/Makefile.target
index 18e6a5969e..f753b39d91 100644
--- a/tests/tcg/hexagon/Makefile.target
+++ b/tests/tcg/hexagon/Makefile.target
@@ -1,5 +1,5 @@ 
 ##
-##  Copyright(c) 2019-2022 Qualcomm Innovation Center, Inc. All Rights Reserved.
+##  Copyright(c) 2019-2023 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
@@ -45,6 +45,10 @@  HEX_TESTS += fpstuff
 HEX_TESTS += overflow
 HEX_TESTS += signal_context
 HEX_TESTS += reg_mut
+HEX_TESTS += vector_add_int
+HEX_TESTS += scatter_gather
+HEX_TESTS += hvx_misc
+HEX_TESTS += hvx_histogram
 
 HEX_TESTS += test_abs
 HEX_TESTS += test_bitcnt
@@ -78,3 +82,10 @@  TESTS += $(HEX_TESTS)
 usr: usr.c
 	$(CC) $(CFLAGS) -mv67t -O2 -Wno-inline-asm -Wno-expansion-to-defined $< -o $@ $(LDFLAGS)
 
+scatter_gather: CFLAGS += -mhvx
+vector_add_int: CFLAGS += -mhvx -fvectorize
+hvx_misc: CFLAGS += -mhvx
+hvx_histogram: CFLAGS += -mhvx -Wno-gnu-folding-constant
+
+hvx_histogram: hvx_histogram.c hvx_histogram_row.S
+	$(CC) $(CFLAGS) $(CROSS_CC_GUEST_CFLAGS) $^ -o $@