public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: H.J. Lu <hjl@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-8109] x86: Define _serialize as macro Date: Sat, 10 Apr 2021 13:00:24 +0000 (GMT) [thread overview] Message-ID: <20210410130024.98A86385700A@sourceware.org> (raw) https://gcc.gnu.org/g:71958f740f1b8c47a86ea222418abee395d254a0 commit r11-8109-g71958f740f1b8c47a86ea222418abee395d254a0 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Apr 9 11:44:32 2021 -0700 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. Diff: --- gcc/config/i386/serializeintrin.h | 7 +------ gcc/testsuite/gcc.target/i386/pr99744-2.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gcc/config/i386/serializeintrin.h b/gcc/config/i386/serializeintrin.h index 89b5b94ea9b..e280250b198 100644 --- a/gcc/config/i386/serializeintrin.h +++ b/gcc/config/i386/serializeintrin.h @@ -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__ diff --git a/gcc/testsuite/gcc.target/i386/pr99744-2.c b/gcc/testsuite/gcc.target/i386/pr99744-2.c new file mode 100644 index 00000000000..9cbefb04536 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr99744-2.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mserialize" } */ + +#include <x86intrin.h> + +__attribute__ ((target("general-regs-only"))) +void +foo1 (void) +{ + _serialize (); +}
reply other threads:[~2021-04-10 13:00 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210410130024.98A86385700A@sourceware.org \ --to=hjl@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).