[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-16 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #21 from jacobly@gmail.com --- Created attachment 110721 --> https://bugs.kde.org/attachment.cgi?id=110721=edit Test mem variants of instructions in test-amd64. Sorry, I had not noticed the switch to git. Here's a git patch against

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-16 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #20 from Julian Seward --- (In reply to jacobly.alt from comment #18) > Created attachment 110697 [details] > Test mem variants of instructions in test-amd64. Is this a patch relative to the git trunk, or a revised version

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-15 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #19 from Julian Seward --- Fix committed, 6ae2edea014669d8082747f0f268e9404e0fd296. -- You are receiving this mail because: You are watching all bug changes.

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-15 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #18 from jacobly@gmail.com --- Created attachment 110697 --> https://bugs.kde.org/attachment.cgi?id=110697=edit Test mem variants of instructions in test-amd64. I think this triggers a latent bug in the test code with string

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-15 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #17 from Julian Seward --- (In reply to Niels Möller from comment #15) > But I've run the mini-gmp tests [..] Good, thanks. That's good enough for me. I'll land the fix. -- You are receiving this mail because: You are

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-15 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #16 from Julian Seward --- (In reply to jacobly.alt from comment #14) > I added mem,reg and reg,mem tests to test-amd64 [..] Great! Can you pls make the testcase diffs available? -- You are receiving this mail because:

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-15 Thread Niels Möller
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #15 from Niels Möller --- Patch works fine for me. I haven't been able to run the complete gmp testsuite under valgrind (some years ago, automake supported that with "make check TESTS_ENVIRONMENT=valgrind", but now

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-15 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=384930 jacobly@gmail.com changed: What|Removed |Added CC||jacobly@gmail.com --- Comment #14

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-15 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #13 from Julian Seward --- (In reply to Niels Möller from comment #12) git clone git://sourceware.org/git/valgrind.git trunk cd trunk ./autogen.sh && ./configure --prefix=`pwd`/Inst && make -j8 && make -j8 install

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-15 Thread Niels Möller
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #12 from Niels Möller --- I've never built valgrind from source before, but I'll give it a try, maybe already this evening. -- You are receiving this mail because: You are watching all bug changes.

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-15 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #11 from Julian Seward --- Niels, the patch below makes your reduced testcase run correctly. Can you test it more widely on GMP and let me know if it is OK? Then I'll land it. $ git diff -U8 diff --git

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-15 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #10 from Julian Seward --- Argh. V doesn't actually write the computed result to the destination register in the case where one of the sources is a memory operand, for adox and adcx. Eg adoxq 48(%rdi),%r12 %r12 is

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-15 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #9 from Julian Seward --- On further analysis and testing, all 3 insns -- adcx, adox and mulx -- appear to be correctly implemented. So now I'm even more mystified. -- You are receiving this mail because: You are

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-15 Thread Niels Möller
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #8 from Niels Möller --- The large errors are hard to explain just from incorrect carries applied by adcx and adox (unless internal representation of O and C flag can somehow get values far beyond {0,1}). One

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-14 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #7 from Julian Seward --- It seems likely to me, from looking at the implementation, that V does not correctly preserve the OSZAP flags after ADCX, nor the SZACP flags after ADOX. At least, that's my current theory. I'll

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-14 Thread Julian Seward
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #6 from Julian Seward --- Reproduced. Thank you very much to whoever reduced the testcase. -- You are receiving this mail because: You are watching all bug changes.

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-13 Thread Niels Möller
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #5 from Niels Möller --- Created attachment 110629 --> https://bugs.kde.org/attachment.cgi?id=110629=edit Main program calling assembly mul_basecase. -- You are receiving this mail because: You are watching all bug

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-13 Thread Niels Möller
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #4 from Niels Möller --- Created attachment 110628 --> https://bugs.kde.org/attachment.cgi?id=110628=edit GMP assembly mul_basecase.asm after m4 preprocessing -- You are receiving this mail because: You are

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-13 Thread Niels Möller
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #3 from Niels Möller --- In the mean time, a more self-contained example was posted by the GMP author to https://gmplib.org/list-archives/gmp-devel/2018-February/004728.html, I'm copying here for easy reference. To

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-12 Thread Niels Möller
https://bugs.kde.org/show_bug.cgi?id=384930 --- Comment #2 from Niels Möller --- Created attachment 110579 --> https://bugs.kde.org/attachment.cgi?id=110579=edit Disassembly of gmp's mul_basecase.o, for the broadwell cpu family. -- You are receiving this mail because:

[valgrind] [Bug 384930] Valgrind fails to compute correctly some code using the GMP library

2018-02-12 Thread Niels Möller
https://bugs.kde.org/show_bug.cgi?id=384930 Niels Möller changed: What|Removed |Added CC||ni...@lysator.liu.se ---