Fix cyclecounters on x32
authorPaul Bauer <paul.bauer.q@gmail.com>
Wed, 25 Nov 2020 10:30:08 +0000 (11:30 +0100)
committerPaul Bauer <paul.bauer.q@gmail.com>
Wed, 25 Nov 2020 10:30:08 +0000 (11:30 +0100)
A missing check meant that the code wouldn't compile due to an asm block
that is not compatible with 32 bit datatype ABI and x86_64 registers.

Fix provided by Nicholas Breen.

Fixes #3816

src/gromacs/timing/cyclecounter.cpp

index 30637ade0c622e6a7a2b40d3e90d5568cff457c9..878dcc937ddf6f76e837e840b1d8c3e620e05c04 100644 (file)
@@ -79,7 +79,7 @@ double gmx_cycles_calibrate(double sampletime)
     GMX_UNUSED_VALUE(sampletime);
 #else
 #    if ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__)) \
-         && defined(__x86_64__) && !defined(_CRAYC))
+         && defined(__x86_64__) && !defined(__ILP32__) && !defined(_CRAYC))
     long gmx_unused tmp;
     int             cpuid1;
     int gmx_unused cpuid2;