Skip to content

Commit

Permalink
Merge branch 'PHP-8.3'
Browse files Browse the repository at this point in the history
* PHP-8.3:
  Fix TLS access in JIT with MUSL (#13329)
  • Loading branch information
dstogov committed Feb 12, 2024
2 parents eb76a83 + 667b08c commit 71cccc0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ext/opcache/jit/zend_jit_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -3256,6 +3256,14 @@ static void zend_jit_setup(void)
asm ("movq _tsrm_ls_cache@gottpoff(%%rip),%0"
: "=r" (ret));
tsrm_ls_cache_tcb_offset = ret;
#elif defined(__MUSL__)
size_t *ti;

__asm__(
"leaq _tsrm_ls_cache@tlsgd(%%rip), %0\n"
: "=a" (ti));
tsrm_tls_offset = ti[1];
tsrm_tls_index = ti[0] * 16;
#else
size_t *ti;

Expand Down

0 comments on commit 71cccc0

Please sign in to comment.