Bug #76429 [Com]: zend_accelerator_util_funcs.c error: unknown register name ‘%ymm0’ in ‘asm

From: Date: Fri, 22 Jun 2018 17:58:56 +0000
Subject: Bug #76429 [Com]: zend_accelerator_util_funcs.c error: unknown register name ‘%ymm0’ in ‘asm
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215875@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76429&edit=1 ID: 76429 Comment by: eva2000 at centminmod dot com Reported by: eva2000 at centminmod dot com Summary: zend_accelerator_util_funcs.c error: unknown register name ‘%ymm0’ in ‘asm Status: Assigned Type: Bug Package: opcache Operating System: centos 7.5 PHP Version: 7.3.0alpha1 Assigned To: laruence Block user comment: N Private report: N New Comment: sorry for late reply getting same error on a upcloud.com KVM VPS with E5-2687w v4 cpu too and here's target output for CentOS 7.5 GCC 4.8.5 and indeed these 2 are disabled ! -mavx [disabled] -mavx2 [disabled] gcc -c -Q -march=core-avx2 --help=target The following options are target specific: -m128bit-long-double [disabled] -m32 [disabled] -m3dnow [disabled] -m3dnowa [disabled] -m64 [enabled] -m80387 [enabled] -m8bit-idiv [disabled] -m96bit-long-double [enabled] -mabi= sysv -mabm [disabled] -maccumulate-outgoing-args [disabled] -maddress-mode= short -madx [disabled] -maes [disabled] -malign-double [disabled] -malign-functions= 0 -malign-jumps= 0 -malign-loops= 0 -malign-stringops [enabled] -mandroid [disabled] -march= core-avx2 -masm= att -mavx [disabled] -mavx2 [disabled] -mavx256-split-unaligned-load [disabled] -mavx256-split-unaligned-store [disabled] -mbionic [disabled] -mbmi [disabled] -mbmi2 [disabled] -mbranch-cost= 0 -mcld [disabled] -mcmodel= 32 -mcpu= -mcrc32 [disabled] -mcx16 [disabled] -mdispatch-scheduler [disabled] -mf16c [disabled] -mfancy-math-387 [enabled] -mfentry [enabled] -mfma [disabled] -mfma4 [disabled] -mforce-drap [disabled] -mfp-ret-in-387 [enabled] -mfpmath= 387 -mfsgsbase [disabled] -mfunction-return= keep -mfused-madd -mfxsr [disabled] -mglibc [enabled] -mhard-float [enabled] -mhle [disabled] -mieee-fp [enabled] -mincoming-stack-boundary= 0 -mindirect-branch-register [disabled] -mindirect-branch= keep -minline-all-stringops [disabled] -minline-stringops-dynamically [disabled] -mintel-syntax -mlarge-data-threshold= 0x10000 -mlong-double-64 [disabled] -mlong-double-80 [enabled] -mlwp [disabled] -mlzcnt [disabled] -mmmx [disabled] -mmovbe [disabled] -mms-bitfields [disabled] -mno-align-stringops [disabled] -mno-fancy-math-387 [disabled] -mno-push-args [disabled] -mno-red-zone [disabled] -mno-sse4 [enabled] -momit-leaf-frame-pointer [disabled] -mpc32 [disabled] -mpc64 [disabled] -mpc80 [disabled] -mpclmul [disabled] -mpku [disabled] -mpopcnt [disabled] -mprefer-avx128 [disabled] -mpreferred-stack-boundary= 0 -mprfchw [disabled] -mpush-args [enabled] -mrdrnd [disabled] -mrdseed [disabled] -mrecip [disabled] -mrecip= -mred-zone [enabled] -mregparm= 0 -mrtd [disabled] -mrtm [disabled] -msahf [disabled] -msoft-float [disabled] -msse [disabled] -msse2 [disabled] -msse2avx [disabled] -msse3 [disabled] -msse4 [disabled] -msse4.1 [disabled] -msse4.2 [disabled] -msse4a [disabled] -msse5 -msseregparm [disabled] -mssse3 [disabled] -mstack-arg-probe [disabled] -mstackrealign [enabled] -mstringop-strategy= [default] -mtbm [disabled] -mtls-dialect= gnu -mtls-direct-seg-refs [enabled] -mtune= -muclibc [disabled] -mveclibabi= [default] -mvect8-ret-in-mem [disabled] -mvzeroupper [disabled] -mx32 [disabled] -mxop [disabled] -mxsave [disabled] -mxsaveopt [disabled] Known assembler dialects (for use with the -masm-dialect= option): att intel Known ABIs (for use with the -mabi= option): ms sysv Known code models (for use with the -mcmodel= option): 32 kernel large medium small Valid arguments to -mfpmath=: 387 387+sse 387,sse both sse sse+387 sse,387 Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options): keep thunk thunk-extern thunk-inline Known vectorization library ABIs (for use with the -mveclibabi= option): acml svml Known address mode (for use with the -maddress-mode= option): long short Valid arguments to -mstringop-strategy=: byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop Known TLS dialects (for use with the -mtls-dialect= option): gnu gnu2 Previous Comments: ------------------------------------------------------------------------ [2018-06-12 04:08:32] laruence@php.net okey, thanks. but the problem is not about avx instructions, it about gcc doesn't recognize ymm0 in inline asm.. so I was asking to print gcc --help=target to check if it is explictly supported. the problem may relates to old gcc bug (I remembered that gcc before 4.9 has problems while supporting __AVX__ in __target() attribute, but not sure if it relates to this case). ------------------------------------------------------------------------ [2018-06-11 13:15:30] spam2 at rhsoft dot net @laruence@php.net what i said is that -mavx ist a GCC tuning-option which is unrelated to explicit AVX instructions in the code itself if AVX in fact is not available on the CPU and defined(__AVX__) is true there is something wrong in the detection or the logic "defined(__AVX__) || defined(__SSE2__)" but -mavx or -march don't change anything here because these are GCC flags for automatically use AVX on not hand-optimized code like transform SSE-code to AVX or auto-vectorization -mavx / -march are related to https://gcc.gnu.org/projects/tree-ssa/vectorization.html and not to http://git.php.net/?p=php-src.git;a=commit;h=5c05870ef65834f5a2c5cb5baddee07cba9399dc ------------------------------------------------------------------------ [2018-06-11 13:05:37] laruence@php.net @spam2 at rhsoft dot net I am not sure I understand you correctly. I am asking you to try to figure out why __AVX__ is defined but ymm0 is not supported by add -mavx or gcc -c -Q -march=core-avx2 --help=target ------------------------------------------------------------------------ [2018-06-11 09:43:47] spam2 at rhsoft dot net laruence@php.net -mavx / -march are completly irrelevant to the AVX support in the code because one is using a AVX optimized branch if the CPU supports it at runtime for generic binaries and the other is auto-optimization by the complier for code which is not hand optimized and non-generic binaries ------------------------------------------------------------------------ [2018-06-11 03:45:35] laruence@php.net you may try to add -mavx to your configuration... and, you are trying compile with -march=core-avx2 which is not the same as -march=native which you are debugging thanks ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=76429 -- Edit this bug report at https://bugs.php.net/bug.php?id=76429&edit=1

« previous php.bugs (#215875) next »