From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 661383857C48 for ; Wed, 2 Sep 2020 11:30:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 661383857C48 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tobias_Burnus@mentor.com IronPort-SDR: gy9IVxvB7rr4KWEo3n3FtQwpTxZO98jiRyJt0JgA40SJKB3gNbTZjn3WELzMfHJ5QpF8OFslGD +rMCfpDpIP8HyRKUhlKcJXaumBS5Efe2HXYkpksWQ6MQnthI/7X8H45X4ZWPrblcJWSgQUicNe Ga11js6QLqd/TlZ5TQK6nW1UzsF+6tTLw9jLURove0itEYSBwWHSxxGR/59PSg/a+Hk2iW0Mfu sXoVXE61YWXR2p1gEntbxOiuu4ioWpHGVaoHSuQqZdgEwKxfRUymyI35rc92B1iu7BLU4EEtzM p54= X-IronPort-AV: E=Sophos;i="5.76,381,1592899200"; d="scan'208";a="54680407" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 02 Sep 2020 03:30:27 -0800 IronPort-SDR: X4KjMUyqpkzryLQg7bwa+OGbeBzTyST/3rIn/OAVFQDQAfqLykZfpGfflDqdp8vG5I9FtPEu4E G4Yw/upLOxjJvET9Ckn7hiGmIte+ZJD4tg2s27jBprn/4YE97ZL6SY9cdl7DsfUFyK+2w7P6Te XQO05WjaUGHf8s+hQ42XoAaIGkPANz6mfaaPhZ8cZenUxZV+b4XehUYc4KCP37wQwSYL6uNSHu APyOPZduX93FlOna9fMdTnZeaEehSdX0fkpK4EJCEOrJ0fuh6qKf8zIzsLQT4Py2WGWn8Yt+Sq o9I= Subject: Re: [RFC][nvptx, libgomp] Add 128-bit atomic support To: Jakub Jelinek , Tom de Vries CC: GCC Patches , Kwok Cheung Yeung , Thomas Schwinge , Segher Boessenkool References: <3cbe58e6-b427-ff0d-b7d1-8723aac82b18@codesourcery.com> <7d824fcc-cacf-6ad3-578d-1dc71243ed8a@suse.de> <8097cf6c-0044-77e6-d216-2abd63779754@codesourcery.com> <3694266b-47ae-4c51-a40c-09bcff5c8ada@suse.de> <0162d4b1-fe2a-a670-7a39-6fcef4dae19a@codesourcery.com> <30032d02-e9a8-d084-788f-c0791a49fb8e@suse.de> <8669d1a0-65f5-e5f4-bd5a-821f8db9e545@suse.de> <9cde09ef-8a7f-fbc7-3677-fb6763cc82b4@suse.de> <20200902104415.GF18149@tucnak> From: Tobias Burnus Message-ID: <3de443ef-f47d-19ab-c6a6-635796f54107@codesourcery.com> Date: Wed, 2 Sep 2020 13:30:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200902104415.GF18149@tucnak> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2020 11:30:52 -0000 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_compar= e_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=C3=9Fe 201, 80634 M=C3=BCnch= en / Germany Registergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thomas = Heurung, Alexander Walter