Skip to content

Commit 71cccc0

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: Fix TLS access in JIT with MUSL (#13329)
2 parents eb76a83 + 667b08c commit 71cccc0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3256,6 +3256,14 @@ static void zend_jit_setup(void)
32563256
asm ("movq _tsrm_ls_cache@gottpoff(%%rip),%0"
32573257
: "=r" (ret));
32583258
tsrm_ls_cache_tcb_offset = ret;
3259+
#elif defined(__MUSL__)
3260+
size_t *ti;
3261+
3262+
__asm__(
3263+
"leaq _tsrm_ls_cache@tlsgd(%%rip), %0\n"
3264+
: "=a" (ti));
3265+
tsrm_tls_offset = ti[1];
3266+
tsrm_tls_index = ti[0] * 16;
32593267
#else
32603268
size_t *ti;
32613269

0 commit comments

Comments
 (0)