Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] valgrind cleanup + fix for armv7a without vfp/neon
@ 2016-01-20  1:33 Andre McCurdy
  2016-01-20  1:33 ` [PATCH 1/3] valgrind: let valgrind determine its own optimisation flags Andre McCurdy
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Andre McCurdy @ 2016-01-20  1:33 UTC (permalink / raw)
  To: openembedded-core

Andre McCurdy (3):
  valgrind: let valgrind determine its own optimisation flags
  valgrind: re-enable ARM intdiv and vcvt_fixed_float_VFP tests
  valgrind: avoid neon for targets which don't support it

 ...d-neon-for-targets-which-don-t-support-it.patch | 33 +++++++++++
 .../valgrind/remove-arm-variant-specific.patch     | 66 ----------------------
 ...ppropriate-flags-for-vcvt-fixed-float-VFP.patch | 33 +++++++++++
 meta/recipes-devtools/valgrind/valgrind_3.11.0.bb  | 12 ++--
 4 files changed, 74 insertions(+), 70 deletions(-)
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch

-- 
1.9.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] valgrind: let valgrind determine its own optimisation flags
  2016-01-20  1:33 [PATCH 0/3] valgrind cleanup + fix for armv7a without vfp/neon Andre McCurdy
@ 2016-01-20  1:33 ` Andre McCurdy
  2016-01-20  1:34 ` [PATCH 2/3] valgrind: re-enable ARM intdiv and vcvt_fixed_float_VFP tests Andre McCurdy
  2016-01-20  1:34 ` [PATCH 3/3] valgrind: avoid neon for targets which don't support it Andre McCurdy
  2 siblings, 0 replies; 6+ messages in thread
From: Andre McCurdy @ 2016-01-20  1:33 UTC (permalink / raw)
  To: openembedded-core

Valgrind likes to control its own optimisation flags. It generally
defaults to -O2 but uses -O0 for some specific test apps etc. Passing
our own flags (via CFLAGS) means we interfere with that.

Giving valgrind control of optimisation is hopefully an even better
solution than the previous one of forcing -O0 for all tests.

  http://git.openembedded.org/openembedded-core/commit/?h=master-next&id=98c4a3ffb8dca10739be600e8d6df7fb6aa4958f

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 meta/recipes-devtools/valgrind/valgrind_3.11.0.bb | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
index 70d84fe..8e9b72c 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
@@ -44,6 +44,11 @@ EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}"
 
 EXTRA_OEMAKE = "-w"
 
