@@ -364,36 +364,28 @@ ZEND_API void zend_interned_strings_switch_storage(bool request)
364
364
}
365
365
}
366
366
367
+ #if defined(__GNUC__ ) && (defined(__i386__ ) || (defined(__x86_64__ ) && !defined(__ILP32__ )))
367
368
/* Even if we don't build with valgrind support, include the symbol so that valgrind available
368
369
* only at runtime will not result in false positives. */
369
370
#ifndef I_REPLACE_SONAME_FNNAME_ZU
370
371
# define I_REPLACE_SONAME_FNNAME_ZU (soname , fnname ) _vgr00000ZU_ ## soname ## _ ## fnname
371
372
#endif
372
373
373
374
/* See GH-9068 */
374
- #if defined(__GNUC__ ) && (__GNUC__ >= 11 || defined(__clang__ )) && __has_attribute (no_caller_saved_registers )
375
- # define NO_CALLER_SAVED_REGISTERS __attribute__((no_caller_saved_registers))
376
- # ifndef __clang__
377
- # pragma GCC push_options
378
- # pragma GCC target ("general-regs-only")
379
- # define POP_OPTIONS
380
- # endif
375
+ #if __has_attribute (noipa )
376
+ # define NOIPA __attribute__((noipa))
381
377
#else
382
- # define NO_CALLER_SAVED_REGISTERS
378
+ # define NOIPA
383
379
#endif
384
380
385
- 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 )
381
+ ZEND_API bool ZEND_FASTCALL I_REPLACE_SONAME_FNNAME_ZU (NONE ,zend_string_equal_val )(const zend_string * s1 , const zend_string * s2 )
386
382
{
387
383
return !memcmp (ZSTR_VAL (s1 ), ZSTR_VAL (s2 ), ZSTR_LEN (s1 ));
388
384
}
389
-
390
- #ifdef POP_OPTIONS
391
- # pragma GCC pop_options
392
- # undef POP_OPTIONS
393
385
#endif
394
386
395
387
#if defined(__GNUC__ ) && defined(__i386__ )
396
- ZEND_API bool ZEND_FASTCALL zend_string_equal_val (const zend_string * s1 , const zend_string * s2 )
388
+ ZEND_API zend_never_inline NOIPA bool ZEND_FASTCALL zend_string_equal_val (const zend_string * s1 , const zend_string * s2 )
397
389
{
398
390
const char * ptr = ZSTR_VAL (s1 );
399
391
size_t delta = (const char * )s2 - (const char * )s1 ;
@@ -431,7 +423,7 @@ ZEND_API bool ZEND_FASTCALL zend_string_equal_val(const zend_string *s1, const z
431
423
}
432
424
433
425
#elif defined(__GNUC__ ) && defined(__x86_64__ ) && !defined(__ILP32__ )
434
- ZEND_API bool ZEND_FASTCALL zend_string_equal_val (const zend_string * s1 , const zend_string * s2 )
426
+ ZEND_API zend_never_inline NOIPA bool ZEND_FASTCALL zend_string_equal_val (const zend_string * s1 , const zend_string * s2 )
435
427
{
436
428
const char * ptr = ZSTR_VAL (s1 );
437
429
size_t delta = (const char * )s2 - (const char * )s1 ;
0 commit comments