From 0af1e412a405177fbc0252e4b2dc801d2c048588 Mon Sep 17 00:00:00 2001 From: Gwynne Raskind Date: Sun, 7 Aug 2011 05:20:49 +0000 Subject: [PATCH] Fix build under Clang 2.9 - see LLVM bug #9164 (http://llvm.org/bugs/show_bug.cgi?id=9164). Tested with GCC and Clang on Darwin and Ubuntu. --- Zend/zend_operators.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 8e3a37eee7..65db22b790 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -615,7 +615,11 @@ static zend_always_inline int fast_sub_function(zval *result, zval *op1, zval *o "0:\n\t" "fildl (%2)\n\t" "fildl (%1)\n\t" +#if defined(__clang__) && (__clang_major__ < 2 || (__clang_major__ == 2 && __clang_minor__ < 10)) + "fsubp %%st(1), %%st\n\t" // LLVM bug #9164 +#else "fsubp %%st, %%st(1)\n\t" +#endif "movb $0x2,0xc(%0)\n\t" "fstpl (%0)\n" "1:" @@ -635,7 +639,11 @@ static zend_always_inline int fast_sub_function(zval *result, zval *op1, zval *o "0:\n\t" "fildq (%2)\n\t" "fildq (%1)\n\t" +#if defined(__clang__) && (__clang_major__ < 2 || (__clang_major__ == 2 && __clang_minor__ < 10)) + "fsubp %%st(1), %%st\n\t" // LLVM bug #9164 +#else "fsubp %%st, %%st(1)\n\t" +#endif "movb $0x2,0x14(%0)\n\t" "fstpl (%0)\n" "1:" -- 2.50.1