@@ -378,36 +378,28 @@ ZEND_API void zend_interned_strings_switch_storage(bool request)
378378 }
379379}
380380
381+ #if defined(__GNUC__ ) && (defined(__i386__ ) || (defined(__x86_64__ ) && !defined(__ILP32__ )))
381382/* Even if we don't build with valgrind support, include the symbol so that valgrind available
382383 * only at runtime will not result in false positives. */
383384#ifndef I_REPLACE_SONAME_FNNAME_ZU
384385# define I_REPLACE_SONAME_FNNAME_ZU (soname , fnname ) _vgr00000ZU_ ## soname ## _ ## fnname
385386#endif
386387
387388/* See GH-9068 */
388- #if defined(__GNUC__ ) && (__GNUC__ >= 11 || defined(__clang__ )) && __has_attribute (no_caller_saved_registers )
389- # define NO_CALLER_SAVED_REGISTERS __attribute__((no_caller_saved_registers))
390- # ifndef __clang__
391- # pragma GCC push_options
392- # pragma GCC target ("general-regs-only")
393- # define POP_OPTIONS
394- # endif
389+ #if __has_attribute (noipa )
390+ # define NOIPA __attribute__((noipa))
395391#else
396- # define NO_CALLER_SAVED_REGISTERS
392+ # define NOIPA
397393#endif
398394
399- ZEND_API bool ZEND_FASTCALL NO_CALLER_SAVED_REGISTERS I_REPLACE_SONAME_FNNAME_ZU (NONE ,zend_string_equal_val )(const zend_string * s1 , const zend_string * s2 )
395+ ZEND_API bool ZEND_FASTCALL I_REPLACE_SONAME_FNNAME_ZU (NONE ,zend_string_equal_val )(const zend_string * s1 , const zend_string * s2 )
400396{
401397 return !memcmp (ZSTR_VAL (s1 ), ZSTR_VAL (s2 ), ZSTR_LEN (s1 ));
402398}
403-
404- #ifdef POP_OPTIONS
405- # pragma GCC pop_options
406- # undef POP_OPTIONS
407399#endif
408400
409401#if defined(__GNUC__ ) && defined(__i386__ )
410- ZEND_API bool ZEND_FASTCALL zend_string_equal_val (const zend_string * s1 , const zend_string * s2 )
402+ ZEND_API zend_never_inline NOIPA bool ZEND_FASTCALL zend_string_equal_val (const zend_string * s1 , const zend_string * s2 )
411403{
412404 const char * ptr = ZSTR_VAL (s1 );
413405 size_t delta = (const char * )s2 - (const char * )s1 ;
@@ -445,7 +437,7 @@ ZEND_API bool ZEND_FASTCALL zend_string_equal_val(const zend_string *s1, const z
445437}
446438
447439#elif defined(__GNUC__ ) && defined(__x86_64__ ) && !defined(__ILP32__ )
448- ZEND_API bool ZEND_FASTCALL zend_string_equal_val (const zend_string * s1 , const zend_string * s2 )
440+ ZEND_API zend_never_inline NOIPA bool ZEND_FASTCALL zend_string_equal_val (const zend_string * s1 , const zend_string * s2 )
449441{
450442 const char * ptr = ZSTR_VAL (s1 );
451443 size_t delta = (const char * )s2 - (const char * )s1 ;
0 commit comments