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

From: Date: Mon, 11 Jun 2018 03:45:37 +0000
Subject: Bug #76429 [Asn]: 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-215593@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
 Updated by:         laruence@php.net
 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:

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


Previous Comments:
------------------------------------------------------------------------
[2018-06-09 13:55:55] cmb@php.net

It seems that AVX support has been introduced with commit
5c05870[1].  @laruence, could you please have a look at this
issue?

[1] <http://git.php.net/?p=php-src.git;a=commit;h=5c05870ef65834f5a2c5cb5baddee07cba9399dc>

------------------------------------------------------------------------
[2018-06-08 01:16:53] eva2000 at centminmod dot com

Description:
------------
Test source compile of PHP 7.3.0alpha1 results in failure at opcache section but only on Intel Xeon
Gold Skylake server with CentOS 7.5 64bit (running in Ubuntu 18.04 LTS with LXD 3.1 based CentOS 7.5
container https://github.com/centminmod/centminmod-lxd).
PHP 7.3.0alpha + Zend Opcache successfully compiles on Xeon E3-1270v1 Sandybridge system though.
Both Xeon Gold Skylake and Xeon E3-1270v1 systems using CentOS 7.5 GCC 4.8.5

make stage:

/bin/sh /svr-setup/php-7.3.0alpha1/fpm-build/libtool --silent --preserve-dup-deps --mode=compile
ccache /usr/bin/gcc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/opcache/
-I/svr-setup/php-7.3.0alpha1/ext/opcache/ -DPHP_ATOM_INC
-I/svr-setup/php-7.3.0alpha1/fpm-build/include -I/svr-setup/php-7.3.0alpha1/fpm-build/main
-I/svr-setup/php-7.3.0alpha1 -I/svr-setup/php-7.3.0alpha1/fpm-build/ext/date/lib
-I/svr-setup/php-7.3.0alpha1/ext/date/lib -I/usr/include/libxml2 -I/usr/include/enchant -I/usr/X11
-I/usr/include/freetype2 -I/usr/include/imap -I/svr-setup/php-7.3.0alpha1/ext/mbstring/oniguruma
-I/svr-setup/php-7.3.0alpha1/fpm-build/ext/mbstring/oniguruma
-I/svr-setup/php-7.3.0alpha1/ext/mbstring/libmbfl
-I/svr-setup/php-7.3.0alpha1/fpm-build/ext/mbstring/libmbfl
-I/svr-setup/php-7.3.0alpha1/ext/mbstring/libmbfl/mbfl
-I/svr-setup/php-7.3.0alpha1/fpm-build/ext/mbstring/libmbfl/mbfl
-I/svr-setup/php-7.3.0alpha1/ext/sqlite3/libsqlite -I/usr/include/pspell -I/usr/local/include
-I/svr-set!
 up/php-7.3.0alpha1/fpm-build/TSRM -I/svr-setup/php-7.3.0alpha1/fpm-build/Zend
-I/svr-setup/php-7.3.0alpha1/main -I/svr-setup/php-7.3.0alpha1/Zend
-I/svr-setup/php-7.3.0alpha1/TSRM -I/svr-setup/php-7.3.0alpha1/fpm-build/    -I/usr/include -O3 -m64
-march=core-avx2 -pipe -gsplit-dwarf -fvisibility=hidden -DZEND_SIGNALS    -c
/svr-setup/php-7.3.0alpha1/ext/opcache/zend_accelerator_util_funcs.c -o
ext/opcache/zend_accelerator_util_funcs.lo 
/svr-setup/php-7.3.0alpha1/ext/opcache/zend_accelerator_util_funcs.c: In function
‘zend_accel_load_script’:
/svr-setup/php-7.3.0alpha1/ext/opcache/zend_accelerator_util_funcs.c:662:2: error: unknown register
name ‘%ymm1’ in ‘asm’
  __asm__ volatile (
  ^
/svr-setup/php-7.3.0alpha1/ext/opcache/zend_accelerator_util_funcs.c:662:2: error: unknown register
name ‘%ymm0’ in ‘asm’
make: *** [ext/opcache/zend_accelerator_util_funcs.lo] Error 1


lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 94
Model name:            Intel Core Processor (Skylake, IBRS)
Stepping:              3
CPU MHz:               2099.998
BogoMIPS:              4199.99
Hypervisor vendor:     KVM
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              4096K
NUMA node0 CPU(s):     0-3
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36
clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology
cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes
xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust
bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb
avx512cd avx512bw 

gcc -c -Q -march=native --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                                 [enabled]
  -maccumulate-outgoing-args            [disabled]
  -maddress-mode=                       short
  -madx                                 [enabled]
  -maes                                 [enabled]
  -malign-double                        [disabled]
  -malign-functions=                    0
  -malign-jumps=                        0
  -malign-loops=                        0
  -malign-stringops                     [enabled]
  -mandroid                             [disabled]
  -march=                               core-avx2
  -masm=                                att
  -mavx                                 [enabled]
  -mavx2                                [enabled]
  -mavx256-split-unaligned-load         [disabled]
  -mavx256-split-unaligned-store        [disabled]
  -mbionic                              [disabled]
  -mbmi                                 [enabled]
  -mbmi2                                [enabled]
  -mbranch-cost=                        0
  -mcld                                 [disabled]
  -mcmodel=                             32
  -mcpu=                      
  -mcrc32                               [disabled]
  -mcx16                                [enabled]
  -mdispatch-scheduler                  [disabled]
  -mf16c                                [enabled]
  -mfancy-math-387                      [enabled]
  -mfentry                              [enabled]
  -mfma                                 [enabled]
  -mfma4                                [disabled]
  -mforce-drap                          [disabled]
  -mfp-ret-in-387                       [enabled]
  -mfpmath=                             387
  -mfsgsbase                            [enabled]
  -mfunction-return=                    keep
  -mfused-madd                
  -mfxsr                                [enabled]
  -mglibc                               [enabled]
  -mhard-float                          [enabled]
  -mhle                                 [enabled]
  -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                               [enabled]
  -mmmx                                 [disabled]
  -mmovbe                               [enabled]
  -mms-bitfields                        [disabled]
  -mno-align-stringops                  [disabled]
  -mno-fancy-math-387                   [disabled]
  -mno-push-args                        [disabled]
  -mno-red-zone                         [disabled]
  -mno-sse4                             [disabled]
  -momit-leaf-frame-pointer             [disabled]
  -mpc32                                [disabled]
  -mpc64                                [disabled]
  -mpc80                                [disabled]
  -mpclmul                              [enabled]
  -mpku                                 [disabled]
  -mpopcnt                              [enabled]
  -mprefer-avx128                       [disabled]
  -mpreferred-stack-boundary=           0
  -mprfchw                              [enabled]
  -mpush-args                           [enabled]
  -mrdrnd                               [enabled]
  -mrdseed                              [enabled]
  -mrecip                               [disabled]
  -mrecip=                    
  -mred-zone                            [enabled]
  -mregparm=                            0
  -mrtd                                 [disabled]
  -mrtm                                 [enabled]
  -msahf                                [enabled]
  -msoft-float                          [disabled]
  -msse                                 [enabled]
  -msse2                                [enabled]
  -msse2avx                             [disabled]
  -msse3                                [enabled]
  -msse4                                [enabled]
  -msse4.1                              [enabled]
  -msse4.2                              [enabled]
  -msse4a                               [disabled]
  -msse5                      
  -msseregparm                          [disabled]
  -mssse3                               [enabled]
  -mstack-arg-probe                     [disabled]
  -mstackrealign                        [enabled]
  -mstringop-strategy=                  [default]
  -mtbm                                 [disabled]
  -mtls-dialect=                        gnu
  -mtls-direct-seg-refs                 [enabled]
  -mtune=                               generic
  -muclibc                              [disabled]
  -mveclibabi=                          [default]
  -mvect8-ret-in-mem                    [disabled]
  -mvzeroupper                          [disabled]
  -mx32                                 [disabled]
  -mxop                                 [disabled]
  -mxsave                               [enabled]
  -mxsaveopt                            [enabled]

configure

../configure --enable-fpm --enable-opcache --enable-intl --enable-pcntl --with-mcrypt --with-snmp
--enable-embed=shared --with-mhash --with-zlib --with-gettext --enable-exif --enable-zip
--with-libzip --with-bz2 --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem
--enable-sysvshm --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd
--with-libdir=lib64 --with-mysqli=mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock --with-curl
--with-gd --with-xmlrpc --enable-bcmath --enable-calendar  --enable-ftp --enable-gd-native-ttf
--with-freetype-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr
--with-webp-dir=/usr --with-t1lib=/usr --enable-pdo --with-pdo-sqlite --with-pdo-mysql=mysqlnd
--enable-inline-optimization --with-imap --with-imap-ssl --with-kerberos --with-readline
--with-libedit --with-gmp --with-pspell --with-tidy --with-enchant --with-fpm-user=nginx
--with-fpm-group=nginx --disable-fileinfo --with-ldap --with-l!
 dap-sasl --with-password-argon2 --with-sodium --with-config-file-scan-dir=/etc/centminmod/php.d
--with-xsl


Expected result:
----------------
expected it to compile successfully like it does with PHP 7.2.6 and 7.3.0alpha1 on non-skylake cpus 

i.e. Xeon E3-1270v1 Sandybridge compiles fine

php -v
PHP 7.3.0alpha1 (cli) (built: Jun  8 2018 00:51:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.0alpha1, Copyright (c) 1999-2018, by Zend Technologies

php --ri "Zend Opcache"

Zend OPcache

Opcode Caching => Disabled
Optimization => Disabled
SHM Cache => Enabled
File Cache => Disabled
Startup Failed => Opcode Caching is disabled for CLI

Directive => Local Value => Master Value
opcache.enable => On => On
opcache.use_cwd => On => On
opcache.validate_timestamps => On => On
opcache.validate_permission => Off => Off
opcache.validate_root => Off => Off
opcache.dups_fix => Off => Off
opcache.revalidate_path => Off => Off
opcache.log_verbosity_level => 1 => 1
opcache.memory_consumption => 784 => 784
opcache.interned_strings_buffer => 8 => 8
opcache.max_accelerated_files => 65407 => 65407
opcache.max_wasted_percentage => 5 => 5
opcache.consistency_checks => 0 => 0
opcache.force_restart_timeout => 180 => 180
opcache.revalidate_freq => 180 => 180
opcache.file_update_protection => 2 => 2
opcache.preferred_memory_model => no value => no value
opcache.blacklist_filename => no value => no value
opcache.max_file_size => 0 => 0
opcache.protect_memory => 0 => 0
opcache.save_comments => 1 => 1
opcache.optimization_level => 0x7FFEBFFF => 0x7FFEBFFF
opcache.opt_debug_level => 0 => 0
opcache.enable_file_override => On => On
opcache.enable_cli => Off => Off
opcache.error_log => no value => no value
opcache.restrict_api => no value => no value
opcache.lockfile_path => /tmp => /tmp
opcache.file_cache => no value => no value
opcache.file_cache_only => 0 => 0
opcache.file_cache_consistency_checks 



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=76429&edit=1


Thread (10 messages)

« previous php.bugs (#215593) next »