1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix ZTS+JIT build on non-glibc/musl/freebsd/macos/win platforms

Fixes GH-19657
Closes GH-19667
This commit is contained in:
Arnaud Le Blanc
2025-09-02 09:56:46 +02:00
parent e84393104a
commit 3625cbb344
4 changed files with 8 additions and 0 deletions

2
NEWS
View File

@@ -19,6 +19,8 @@ PHP NEWS
. Fixed bug GH-19486 (Incorrect opline after deoptimization). (Arnaud)
. Fixed bug GH-19601 (Wrong JIT stack setup on aarch64/clang). (Arnaud)
. Fixed bug GH-19388 (Broken opcache.huge_code_pages). (Arnaud)
. Fixed bug GH-19657 (Build fails on non-glibc/musl/freebsd/macos/win
platforms). (Arnaud)
- PCRE:
. Upgraded to pcre2lib from 10.45 to 10.46. (nielsdos)

View File

@@ -238,6 +238,7 @@ void *zend_jit_tsrm_ls_cache_address(
size_t module_index,
size_t module_offset
) {
#ifndef USE_FALLBACK
char *thread_pointer;
__asm__ __volatile__(
"mrs %0, tpidr_el0\n"
@@ -251,5 +252,6 @@ void *zend_jit_tsrm_ls_cache_address(
dtv_pointer_t *dtv = *(dtv_pointer_t**)((uintptr_t)thread_pointer + DTV_OFFSET);
return (void*)(((dtv_pointer_t*)((char*)dtv + module_index))->val + module_offset);
}
#endif
return NULL;
}

View File

@@ -222,6 +222,7 @@ void *zend_jit_tsrm_ls_cache_address(
size_t module_index,
size_t module_offset
) {
#ifndef USE_FALLBACK
char *thread_pointer;
__asm__ __volatile__(
"movl %%gs:0, %0\n"
@@ -235,5 +236,6 @@ void *zend_jit_tsrm_ls_cache_address(
dtv_pointer_t *dtv = *(dtv_pointer_t**)((uintptr_t)thread_pointer + DTV_OFFSET);
return (void*)(((dtv_pointer_t*)((char*)dtv + module_index))->val + module_offset);
}
#endif
return NULL;
}

View File

@@ -205,6 +205,7 @@ void *zend_jit_tsrm_ls_cache_address(
size_t module_index,
size_t module_offset
) {
#ifndef USE_FALLBACK
char *thread_pointer;
__asm__ __volatile__(
"movq %%fs:0, %0\n"
@@ -218,5 +219,6 @@ void *zend_jit_tsrm_ls_cache_address(
dtv_pointer_t *dtv = *(dtv_pointer_t**)((uintptr_t)thread_pointer + DTV_OFFSET);
return (void*)(((dtv_pointer_t*)((char*)dtv + module_index))->val + module_offset);
}
#endif
return NULL;
}