summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColin Watson <cjwatson@ubuntu.com>2012-11-29 19:37:30 +0000
committerPádraig Brady <P@draigBrady.com>2012-12-04 12:28:42 +0000
commit7d034663e4671be6fe8b8eacf88fb5edc42ea0c0 (patch)
treedbf95b26b0b30a797e6dc0af42bb7fa3c90bff5b /src
parent06aeeecb3fe2655fd5e4e12948b389873a79884b (diff)
downloadcoreutils-7d034663e4671be6fe8b8eacf88fb5edc42ea0c0.tar.xz
factor: fix infinite loop on 32 bit powerpc
Both Debian and Ubuntu builds of coreutils 8.20 hang while running the test suite on powerpc, which is reproducible using 'factor 122'. This turns out to be somewhat related to http://bugs.gnu.org/12754, but not quite the same. uintmax_t is 64 bits, but the cntlzw instruction takes 32-bit operands, and the cntlzd option is only available on 64-bit hardware. * src/longlong.h: Add an _LP64 check around the PPC64 code, so that this falls back to the C implementations. * NEWS: Mention the fix.
Diffstat (limited to 'src')
-rw-r--r--src/longlong.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/longlong.h b/src/longlong.h
index 6ee157cda..f2b2c4985 100644
--- a/src/longlong.h
+++ b/src/longlong.h
@@ -1398,7 +1398,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype);
/* We should test _IBMR2 here when we add assembly support for the system
vendor compilers. */
-#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE == 64
+#if HAVE_HOST_CPU_FAMILY_powerpc && W_TYPE_SIZE == 64 && defined (_LP64)
#if !defined (_LONG_LONG_LIMB)
/* _LONG_LONG_LIMB is ABI=mode32 where adde operates on 32-bit values. So
use adde etc only when not _LONG_LONG_LIMB. */