diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index e4d7a745cba..7c92d88351a 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -2901,6 +2901,14 @@ static int 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] * 8; #else size_t *ti;