File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff 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__(
You can’t perform that action at this time.
0 commit comments