Skip to content

Commit 0af1e41

Browse files
author
Gwynne Raskind
committed
Fix build under Clang 2.9 - see LLVM bug php#9164 (http://llvm.org/bugs/show_bug.cgi?id=9164). Tested with GCC and Clang on Darwin and Ubuntu.
1 parent 1c3d13e commit 0af1e41

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Zend/zend_operators.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,11 @@ static zend_always_inline int fast_sub_function(zval *result, zval *op1, zval *o
615615
"0:\n\t"
616616
"fildl (%2)\n\t"
617617
"fildl (%1)\n\t"
618+
#if defined(__clang__) && (__clang_major__ < 2 || (__clang_major__ == 2 && __clang_minor__ < 10))
619+
"fsubp %%st(1), %%st\n\t" // LLVM bug #9164
620+
#else
618621
"fsubp %%st, %%st(1)\n\t"
622+
#endif
619623
"movb $0x2,0xc(%0)\n\t"
620624
"fstpl (%0)\n"
621625
"1:"
@@ -635,7 +639,11 @@ static zend_always_inline int fast_sub_function(zval *result, zval *op1, zval *o
635639
"0:\n\t"
636640
"fildq (%2)\n\t"
637641
"fildq (%1)\n\t"
642+
#if defined(__clang__) && (__clang_major__ < 2 || (__clang_major__ == 2 && __clang_minor__ < 10))
643+
"fsubp %%st(1), %%st\n\t" // LLVM bug #9164
644+
#else
638645
"fsubp %%st, %%st(1)\n\t"
646+
#endif
639647
"movb $0x2,0x14(%0)\n\t"
640648
"fstpl (%0)\n"
641649
"1:"

0 commit comments

Comments
 (0)