x86: Define _serialize as macro
Define _serialize as macro for callers with general-regs-only target attribute to avoid inline failure with always_inline attribute. gcc/ PR target/99744 * config/i386/serializeintrin.h (_serialize): Defined as macro. gcc/testsuite/ PR target/99744 * gcc.target/i386/pr99744-2.c: New test.
This commit is contained in:
parent
22aede7a12
commit
71958f740f
@ -34,12 +34,7 @@
|
||||
#define __DISABLE_SERIALIZE__
|
||||
#endif /* __SERIALIZE__ */
|
||||
|
||||
extern __inline void
|
||||
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
|
||||
_serialize (void)
|
||||
{
|
||||
__builtin_ia32_serialize ();
|
||||
}
|
||||
#define _serialize() __builtin_ia32_serialize ()
|
||||
|
||||
#ifdef __DISABLE_SERIALIZE__
|
||||
#undef __DISABLE_SERIALIZE__
|
||||
|
11
gcc/testsuite/gcc.target/i386/pr99744-2.c
Normal file
11
gcc/testsuite/gcc.target/i386/pr99744-2.c
Normal file
@ -0,0 +1,11 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -mserialize" } */
|
||||
|
||||
#include <x86intrin.h>
|
||||
|
||||
__attribute__ ((target("general-regs-only")))
|
||||
void
|
||||
foo1 (void)
|
||||
{
|
||||
_serialize ();
|
||||
}
|
Loading…
Reference in New Issue
Block a user