public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Giuliano Belinassi <giulianob@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/autopar_devel] jit: implement BT_CONST_VOLATILE_PTR [PR 95306] Date: Sat, 22 Aug 2020 21:56:25 +0000 (GMT) [thread overview] Message-ID: <20200822215625.BBCF13861012@sourceware.org> (raw) https://gcc.gnu.org/g:db97c1875901cd3e2d95e3624eea042b8a84aafc commit db97c1875901cd3e2d95e3624eea042b8a84aafc Author: David Malcolm <dmalcolm@redhat.com> Date: Wed Jun 3 08:59:23 2020 -0400 jit: implement BT_CONST_VOLATILE_PTR [PR 95306] gcc/jit/ChangeLog: PR jit/95306 * jit-builtins.c (builtins_manager::make_primitive_type): Implement BT_CONST_VOLATILE_PTR. gcc/testsuite/ChangeLog: PR jit/95306 * jit.dg/test-pr95306-builtin-types.c (create_code): Add test of getting __atomic_load. Diff: --- gcc/jit/jit-builtins.c | 4 +++- gcc/testsuite/jit.dg/test-pr95306-builtin-types.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/jit/jit-builtins.c b/gcc/jit/jit-builtins.c index 4842ff3ea96..56a79b4e249 100644 --- a/gcc/jit/jit-builtins.c +++ b/gcc/jit/jit-builtins.c @@ -513,7 +513,9 @@ builtins_manager::make_primitive_type (enum jit_builtin_type type_id) case BT_VOLATILE_PTR: return (m_ctxt->get_type (GCC_JIT_TYPE_VOID)->get_volatile () ->get_pointer ()); - // case BT_CONST_VOLATILE_PTR: + case BT_CONST_VOLATILE_PTR: + return (m_ctxt->get_type (GCC_JIT_TYPE_VOID)->get_const () + ->get_volatile ()->get_pointer ()); // case BT_PTRMODE: case BT_INT_PTR: return m_ctxt->get_type (GCC_JIT_TYPE_INT)->get_pointer (); diff --git a/gcc/testsuite/jit.dg/test-pr95306-builtin-types.c b/gcc/testsuite/jit.dg/test-pr95306-builtin-types.c index 6c3b087ab98..960163ed7d4 100644 --- a/gcc/testsuite/jit.dg/test-pr95306-builtin-types.c +++ b/gcc/testsuite/jit.dg/test-pr95306-builtin-types.c @@ -8,6 +8,7 @@ create_code (gcc_jit_context *ctxt, void *user_data) #define CHECK_BUILTIN(NAME) \ CHECK_NON_NULL (gcc_jit_context_get_builtin_function (ctxt, NAME)); + CHECK_BUILTIN ("__atomic_load"); CHECK_BUILTIN ("__builtin_memcpy"); CHECK_BUILTIN ("__builtin_sadd_overflow");
reply other threads:[~2020-08-22 21:56 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=20200822215625.BBCF13861012@sourceware.org \ --to=giulianob@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).