@@ -378,36 +378,28 @@ ZEND_API void zend_interned_strings_switch_storage(bool request)
378
378
}
379
379
}
380
380
381
+ #if defined(__GNUC__ ) && (defined(__i386__ ) || (defined(__x86_64__ ) && !defined(__ILP32__ )))
381
382
/* Even if we don't build with valgrind support, include the symbol so that valgrind available
382
383
* only at runtime will not result in false positives. */
383
384
#ifndef I_REPLACE_SONAME_FNNAME_ZU
384
385
# define I_REPLACE_SONAME_FNNAME_ZU (soname , fnname ) _vgr00000ZU_ ## soname ## _ ## fnname
385
386
#endif
386
387
387
388
/* 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))
395
391
#else
396
- # define NO_CALLER_SAVED_REGISTERS
392
+ # define NOIPA
397
393
#endif
398
394
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 )
400
396
{
401
397
return !memcmp (ZSTR_VAL (s1 ), ZSTR_VAL (s2 ), ZSTR_LEN (s1 ));
402
398
}
403
-
404
- #ifdef POP_OPTIONS
405
- # pragma GCC pop_options
406
- # undef POP_OPTIONS
407
399
#endif
408
400
409
401
#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 )
411
403
{
412
404
const char * ptr = ZSTR_VAL (s1 );
413
405
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
445
437
}
446
438
447
439
#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 )
449
441
{
450
442
const char * ptr = ZSTR_VAL (s1 );
451
443
size_t delta = (const char * )s2 - (const char * )s1 ;
0 commit comments