From: Uros Bizjak <ubizjak@gmail.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] x86: Add __cpuidex and include guard to <cpuid.h>
Date: Sun, 19 Jul 2020 09:19:01 +0200 [thread overview]
Message-ID: <CAFULd4ZPRZeS0PbyMtrdyJW75LeX8rJAo47ocLdGqmPfSaEJbQ@mail.gmail.com> (raw)
> Add
>
> void __cpuidex (int __cpuid_info[4], int __leaf, int __subleaf);
>
> as well as include guard to <cpuid.h>.
>
> gcc/
>
> PR target/95973
> PR target/96238
> * config/i386/cpuid.h: Add include guard.
> (__cpuidex): New.
>
> gcc/testsuite/
>
> PR target/95973
> PR target/96238
> * gcc.target/i386/pr95973.c: New test.
OK.
+ if (cpuid_info[0] != eax
+ || cpuid_info[1] != ebx
+ || cpuid_info[2] != ecx
+ || cpuid_info[3] != edx)
+ abort ();
You can use __builtin_abort here to avoid inclusion of stdlib.h.
Thanks,
Uros.
next reply other threads:[~2020-07-19 7:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-19 7:19 Uros Bizjak [this message]
2020-07-19 11:09 ` H.J. Lu
-- strict thread matches above, loose matches on Subject: below --
2020-07-18 11:52 H.J. Lu
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=CAFULd4ZPRZeS0PbyMtrdyJW75LeX8rJAo47ocLdGqmPfSaEJbQ@mail.gmail.com \
--to=ubizjak@gmail.com \
--cc=gcc-patches@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: link
Be 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).