+# valgrind likes to control its own optimisation flags. It generally defaults
+# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags
+# (via CFLAGS) means we interfere with that.
+SELECTED_OPTIMIZATION = ""
+
 CFLAGS_append_libc-uclibc = " -D__UCLIBC__ "
 
 do_install_append () {
@@ -63,10 +68,9 @@ RDEPENDS_${PN}-ptest += " sed perl glibc-utils perl-module-file-glob"
 INSANE_SKIP_${PN}-ptest += "file-rdeps"
 
 do_compile_ptest() {
-    oe_runmake check CFLAGS="${CFLAGS} -O0" CXXFLAGS="${CXXFLAGS} -O0"
+    oe_runmake check
 }
 
-
 do_install_ptest() {
     chmod +x ${B}/tests/vg_regtest
 
@@ -107,4 +111,3 @@ do_install_ptest() {
     # handle multilib
     sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
 }
-
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] valgrind: re-enable ARM intdiv and vcvt_fixed_float_VFP tests
  2016-01-20  1:33 [PATCH 0/3] valgrind cleanup + fix for armv7a without vfp/neon Andre McCurdy
  2016-01-20  1:33 ` [PATCH 1/3] valgrind: let valgrind determine its own optimisation flags Andre McCurdy
@ 2016-01-20  1:34 ` Andre McCurdy
  2016-01-20  1:49   ` Rongqing Li
  2016-01-20  1:34 ` [PATCH 3/3] valgrind: avoid neon for targets which don't support it Andre McCurdy
  2 siblings, 1 reply; 6+ messages in thread
From: Andre McCurdy @ 2016-01-20  1:34 UTC (permalink / raw)
  To: openembedded-core

The intdiv test has been fixed upstream and the vcvt_fixed_float_VFP
test can be fixed with a similar approach, ie ensuring that it is
always compiled with appropriate -mcpu/-mfpu flags to support the
instructions being tested.

See similar cases in none/tests/arm/Makefile.am

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 .../valgrind/remove-arm-variant-specific.patch     | 66 ----------------------
 ...ppropriate-flags-for-vcvt-fixed-float-VFP.patch | 33 +++++++++++
 meta/recipes-devtools/valgrind/valgrind_3.11.0.bb  |  2 +-
 3 files changed, 34 insertions(+), 67 deletions(-)
 delete mode 100644 meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch

diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
deleted file mode 100644
index 2319ab9..0000000
--- a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-Remove arm tests that don't compile
-
-Upstream-Status: Pending
-
-Corrects the original commit for the patch that removed ARM ptest CFLAGS
-settings. Since the flags could be set by a user, the flags should
-be kept in place during compilation.  By keeping the original up-stream
-CFLAGS for the tests, then additional tests successfully compile
-for all tested ARM tunings.
-
-However, there were still two tests listed below that did not compile
-for any beaglebone tuning that is valid for valgrind. With the updated
-patch, the set of excluded ARM ptests and their respective build
-failures are:
-  intdiv - fails for all beaglebone tunings with 2 errors:
-  {standard input}:(40 or 41): Error: selected processor does not
-       support Thumb mode `udiv r3,r9,r10'
-  {standard input}:(72 or 73): Error: selected processor does not
-       support Thumb mode `sdiv r3,r9,r10'
-
-  vcvt_fixed_float_VFP - fails for all beaglebone tunings in one of
-  two ways:
-    with neon tuning (-mfpu=neon) fails with Internal Compiler Error
-    without neon tuning fails with 3 errors:
-    {standard input}:33: Error: selected FPU does not support
-      instruction -- `vcvt.f32.s32 s15,s15,#1'
-    {standard input}:58: Error: selected FPU does not support
-      instruction -- `vcvt.f32.s32 s15,s15,#32'
-    {standard input}:136: Error: selected FPU does not support
-      instruction -- `vcvt.f32.u32 s15,s15,#1'
-
-After applying this commit, the valgrind ARM ptests compile without
-errors for tunings:
-  armv7[t][hf][b][-neon] cortexa8[t][hf][-neon]
-where the tuning [option] was successfully compiled, both with
-and without the 'option', and in combination with all other options.
-
-Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-
-Index: valgrind-3.10.1/none/tests/arm/Makefile.am
-===================================================================
---- valgrind-3.10.1.orig/none/tests/arm/Makefile.am	2015-05-19 15:11:59.224842927 -0500
-+++ valgrind-3.10.1/none/tests/arm/Makefile.am	2015-05-19 15:14:20.808847028 -0500
-@@ -17,9 +17,13 @@
- 	vfp.stdout.exp vfp.stderr.exp vfp.vgtest \
- 	vfpv4_fma.stdout.exp vfpv4_fma.stderr.exp vfpv4_fma.vgtest
- 
-+# Remove the following tests which cause compiler errors for all tunings
-+#  available for beagle bone (see remove-arm-variant-specific.patch):
-+#	intdiv
-+#	vcvt_fixed_float_VFP
-+
- check_PROGRAMS = \
- 	allexec \
--	intdiv \
- 	ldrt \
- 	ldrt_arm \
- 	neon128 \
-@@ -27,7 +31,6 @@
- 	v6intARM \
- 	v6intThumb \
- 	v6media \
--	vcvt_fixed_float_VFP \
- 	vfp \
- 	vfpv4_fma
- 
diff --git a/meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch b/meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch
new file mode 100644
index 0000000..b60bbec
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch
@@ -0,0 +1,33 @@
+From 3edcad177058150a841a88cf0798fdc0bd0dad43 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 19 Jan 2016 16:00:00 -0800
+Subject: [PATCH] use appropriate -mcpu/-mfpu for vcvt_fixed_float_VFP
+
+vcvt_fixed_float_VFP.c contains embedded vfpv3 instructions. Ensure
+that it is always compiled with appropriate -mcpu/-mfpu flags to
+support the instructions being tested. The aim is to build all tests,
+even ones which may not run correctly on all target CPUs.
+
+See similar cases in none/tests/arm/Makefile.am
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ none/tests/arm/Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
+index 4507a20..b38a082 100644
+--- a/none/tests/arm/Makefile.am
++++ b/none/tests/arm/Makefile.am
+@@ -66,4 +66,6 @@ intdiv_CFLAGS	  = $(AM_CFLAGS) -g -mcpu=cortex-a15 -mthumb
+ ldrt_CFLAGS	  = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
+ ldrt_arm_CFLAGS	  = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
+ 
++vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3
++
+ vfpv4_fma_CFLAGS  = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a15 -mfpu=vfpv4 -marm
+-- 
+1.9.1
+
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
index 8e9b72c..d2a78c3 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
@@ -15,13 +15,13 @@ DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d
 SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
            file://fixed-perl-path.patch \
            file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
-           file://remove-arm-variant-specific.patch \
            file://run-ptest \
            file://11_mips-link-tool.patch \
            file://0002-remove-rpath.patch \
            file://0004-Fix-out-of-tree-builds.patch \
            file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
            file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
+           file://use-appropriate-flags-for-vcvt-fixed-float-VFP.patch \
            "
 
 SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] valgrind: avoid neon for targets which don't support it
  2016-01-20  1:33 [PATCH 0/3] valgrind cleanup + fix for armv7a without vfp/neon Andre McCurdy
  2016-01-20  1:33 ` [PATCH 1/3] valgrind: let valgrind determine its own optimisation flags Andre McCurdy
  2016-01-20  1:34 ` [PATCH 2/3] valgrind: re-enable ARM intdiv and vcvt_fixed_float_VFP tests Andre McCurdy
@ 2016-01-20  1:34 ` Andre McCurdy
  2 siblings, 0 replies; 6+ messages in thread
From: Andre McCurdy @ 2016-01-20  1:34 UTC (permalink / raw)
  To: openembedded-core

The sh-mem-random.c test app tries to use neon loads and stores to
test 64-bit float copies when building for ARM. Allow it to do so if
possible, but fallback to C when building for ARM targets which don't
support neon.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 ...d-neon-for-targets-which-don-t-support-it.patch | 33 ++++++++++++++++++++++
 meta/recipes-devtools/valgrind/valgrind_3.11.0.bb  |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch

diff --git a/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch b/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch
new file mode 100644
index 0000000..5fcfec0
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch
@@ -0,0 +1,33 @@
+From 8facc29c3c56e6cf9cfef70986cf73876044a3fb Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 19 Jan 2016 16:42:36 -0800
+Subject: [PATCH] avoid neon for targets which don't support it
+
+The sh-mem-random.c test app tries to use neon loads and stores to
+test 64-bit float copies when building for ARM. Allow it to do so if
+possible, but fallback to C when building for ARM targets which don't
+support neon.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ memcheck/tests/sh-mem-random.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/memcheck/tests/sh-mem-random.c b/memcheck/tests/sh-mem-random.c
+index ae82248..816e139 100644
+--- a/memcheck/tests/sh-mem-random.c
++++ b/memcheck/tests/sh-mem-random.c
+@@ -191,7 +191,7 @@ void do_test_at ( U1* arr )
+                "emms"
+                : : "r"(arr+dst), "r"(arr+src) : "memory"
+             );
+-#elif defined(__linux__) && defined(__arm__) && !defined(__aarch64__)
++#elif defined(__linux__) && defined(__arm__) && defined(__ARM_NEON__) && !defined(__aarch64__)
+             /* On arm32, many compilers generate a 64-bit float move
+                using two 32 bit integer registers, which completely
+                defeats this test.  Hence force a 64-bit NEON load and
+-- 
+1.9.1
+
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
index d2a78c3..5d16c78 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
@@ -22,6 +22,7 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
            file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
            file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
            file://use-appropriate-flags-for-vcvt-fixed-float-VFP.patch \
+           file://avoid-neon-for-targets-which-don-t-support-it.patch \
            "
 
 SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] valgrind: re-enable ARM intdiv and vcvt_fixed_float_VFP tests
  2016-01-20  1:34 ` [PATCH 2/3] valgrind: re-enable ARM intdiv and vcvt_fixed_float_VFP tests Andre McCurdy
@ 2016-01-20  1:49   ` Rongqing Li
  2016-01-20  2:07     ` Andre McCurdy
  0 siblings, 1 reply; 6+ messages in thread
From: Rongqing Li @ 2016-01-20  1:49 UTC (permalink / raw)
  To: Andre McCurdy, openembedded-core



On 2016年01月20日 09:34, Andre McCurdy wrote:
> The intdiv test has been fixed upstream and the vcvt_fixed_float_VFP
> test can be fixed with a similar approach, ie ensuring that it is
> always compiled with appropriate -mcpu/-mfpu flags to support the
> instructions being tested.
>
> See similar cases in none/tests/arm/Makefile.am
>
> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> ---
>   .../valgrind/remove-arm-variant-specific.patch     | 66 ----------------------
>   ...ppropriate-flags-for-vcvt-fixed-float-VFP.patch | 33 +++++++++++
>   meta/recipes-devtools/valgrind/valgrind_3.11.0.bb  |  2 +-
>   3 files changed, 34 insertions(+), 67 deletions(-)
>   delete mode 100644 meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
>   create mode 100644 meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch
>
> diff --git a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
> deleted file mode 100644
> index 2319ab9..0000000
> --- a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
> +++ /dev/null
> @@ -1,66 +0,0 @@
> -Remove arm tests that don't compile
> -
> -Upstream-Status: Pending
> -
> -Corrects the original commit for the patch that removed ARM ptest CFLAGS
> -settings. Since the flags could be set by a user, the flags should
> -be kept in place during compilation.  By keeping the original up-stream
> -CFLAGS for the tests, then additional tests successfully compile
> -for all tested ARM tunings.
> -
> -However, there were still two tests listed below that did not compile
> -for any beaglebone tuning that is valid for valgrind. With the updated
> -patch, the set of excluded ARM ptests and their respective build
> -failures are:
> -  intdiv - fails for all beaglebone tunings with 2 errors:
> -  {standard input}:(40 or 41): Error: selected processor does not
> -       support Thumb mode `udiv r3,r9,r10'
> -  {standard input}:(72 or 73): Error: selected processor does not
> -       support Thumb mode `sdiv r3,r9,r10'
> -
> -  vcvt_fixed_float_VFP - fails for all beaglebone tunings in one of
> -  two ways:
> -    with neon tuning (-mfpu=neon) fails with Internal Compiler Error
> -    without neon tuning fails with 3 errors:
> -    {standard input}:33: Error: selected FPU does not support
> -      instruction -- `vcvt.f32.s32 s15,s15,#1'
> -    {standard input}:58: Error: selected FPU does not support
> -      instruction -- `vcvt.f32.s32 s15,s15,#32'
> -    {standard input}:136: Error: selected FPU does not support
> -      instruction -- `vcvt.f32.u32 s15,s15,#1'
> -
> -After applying this commit, the valgrind ARM ptests compile without
> -errors for tunings:
> -  armv7[t][hf][b][-neon] cortexa8[t][hf][-neon]
> -where the tuning [option] was successfully compiled, both with
> -and without the 'option', and in combination with all other options.
> -
> -Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
> -
> -Index: valgrind-3.10.1/none/tests/arm/Makefile.am
> -===================================================================
> ---- valgrind-3.10.1.orig/none/tests/arm/Makefile.am	2015-05-19 15:11:59.224842927 -0500
> -+++ valgrind-3.10.1/none/tests/arm/Makefile.am	2015-05-19 15:14:20.808847028 -0500
> -@@ -17,9 +17,13 @@
> - 	vfp.stdout.exp vfp.stderr.exp vfp.vgtest \
> - 	vfpv4_fma.stdout.exp vfpv4_fma.stderr.exp vfpv4_fma.vgtest
> -
> -+# Remove the following tests which cause compiler errors for all tunings
> -+#  available for beagle bone (see remove-arm-variant-specific.patch):
> -+#	intdiv
> -+#	vcvt_fixed_float_VFP
> -+
> - check_PROGRAMS = \
> - 	allexec \
> --	intdiv \
> - 	ldrt \
> - 	ldrt_arm \
> - 	neon128 \
> -@@ -27,7 +31,6 @@
> - 	v6intARM \
> - 	v6intThumb \
> - 	v6media \
> --	vcvt_fixed_float_VFP \

it failed on my platform again


| arm-wrs-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=softfp  -marm 
-mthumb-interwork 
--sysroot=/work/wr/buildarea/arm/bitbake_build/tmp/sysroots/qemuarma9 
-Winline -Wall -Wshadow -Wno-long-long -g -fno-stack-protector 
-Wno-nonnull   -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o allexec 
allexec-allexec.o
| arm-wrs-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=softfp  -marm 
-mthumb-interwork 
--sysroot=/work/wr/buildarea/arm/bitbake_build/tmp/sysroots/qemuarma9 
-DHAVE_CONFIG_H -I. 
-I/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0/none/tests/arm 
-I../../.. 
-I/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0 
-I/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0/include 
-I/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0/coregrind 
-I../../../include 
-I/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0/VEX/pub 
-I../../../VEX/pub -DVGA_arm=1 -DVGO_linux=1 -DVGP_arm_linux=1 
-DVGPV_arm_linux_vanilla=1   -Winline -Wall -Wshadow -Wno-long-long -g 
-fno-stack-protector    -g -mcpu=cortex-a15 -mthumb  -c -o 
intdiv-intdiv.o `test -f 'intdiv.c' || echo 
'/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0/none/tests/arm/'`intdiv.c
| 
/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0/none/tests/arm/intdiv.c:1:0: 
warning: switch -mcpu=cortex-a15 conflicts with -march=armv7-a switch
|
|  ^
| /tmp/ccw8BXpd.s: Assembler messages:
| /tmp/ccw8BXpd.s:49: Error: selected processor does not support Thumb 
mode `udiv r3,r9,r10'
| /tmp/ccw8BXpd.s:104: Error: selected processor does not support Thumb 
mode `sdiv r3,r9,r10'
| Makefile:811: recipe for target 'intdiv-intdiv.o' failed
| make[5]: *** [intdiv-intdiv.o] Error 1



-Roy


> - 	vfp \
> - 	vfpv4_fma
> -
> diff --git a/meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch b/meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch
> new file mode 100644
> index 0000000..b60bbec
> --- /dev/null
> +++ b/meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch
> @@ -0,0 +1,33 @@
> +From 3edcad177058150a841a88cf0798fdc0bd0dad43 Mon Sep 17 00:00:00 2001
> +From: Andre McCurdy <armccurdy@gmail.com>
> +Date: Tue, 19 Jan 2016 16:00:00 -0800
> +Subject: [PATCH] use appropriate -mcpu/-mfpu for vcvt_fixed_float_VFP
> +
> +vcvt_fixed_float_VFP.c contains embedded vfpv3 instructions. Ensure
> +that it is always compiled with appropriate -mcpu/-mfpu flags to
> +support the instructions being tested. The aim is to build all tests,
> +even ones which may not run correctly on all target CPUs.
> +
> +See similar cases in none/tests/arm/Makefile.am
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> +---
> + none/tests/arm/Makefile.am | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
> +index 4507a20..b38a082 100644
> +--- a/none/tests/arm/Makefile.am
> ++++ b/none/tests/arm/Makefile.am
> +@@ -66,4 +66,6 @@ intdiv_CFLAGS	  = $(AM_CFLAGS) -g -mcpu=cortex-a15 -mthumb
> + ldrt_CFLAGS	  = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
> + ldrt_arm_CFLAGS	  = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
> +
> ++vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3
> ++
> + vfpv4_fma_CFLAGS  = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a15 -mfpu=vfpv4 -marm
> +--
> +1.9.1
> +
> diff --git a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
> index 8e9b72c..d2a78c3 100644
> --- a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
> +++ b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
> @@ -15,13 +15,13 @@ DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d
>   SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
>              file://fixed-perl-path.patch \
>              file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
> -           file://remove-arm-variant-specific.patch \
>              file://run-ptest \
>              file://11_mips-link-tool.patch \
>              file://0002-remove-rpath.patch \
>              file://0004-Fix-out-of-tree-builds.patch \
>              file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
>              file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
> +           file://use-appropriate-flags-for-vcvt-fixed-float-VFP.patch \
>              "
>
>   SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129"
>

-- 
Best Reagrds,
Roy | RongQing Li


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] valgrind: re-enable ARM intdiv and vcvt_fixed_float_VFP tests
  2016-01-20  1:49   ` Rongqing Li
@ 2016-01-20  2:07     ` Andre McCurdy
  0 siblings, 0 replies; 6+ messages in thread
From: Andre McCurdy @ 2016-01-20  2:07 UTC (permalink / raw)
  To: Rongqing Li; +Cc: OE Core mailing list

On Tue, Jan 19, 2016 at 5:49 PM, Rongqing Li <rongqing.li@windriver.com> wrote:
>
> On 2016年01月20日 09:34, Andre McCurdy wrote:
>>
>> The intdiv test has been fixed upstream and the vcvt_fixed_float_VFP
>> test can be fixed with a similar approach, ie ensuring that it is
>> always compiled with appropriate -mcpu/-mfpu flags to support the
>> instructions being tested.
>>
>> See similar cases in none/tests/arm/Makefile.am
>>
>> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
>> ---
>>   .../valgrind/remove-arm-variant-specific.patch     | 66
>> ----------------------
>>   ...ppropriate-flags-for-vcvt-fixed-float-VFP.patch | 33 +++++++++++
>>   meta/recipes-devtools/valgrind/valgrind_3.11.0.bb  |  2 +-
>>   3 files changed, 34 insertions(+), 67 deletions(-)
>>   delete mode 100644
>> meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
>>   create mode 100644
>> meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch
>>
>> diff --git
>> a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
>> b/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
>> deleted file mode 100644
>> index 2319ab9..0000000
>> ---
>> a/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
>> +++ /dev/null
>> @@ -1,66 +0,0 @@
>> -Remove arm tests that don't compile
>> -
>> -Upstream-Status: Pending
>> -
>> -Corrects the original commit for the patch that removed ARM ptest CFLAGS
>> -settings. Since the flags could be set by a user, the flags should
>> -be kept in place during compilation.  By keeping the original up-stream
>> -CFLAGS for the tests, then additional tests successfully compile
>> -for all tested ARM tunings.
>> -
>> -However, there were still two tests listed below that did not compile
>> -for any beaglebone tuning that is valid for valgrind. With the updated
>> -patch, the set of excluded ARM ptests and their respective build
>> -failures are:
>> -  intdiv - fails for all beaglebone tunings with 2 errors:
>> -  {standard input}:(40 or 41): Error: selected processor does not
>> -       support Thumb mode `udiv r3,r9,r10'
>> -  {standard input}:(72 or 73): Error: selected processor does not
>> -       support Thumb mode `sdiv r3,r9,r10'
>> -
>> -  vcvt_fixed_float_VFP - fails for all beaglebone tunings in one of
>> -  two ways:
>> -    with neon tuning (-mfpu=neon) fails with Internal Compiler Error
>> -    without neon tuning fails with 3 errors:
>> -    {standard input}:33: Error: selected FPU does not support
>> -      instruction -- `vcvt.f32.s32 s15,s15,#1'
>> -    {standard input}:58: Error: selected FPU does not support
>> -      instruction -- `vcvt.f32.s32 s15,s15,#32'
>> -    {standard input}:136: Error: selected FPU does not support
>> -      instruction -- `vcvt.f32.u32 s15,s15,#1'
>> -
>> -After applying this commit, the valgrind ARM ptests compile without
>> -errors for tunings:
>> -  armv7[t][hf][b][-neon] cortexa8[t][hf][-neon]
>> -where the tuning [option] was successfully compiled, both with
>> -and without the 'option', and in combination with all other options.
>> -
>> -Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
>> -
>> -Index: valgrind-3.10.1/none/tests/arm/Makefile.am
>> -===================================================================
>> ---- valgrind-3.10.1.orig/none/tests/arm/Makefile.am    2015-05-19
>> 15:11:59.224842927 -0500
>> -+++ valgrind-3.10.1/none/tests/arm/Makefile.am 2015-05-19
>> 15:14:20.808847028 -0500
>> -@@ -17,9 +17,13 @@
>> -       vfp.stdout.exp vfp.stderr.exp vfp.vgtest \
>> -       vfpv4_fma.stdout.exp vfpv4_fma.stderr.exp vfpv4_fma.vgtest
>> -
>> -+# Remove the following tests which cause compiler errors for all tunings
>> -+#  available for beagle bone (see remove-arm-variant-specific.patch):
>> -+#     intdiv
>> -+#     vcvt_fixed_float_VFP
>> -+
>> - check_PROGRAMS = \
>> -       allexec \
>> --      intdiv \
>> -       ldrt \
>> -       ldrt_arm \
>> -       neon128 \
>> -@@ -27,7 +31,6 @@
>> -       v6intARM \
>> -       v6intThumb \
>> -       v6media \
>> --      vcvt_fixed_float_VFP \
>
>
> it failed on my platform again
>
>
> | arm-wrs-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=softfp  -marm
> -mthumb-interwork
> --sysroot=/work/wr/buildarea/arm/bitbake_build/tmp/sysroots/qemuarma9
> -Winline -Wall -Wshadow -Wno-long-long -g -fno-stack-protector -Wno-nonnull
> -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o allexec allexec-allexec.o
> | arm-wrs-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=softfp  -marm
> -mthumb-interwork
> --sysroot=/work/wr/buildarea/arm/bitbake_build/tmp/sysroots/qemuarma9
> -DHAVE_CONFIG_H -I.
> -I/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0/none/tests/arm
> -I../../..
> -I/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0
> -I/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0/include
> -I/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0/coregrind
> -I../../../include
> -I/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0/VEX/pub
> -I../../../VEX/pub -DVGA_arm=1 -DVGO_linux=1 -DVGP_arm_linux=1
> -DVGPV_arm_linux_vanilla=1   -Winline -Wall -Wshadow -Wno-long-long -g
> -fno-stack-protector    -g -mcpu=cortex-a15 -mthumb  -c -o intdiv-intdiv.o
> `test -f 'intdiv.c' || echo
> '/work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0/none/tests/arm/'`intdiv.c
> |
> /work/wr/buildarea/arm/bitbake_build/tmp/work/armv7a-vfp-wrs-linux-gnueabi/valgrind/3.11.0-r0/valgrind-3.11.0/none/tests/arm/intdiv.c:1:0:
> warning: switch -mcpu=cortex-a15 conflicts with -march=armv7-a switch
> |
> |  ^
> | /tmp/ccw8BXpd.s: Assembler messages:
> | /tmp/ccw8BXpd.s:49: Error: selected processor does not support Thumb mode
> `udiv r3,r9,r10'
> | /tmp/ccw8BXpd.s:104: Error: selected processor does not support Thumb mode
> `sdiv r3,r9,r10'
> | Makefile:811: recipe for target 'intdiv-intdiv.o' failed
> | make[5]: *** [intdiv-intdiv.o] Error 1
>

Thanks for testing. I'll send an updated patch.

>
> -Roy
>
>
>
>> -       vfp \
>> -       vfpv4_fma
>> -
>> diff --git
>> a/meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch
>> b/meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch
>> new file mode 100644
>> index 0000000..b60bbec
>> --- /dev/null
>> +++
>> b/meta/recipes-devtools/valgrind/valgrind/use-appropriate-flags-for-vcvt-fixed-float-VFP.patch
>> @@ -0,0 +1,33 @@
>> +From 3edcad177058150a841a88cf0798fdc0bd0dad43 Mon Sep 17 00:00:00 2001
>> +From: Andre McCurdy <armccurdy@gmail.com>
>> +Date: Tue, 19 Jan 2016 16:00:00 -0800
>> +Subject: [PATCH] use appropriate -mcpu/-mfpu for vcvt_fixed_float_VFP
>> +
>> +vcvt_fixed_float_VFP.c contains embedded vfpv3 instructions. Ensure
>> +that it is always compiled with appropriate -mcpu/-mfpu flags to
>> +support the instructions being tested. The aim is to build all tests,
>> +even ones which may not run correctly on all target CPUs.
>> +
>> +See similar cases in none/tests/arm/Makefile.am
>> +
>> +Upstream-Status: Pending
>> +
>> +Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
>> +---
>> + none/tests/arm/Makefile.am | 2 ++
>> + 1 file changed, 2 insertions(+)
>> +
>> +diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
>> +index 4507a20..b38a082 100644
>> +--- a/none/tests/arm/Makefile.am
>> ++++ b/none/tests/arm/Makefile.am
>> +@@ -66,4 +66,6 @@ intdiv_CFLAGS          = $(AM_CFLAGS) -g
>> -mcpu=cortex-a15 -mthumb
>> + ldrt_CFLAGS     = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
>> + ldrt_arm_CFLAGS         = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
>> +
>> ++vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8
>> -mfpu=vfpv3
>> ++
>> + vfpv4_fma_CFLAGS  = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a15 -mfpu=vfpv4
>> -marm
>> +--
>> +1.9.1
>> +
>> diff --git a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
>> b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
>> index 8e9b72c..d2a78c3 100644
>> --- a/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
>> +++ b/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
>> @@ -15,13 +15,13 @@ DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES',
>> 'x11', '${X11DEPENDS}', '', d
>>   SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
>>              file://fixed-perl-path.patch \
>>              file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch
>> \
>> -           file://remove-arm-variant-specific.patch \
>>              file://run-ptest \
>>              file://11_mips-link-tool.patch \
>>              file://0002-remove-rpath.patch \
>>              file://0004-Fix-out-of-tree-builds.patch \
>>
>> file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
>>
>> file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
>> +           file://use-appropriate-flags-for-vcvt-fixed-float-VFP.patch \
>>              "
>>
>>   SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129"
>>
>
> --
> Best Reagrds,
> Roy | RongQing Li


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-20  2:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-20  1:33 [PATCH 0/3] valgrind cleanup + fix for armv7a without vfp/neon Andre McCurdy
2016-01-20  1:33 ` [PATCH 1/3] valgrind: let valgrind determine its own optimisation flags Andre McCurdy
2016-01-20  1:34 ` [PATCH 2/3] valgrind: re-enable ARM intdiv and vcvt_fixed_float_VFP tests Andre McCurdy
2016-01-20  1:49   ` Rongqing Li
2016-01-20  2:07     ` Andre McCurdy
2016-01-20  1:34 ` [PATCH 3/3] valgrind: avoid neon for targets which don't support it Andre McCurdy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox