summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/runmath.in
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-07-11 22:39:53 +0000
committerKarl Berry <karl@freefriends.org>2010-07-11 22:39:53 +0000
commit4e8485b0ddecb55f72929dd6233f254a1e7bf5b0 (patch)
tree354324ee6f54d46053b3ce88fe9dc4acf8e2ed81 /Build/source/utils/asymptote/runmath.in
parent713bb91ad0467fb3b12acad03cae2fa105ed2caa (diff)
asy 2.02
git-svn-id: svn://tug.org/texlive/trunk@19378 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/runmath.in')
-rw-r--r--Build/source/utils/asymptote/runmath.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/Build/source/utils/asymptote/runmath.in b/Build/source/utils/asymptote/runmath.in
index 5e26311c53c..ed4ad9e7bc8 100644
--- a/Build/source/utils/asymptote/runmath.in
+++ b/Build/source/utils/asymptote/runmath.in
@@ -297,14 +297,14 @@ Int NOT(Int a)
Int CLZ(Int a)
{
- if((unsignedInt) a > 0xFFFFFFFF) return -1;
+ if((uint32_t) a > 0xFFFFFFFF) return -1;
return CLZ((uint32_t) a);
}
Int CTZ(Int a)
{
- if((unsignedInt) a > 0xFFFFFFFF) return -1;
-#ifdef __GNUC__
+ if((uint32_t) a > 0xFFFFFFFF) return -1;
+#if __GNUC_PREREQ(3,4)
return __builtin_ctz(a);
#else
// find the number of trailing zeros in a 32-bit number
@@ -312,7 +312,7 @@ Int CTZ(Int a)
0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
};
- return MultiplyDeBruijnBitPosition[((unsignedInt)((a & -a) * 0x077CB531U))
+ return MultiplyDeBruijnBitPosition[((uint32_t)((a & -a) * 0x077CB531U))
>> 27];
#endif
}