public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <tobias@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>, Tom de Vries <tdevries@suse.de>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Kwok Cheung Yeung <kcy@codesourcery.com>,
	Thomas Schwinge <thomas@codesourcery.com>,
	Segher Boessenkool <segher@linux.ibm.com>
Subject: Re: [RFC][nvptx, libgomp] Add 128-bit atomic support
Date: Wed, 2 Sep 2020 13:30:38 +0200	[thread overview]
Message-ID: <3de443ef-f47d-19ab-c6a6-635796f54107@codesourcery.com> (raw)
In-Reply-To: <20200902104415.GF18149@tucnak>

On 9/2/20 12:22 PM, Tom de Vries wrote:

> Tobias, can you try on powerpc?

Testcase now compiles and runs w/o error message.

On 9/2/20 12:44 PM, Jakub Jelinek wrote:

> I guess the normal answer would be use libatomic, but it isn't ported for
> nvptx.
> I guess at least temporarily this is ok,though I'm wondering why
> you need __sync_*_16 rather than __atomic_*_16, or perhaps both __sync_* and
> __atomic_*.
>
> What happens if you try
> unsigned __int128 v;

...

I had to change "unsigned __int128" and "unsigned __int128v" to
"__uint128_t" and "expected" to "exp". Result without offloading
configured on x86-64-gnu-linux:

aotmic.c:(.text+0x84): undefined reference to `__atomic_fetch_add_16'
/usr/bin/ld: aotmic.c:(.text+0xa3): undefined reference to `__atomic_fetch_add_16'
/usr/bin/ld: aotmic.c:(.text+0xda): undefined reference to `__atomic_compare_exchange_16'

And on PowerPC with nvptx (without the RFC patch):

atomic.c: In function 'main._omp_fn.0':
atomic.c:6:11: internal compiler error: in write_fn_proto, at config/nvptx/nvptx.c:913
     6 |   #pragma omp target
       |           ^

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter

  reply	other threads:[~2020-09-02 11:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15 20:28 [PATCH] nvptx: Add support for subword compare-and-swap Kwok Cheung Yeung
2020-06-23 16:44 ` Thomas Schwinge
2020-06-23 16:51   ` Jakub Jelinek
2020-06-30 16:35     ` Kwok Cheung Yeung
2020-06-24 11:13   ` Kwok Cheung Yeung
2020-06-30 14:37   ` Tom de Vries
2020-07-01 14:28 ` Tom de Vries
2020-07-15 19:08   ` Kwok Cheung Yeung
2020-07-20 13:19   ` Kwok Cheung Yeung
2020-08-04 14:56     ` [PING] " Kwok Cheung Yeung
2020-08-13  9:27     ` Tom de Vries
2020-09-01 11:41       ` [patch][nvptx] libgomp: Split testcase in order to XFAIL __sync_val_compare_and_swap_16 (was: [PATCH] nvptx: Add support for subword compare-and-swap) Tobias Burnus
2020-09-01 12:58         ` Tom de Vries
2020-09-02  7:56           ` Tom de Vries
2020-09-02 10:22             ` [RFC][nvptx, libgomp] Add 128-bit atomic support Tom de Vries
2020-09-02 10:44               ` Jakub Jelinek
2020-09-02 11:30                 ` Tobias Burnus [this message]
2020-09-02 11:48                 ` Tom de Vries
2020-09-11 14:24                   ` Tom de Vries
2020-09-11 14:25                     ` Tom de Vries
2020-09-11 14:48                       ` Andrew Stubbs
2020-09-11 15:03                         ` tdevries
2020-09-11 15:29                           ` Tobias Burnus
2020-09-11 14:37                     ` Jakub Jelinek

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=3de443ef-f47d-19ab-c6a6-635796f54107@codesourcery.com \
    --to=tobias@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=kcy@codesourcery.com \
    --cc=segher@linux.ibm.com \
    --cc=tdevries@suse.de \
    --cc=thomas@codesourcery.com \
    /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).