Niels Möller <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #1 from Niels Möller <> ---
I'm seeing a similar problem, was about to file a new bug, but instead
commenting here:

I'm trying to run gmp test under valgrind. Earlier versions complained that it
didn't recognize all instructions, but after upgrading to the valgrind package
in debian stable valgrind runs without complaints. My machine has a x86_64
broadwell cpu ("Core i3-5010U") with adx and bmi2 extensions. 

I'm using gmp master, with the mul_basecase code from,
using all of mulx, adcx and adox. I will also attach a disassembly of the
corresponding object file. Consider the following test program:

#include <stdio.h>
#include <gmp.h>

int main (int argc, char **argv) 
  mpz_t a, b, c;
  mpz_inits(a, b, c, NULL);
  mpz_set_str (a,
  mpz_set_str (b, "1fffffffffffffffffffffffffffffffffffffffe00007ffffffff",
  mpz_mul(c, a, b);
  gmp_printf("%Zx\n", c);
  mpz_clears(a, b, c, NULL);
  return 0;

When run, it outputs the number 


However, when ran under valgrind, 

==19918== Memcheck, a memory error detector
==19918== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==19918== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==19918== Command: ./a.out

Note the output is quite different, the most significant (1ffff) and least
significant (001ffff800000001) words agree, but the all the rest differ.

I suspect it's one of the new and somewhat obscure instructions adox, adcx or
mulx that isn't handled correctly.

You are receiving this mail because:
You are watching all bug changes.

Reply via email to