From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vsmx009.vodafonemail.xion.oxcs.net (vsmx009.vodafonemail.xion.oxcs.net [153.92.174.87]) by sourceware.org (Postfix) with ESMTPS id 16AF8394440D for ; Wed, 11 Mar 2020 17:31:34 +0000 (GMT) Received: from vsmx001.vodafonemail.xion.oxcs.net (unknown [192.168.75.191]) by mta-5-out.mta.xion.oxcs.net (Postfix) with ESMTP id 04CA2159DD3E for ; Wed, 11 Mar 2020 17:31:32 +0000 (UTC) Received: from Gertrud (unknown [91.47.60.226]) by mta-5-out.mta.xion.oxcs.net (Postfix) with ESMTPA id CEBA6159DD56 for ; Wed, 11 Mar 2020 17:31:29 +0000 (UTC) From: Achim Gratz To: cygwin@cygwin.com Subject: Re: gcc and 128-bit compare/exchange References: <66f51c13-4c87-3bd6-3b8e-01901155ef2a@SystematicSw.ab.ca> <0a2c77b2-7ff2-8118-8631-29d186184ad9@SystematicSw.ab.ca> <0fc8a150-99b1-34dc-0dfb-a096fc3b2096@cs.umass.edu> Date: Wed, 11 Mar 2020 18:31:26 +0100 In-Reply-To: <0fc8a150-99b1-34dc-0dfb-a096fc3b2096@cs.umass.edu> (Eliot Moss's message of "Wed, 11 Mar 2020 02:13:40 -0400") Message-ID: <87imjalrwx.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-VADE-STATUS: LEGIT X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS 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: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2020 17:31:35 -0000 Eliot Moss writes: > What I am really reporting is that Cygwin is giving the pthread mutex form > when it should not be. My CPU clearly has the capability, and the compiler clearly > knows how to emit the instruction, since the __sync form does it. What is > mysterious and tangled is why libatomic / libc are not delivering the desired > version of the atomic compare-exchange function. Assuming you want to use a library, it would have to detect this capability at runtime (unless you force-build for a single CPU architecture) and dispatch different code based on the result. It's probably the latter part that's missing on Cygwin. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada