From owner-svn-src-all@freebsd.org Thu Apr 13 15:43:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE05BD3C6AC; Thu, 13 Apr 2017 15:43:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E639C6; Thu, 13 Apr 2017 15:43:45 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3DFhiWe003485; Thu, 13 Apr 2017 15:43:44 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DFhiHB003484; Thu, 13 Apr 2017 15:43:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201704131543.v3DFhiHB003484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 13 Apr 2017 15:43:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316764 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 15:43:45 -0000 Author: andrew Date: Thu Apr 13 15:43:44 2017 New Revision: 316764 URL: https://svnweb.freebsd.org/changeset/base/316764 Log: Don't prefix zero with 0x in assym.s. The arm64 binutils only accepts 0 as an offset to the Load-Acquire Register instructions where llvm will acceps both 0 and 0x0. The thread switching code uses these with SCHED_ULE to block waiting for a lock to be released. As the offset of the data to be loaded is zero this is safe, however it is useful to keep the offset in the instruction to document what is being loaded. To work around this issue in binutils only generate the 0x prefix for non-zero values. Reported by: kan Sponsored by: DARPA, AFRL Modified: head/sys/kern/genassym.sh Modified: head/sys/kern/genassym.sh ============================================================================== --- head/sys/kern/genassym.sh Thu Apr 13 15:40:57 2017 (r316763) +++ head/sys/kern/genassym.sh Thu Apr 13 15:43:44 2017 (r316764) @@ -32,12 +32,15 @@ work() sub("^0*", "", w) if (w == "") w = "0" + hex = "" + if (w != "0") + hex = "0x" sub("w3$", "", $3) # This still has minor problems representing INT_MIN, etc. # E.g., # with 32-bit 2''s complement ints, this prints -0x80000000, # which has the wrong type (unsigned int). - printf("#define\t%s\t%s0x%s\n", $3, sign, w) + printf("#define\t%s\t%s%s%s\n", $3, sign, hex, w) } ' }