File tree Expand file tree Collapse file tree 3 files changed +23
-12
lines changed
Expand file tree Collapse file tree 3 files changed +23
-12
lines changed Original file line number Diff line number Diff line change 1414 libmysqlclient_with_mysqli :
1515 required : true
1616 type : boolean
17+ macos_arm64_version :
18+ required : true
19+ type : string
1720 run_alpine :
1821 required : true
1922 type : boolean
@@ -366,11 +369,11 @@ jobs:
366369 matrix :
367370 debug : [true, false]
368371 zts : [true, false]
369- os : ['13 ', '14 ']
372+ arch : ['X64 ', 'ARM64 ']
370373 exclude :
371- - os : ${{ !inputs.run_macos_arm64 && '14 ' || '*never*' }}
372- name : " MACOS_${{ matrix.os == '13' && 'X64' || 'ARM64' }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
373- runs-on : macos-${{ matrix.os }}
374+ - arch : ${{ !inputs.run_macos_arm64 && 'ARM64 ' || '*never*' }}
375+ name : " MACOS_${{ matrix.arch }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
376+ runs-on : macos-${{ matrix.arch == 'X64' && '15-intel' || inputs.macos_arm64_version }}
374377 steps :
375378 - name : git checkout
376379 uses : actions/checkout@v5
@@ -393,7 +396,7 @@ jobs:
393396 - name : Test
394397 uses : ./.github/actions/test-macos
395398 - name : Test Tracing JIT
396- if : matrix.os != '14 ' || !matrix.zts
399+ if : matrix.arch == 'X64 ' || !matrix.zts
397400 uses : ./.github/actions/test-macos
398401 with :
399402 jitType : tracing
@@ -405,7 +408,7 @@ jobs:
405408 runTestsParameters : >-
406409 -d opcache.enable_cli=1
407410 - name : Test Function JIT
408- if : matrix.os != '14 ' || !matrix.zts
411+ if : matrix.arch == 'X64 ' || !matrix.zts
409412 uses : ./.github/actions/test-macos
410413 with :
411414 jitType : function
Original file line number Diff line number Diff line change 5252 branch : ${{ matrix.branch.ref }}
5353 community_verify_type_inference : ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5454 libmysqlclient_with_mysqli : ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1) }}
55+ macos_arm64_version : ${{ ((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '15' || '14' }}
5556 run_alpine : ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5657 run_linux_ppc64 : ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5758 run_macos_arm64 : ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
Original file line number Diff line number Diff line change @@ -37,12 +37,8 @@ zend_result zend_jit_resolve_tsrm_ls_cache_offsets(
3737 }
3838
3939#if defined(__x86_64__ )
40- size_t * ti ;
41- __asm__ __volatile__(
42- "leaq __tsrm_ls_cache(%%rip),%0"
43- : "=r" (ti ));
44- * module_offset = ti [2 ];
45- * module_index = ti [1 ] * 8 ;
40+ * module_index = (size_t )-1 ;
41+ * module_offset = (size_t )-1 ;
4642
4743 return SUCCESS ;
4844#endif
@@ -67,6 +63,17 @@ void *zend_jit_tsrm_ls_cache_address(
6763 );
6864 return addr ;
6965 }
66+ if (module_index == (size_t )-1 && module_offset == (size_t )-1 ) {
67+ void * tlvp ;
68+ __asm__ __volatile__(
69+ "leaq __tsrm_ls_cache@TLVP(%%rip), %0\n"
70+ : "=&r" (tlvp )
71+ :
72+ : "memory"
73+ );
74+ void * (* thunk )(void * ) = * (void * * )tlvp ;
75+ return thunk (tlvp );
76+ }
7077 if (module_index != (size_t )-1 && module_offset != (size_t )-1 ) {
7178 char * base ;
7279 __asm__ __volatile__(
You can’t perform that action at this time.
0 commit comments