Source: libgpuarray
Version: 0.6.8-1
Severity: important

https://buildd.debian.org/status/package.php?p=libgpuarray&suite=sid

...
/<<PKGBUILDDIR>>/src/util/integerfactoring.c: In function 'gaIMulMod':
/<<PKGBUILDDIR>>/src/util/integerfactoring.c:271:20: error: '__int128' is not 
supported on this target
  return ((unsigned __int128)a * (unsigned __int128)b) % m;
                    ^~~~~~~~
/<<PKGBUILDDIR>>/src/util/integerfactoring.c:271:43: error: '__int128' is not 
supported on this target
  return ((unsigned __int128)a * (unsigned __int128)b) % m;
                                           ^~~~~~~~
src/CMakeFiles/gpuarray.dir/build.make:696: recipe for target 
'src/CMakeFiles/gpuarray.dir/util/integerfactoring.c.o' failed
....


The code is:

static uint64_t gaIMulMod    (uint64_t a, uint64_t b, uint64_t m){
#if (__GNUC__ >= 4) && defined(__x86_64__) && !defined(__STRICT_ANSI__)
        uint64_t r;

        asm(
            "mul %2\n\t"
            "div %3\n\t"
            : "=&d"(r), "+a"(a)   /* Outputs */
            : "r"(b),  "r"(m)     /* Inputs */
            : "cc"
        );

        return r;
#elif (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
        /* Hardcore GCC 4.6+ optimization jazz */
        return ((unsigned __int128)a * (unsigned __int128)b) % m;
#else
...


defined(__SIZEOF_INT128__) might be a suitable test
for __int128 support.


On a sidenote the amd64 assembler above is wrong and should be removed,
in addition to being buggy it just tries to do a 64bit
  return (a * b) % m;

-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to