From nobody Mon Nov 06 00:17:51 2023 X-Original-To: toolchain@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SNsPW3FBPz50BxT for ; Mon, 6 Nov 2023 00:17:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SNsPW1KWgz3Psx for ; Mon, 6 Nov 2023 00:17:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699229871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XR/KlJOMwPb1S/uS2keF/At4Gumr54ZWJewJnrspIEE=; b=cbvcFdKZopyiu+hiwFEPX0gm/uyAR+4z/gf3t1VAWsJuhMb4shhR7ns5iLkPqskkg6bt+A 6r8eKUObqov/UIYnvTsEEr8NlkqN3qO0MDWanDv/RzBz1TG4wCtdzXt0LqcFuT+tw7K7UM mKpyjuUCpvOcWeGzR5DXoKlA2STTVPVD95XQFibUKLpuswxXYJZ17dz6Y8idDtOFGcEMZF RMyCOtQ2/flBO3OS4AfLn1syaaOl5c+vDP3hSaTnjfwGWEAOuADDon+s8nGKj7EKxt0/vp 17LF94iUG0uOkqdwJTP7VKJ4J+VxQ9JJFekYFHVJD68+FC8NHInOcE+HxEL3rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699229871; a=rsa-sha256; cv=none; b=xJv/sspkw95O2uySfuUcIY/EM4vnjF/ohwilMIo+Idcttkc7a/jIWmPOTcj559xCna8LkF 6BRYbEDjPOROokIRs22NUgYpuZAKPEJWP624z9W8AJQJ2VqBn+LNbOtIEMnxRC/wgOusym jzPH64QzEucdcFoET6xzDB1XzVLIP6k5+GwmuqW+tgdajywShR4F0HkQujvcaLF8I8lReb J+tuE4ZIQFXXBdFEuP4TX4zVkG5yMLCJ/H8UWkaVGQxtz+rkPEFWCuaNUYTcVWwKqbLm64 VC5+n7FOxo5d5sqRzVLJQaCnxzVdJnBsSqolczvBXba2nOMLoXHp6LhGUhyoZA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SNsPW0Q6XzmHq for ; Mon, 6 Nov 2023 00:17:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3A60HphY024118 for ; Mon, 6 Nov 2023 00:17:51 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3A60HoxM024117 for toolchain@FreeBSD.org; Mon, 6 Nov 2023 00:17:50 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 274927] Toolchain fails on the __sync_val_compare_and_swap function without -march=native (port biology/seqwish) Date: Mon, 06 Nov 2023 00:17:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: marklmi26-fbsd@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Maintenance of FreeBSD s integrated toolchain List-Archive: https://lists.freebsd.org/archives/freebsd-toolchain List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274927 --- Comment #6 from Mark Millard --- https://llvm.org/docs/Atomics.html#libcalls-sync reports that these routines are special and can not use locks: QUOTE . . ., the Target in LLVM can claim support for atomics of an appropriate s= ize, and then implement some subset of the operations via libcalls to a __sync_* function. Such functions must not use locks in their implementation, because unlike the __atomic_* routines used by AtomicExpandPass, these may be mixed-and-matched with native instructions by the target lowering. END QUOTE If I read that correctly, there is no generic implementation possible/available. It has to use hardware instructions that handle the size required. Some amd= 64 hardware has such, other amd64 hw does not. -march or the like has to indic= ate a context with an appropriate instruction for __sync_val_compare_and_swap_16 to use. So, as far as I can tell, a pre-built biology/seqwish that just works everywhere for amd64 is not really an option for the port. Also, use of -march=3Dnative is not guaranteed to use an instruction that w= orks for the general range of amd64 hardware. It just plugs in the definition th= at works for FreeBSD build server (that happens to support the operation), not something generally useful. So just some subset of amd64 hardware likely en= ds up handled. --=20 You are receiving this mail because: You are the assignee for the bug.=