Skip to content

Commit de696d8

Browse files
committed
Fixed bug #69703 (Use __builtin_clzl on PowerPC) -- Patch by dja at axtens dot net
# Julien, even though 5.5 is still non security mode I don't think we should merge this patch but I leave the choice with you
1 parent 7611d1c commit de696d8

File tree

3 files changed

+1908
-1905
lines changed

3 files changed

+1908
-1905
lines changed

NEWS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PHP NEWS
1+
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? Jul 2015, PHP 5.6.11
44

@@ -14,6 +14,8 @@ PHP NEWS
1414
(Christoph M. Becker)
1515
. Fixed POST data processing slowdown due to small input buffer size
1616
on Windows. (Jorge Oliveira, Anatol)
17+
. Fixed bug #69703 (Use __builtin_clzl on PowerPC).
18+
(dja at axtens dot net, Kalle)
1719

1820
- GD:
1921
. Fixed bug #69479 (GD fails to build with newer libvpx). (Remi)

Zend/zend_alloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ static inline unsigned int zend_mm_high_bit(size_t _size)
678678
__asm {
679679
bsr eax, _size
680680
}
681-
#elif defined(__GNUC__) && (defined(__arm__) || defined(__aarch64__))
681+
#elif defined(__GNUC__) && (defined(__arm__) || defined(__aarch64__) || defined(__powerpc__))
682682
return (8 * SIZEOF_SIZE_T - 1) - __builtin_clzl(_size);
683683
#else
684684
unsigned int n = 0;
@@ -706,7 +706,7 @@ static inline unsigned int zend_mm_low_bit(size_t _size)
706706
__asm {
707707
bsf eax, _size
708708
}
709-
#elif defined(__GNUC__) && (defined(__arm__) || defined(__aarch64__))
709+
#elif defined(__GNUC__) && (defined(__arm__) || defined(__aarch64__) || defined(__powerpc__))
710710
return __builtin_ctzl(_size);
711711
#else
712712
static const int offset[16] = {4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0};

0 commit comments

Comments
 (0)