I've been working on some code targeting an ARM Cortex A9. A minimal working example and compile/test script can be found here: https://gist.github.com/hgomersall/22a19f245559d55f1ff6
What I've found is that with -O3 and -mfpu=neon flags, some values, as computed under Valgrind, are wrong. This is demonstrated in the minimal example linked to above through the printf statement. Now I understand that Valgrind has potential problems with its own testing on higher optimisation levels, but this is a problem with the validity of the program itself (I am assuming the code itself remains valid). Clearly, if this is just a Valgrind problem I shouldn't worry too much, but I seem to be getting various poorly defined problems (largely erroneous results) with the higher optimisation levels and the neon flag, even when running outside of Valgrind. It's very hard to isolate a minimal example though. My asm-fu is not quite at the point I can understand the program logic from the compiler output. I'm trying to understand whether this is a bug in my code, a compiler bug, or a valgrind bug. Any assistance on this is much appreciated! All the code is tested initially on x86_64, on which everything works with no problems at all. The problem code is with ARM cortex A9 valgrind 3.10.1 gcc 5.2.0 glibc 2.22 kernel 3.19.0 Many thanks, Henry ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users