File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,12 @@ zend_result zend_jit_resolve_tsrm_ls_cache_offsets(
3737 }
3838
3939#if defined(__x86_64__ )
40- * module_index = (size_t )-1 ;
41- * module_offset = (size_t )-1 ;
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 ;
4246
4347 return SUCCESS ;
4448#endif
@@ -63,17 +67,6 @@ void *zend_jit_tsrm_ls_cache_address(
6367 );
6468 return addr ;
6569 }
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- }
7770 if (module_index != (size_t )-1 && module_offset != (size_t )-1 ) {
7871 char * base ;
7972 __asm__ __volatile__(
You can’t perform that action at this time.
0 commit comments