@@ -374,36 +374,28 @@ ZEND_API void zend_interned_strings_switch_storage(bool request)
374
374
}
375
375
}
376
376
377
+ #if defined(__GNUC__ ) && (defined(__i386__ ) || (defined(__x86_64__ ) && !defined(__ILP32__ )))
377
378
/* Even if we don't build with valgrind support, include the symbol so that valgrind available
378
379
* only at runtime will not result in false positives. */
379
380
#ifndef I_REPLACE_SONAME_FNNAME_ZU
380
381
# define I_REPLACE_SONAME_FNNAME_ZU (soname , fnname ) _vgr00000ZU_ ## soname ## _ ## fnname
381
382
#endif
382
383
383
384
/* See GH-9068 */
384
- #if defined(__GNUC__ ) && (__GNUC__ >= 11 || defined(__clang__ )) && __has_attribute (no_caller_saved_registers )
385
- # define NO_CALLER_SAVED_REGISTERS __attribute__((no_caller_saved_registers))
386
- # ifndef __clang__
387
- # pragma GCC push_options
388
- # pragma GCC target ("general-regs-only")
389
- # define POP_OPTIONS
390
- # endif
385
+ #if __has_attribute (noipa )
386
+ # define NOIPA __attribute__((noipa))
391
387
#else
392
- # define NO_CALLER_SAVED_REGISTERS
388
+ # define NOIPA
393
389
#endif
394
390
395
- 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 )
391
+ ZEND_API bool ZEND_FASTCALL I_REPLACE_SONAME_FNNAME_ZU (NONE ,zend_string_equal_val )(const zend_string * s1 , const zend_string * s2 )
396
392
{
397
393
return !memcmp (ZSTR_VAL (s1 ), ZSTR_VAL (s2 ), ZSTR_LEN (s1 ));
398
394
}
399
-
400
- #ifdef POP_OPTIONS
401
- # pragma GCC pop_options
402
- # undef POP_OPTIONS
403
395
#endif
404
396
405
397
#if defined(__GNUC__ ) && defined(__i386__ )
406
- ZEND_API bool ZEND_FASTCALL zend_string_equal_val (const zend_string * s1 , const zend_string * s2 )
398
+ ZEND_API zend_never_inline NOIPA bool ZEND_FASTCALL zend_string_equal_val (const zend_string * s1 , const zend_string * s2 )
407
399
{
408
400
const char * ptr = ZSTR_VAL (s1 );
409
401
size_t delta = (const char * )s2 - (const char * )s1 ;
@@ -441,7 +433,7 @@ ZEND_API bool ZEND_FASTCALL zend_string_equal_val(const zend_string *s1, const z
441
433
}
442
434
443
435
#elif defined(__GNUC__ ) && defined(__x86_64__ ) && !defined(__ILP32__ )
444
- ZEND_API bool ZEND_FASTCALL zend_string_equal_val (const zend_string * s1 , const zend_string * s2 )
436
+ ZEND_API zend_never_inline NOIPA bool ZEND_FASTCALL zend_string_equal_val (const zend_string * s1 , const zend_string * s2 )
445
437
{
446
438
const char * ptr = ZSTR_VAL (s1 );
447
439
size_t delta = (const char * )s2 - (const char * )s1 ;
0 commit comments