Skip to content

Commit 1f4bf5d

Browse files
committed
Merge branch 'PHP-8.5'
2 parents 02e38fe + dae172d commit 1f4bf5d

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

.github/workflows/nightly.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
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

.github/workflows/root.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
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 }}

ext/opcache/jit/tls/zend_jit_tls_darwin.c

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff 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__(

0 commit comments

Comments
 (0)