From nobody Mon May 15 15:57:14 2023 X-Original-To: dev-commits-src-main@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 4QKkXB4Fjgz4BmLW; Mon, 15 May 2023 15:57:14 +0000 (UTC) (envelope-from git@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 4QKkXB3gjbz3NHX; Mon, 15 May 2023 15:57:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684166234; 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; bh=GeMDrAlbzv9ePp3GjeNiEKv7RvV4QfZ54/XRAJd+jN4=; b=rHeBeLURODQwIpR0IHq1YcoXXq2BUdlnPZfMTIRsCX7WNuinjk7kVTMWu49Ee1sSvel+TO lV6qWf4wIQU+uPH++SCSZPRyRG7EuDPqG60rWMTi63/Iog9tZTRlULsLHX6MpUfsIEAklE aI9/AUNOpBkXe7x0TgUmuFLGwRGw/tRlB4N71jgjK8I/sB8UWQfANxzBCPCBgfBtzpxGnU 9hVjapBvDgeH9PF1QWYUtjAHLcAgtxF+rxtfz5dgJKUm9Wz05JaDUY9yukyf5sYCmywVAl hk/OMXXx4E6YEpuSaE/h46pCyY19fv7CuixovzJdR7Tx7hdfdpaH9rGDtM0zWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684166234; 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; bh=GeMDrAlbzv9ePp3GjeNiEKv7RvV4QfZ54/XRAJd+jN4=; b=NJEAAQU/1P5VcvsF1tr3msz03UoJ5YMEOA1fBytS5Yzl8AZLiyhfo2YZFBxXYdJs08Sg9/ t50H0XYeCtTt/yvAzUhOfIQooUpowv/rPwvYvgpxAzZxG8GLLeEZhoF5dTPa70twLd22Vy vetyMRdieg2Ocn/BYWN4zWa0jVs23DKXOAb8/6k/qQnPSlrb26OLgblX3/IKDJu1QzK8uB dl0ISWKHbH+JNU3RJ938DJd6odX/4dqLzADoa4Nboatds3/cXlbu1hUZ24u0Kj1wy6rGFz 7u3j2t/02ggvqV6OFkD4vrgGl3ymWkgd47aWTXg1qWDn31B3r0Y8IhcDeSLHHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684166234; a=rsa-sha256; cv=none; b=R9qMa31091a41yUwJdjnYRZ5kf+aKgJ+tm08FU+tZlfik0u+rC9l6K0keCtXMa9oUsAKkD evkgk8xpULMVSFaN6d1qwZ9vGzH6n/j5pNksPvyYGwF8wYcui9hrrYvwNsviZG8Kh1TseV wN0+gU/Jc6GV9lih1Rp6D1z0Hk3rBARfPDPYGIXbfi/4fmlTnVVPSdNB1fb8KBUlgeG3NV tGPAyMBGqwFcHwbw0jK8KI6dlmBt4pNYuioPjbkWYcnGtOJYOFUlMKZa9TTIP86ZCdLwsS 2RMqzvCMUsx4Sz42gV/Tb7T136A64fH/8J8+RYq1dTqh99TJej/1yEx2wThH+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QKkXB2mDGzmmn; Mon, 15 May 2023 15:57:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34FFvEM6089855; Mon, 15 May 2023 15:57:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34FFvEYF089854; Mon, 15 May 2023 15:57:14 GMT (envelope-from git) Date: Mon, 15 May 2023 15:57:14 GMT Message-Id: <202305151557.34FFvEYF089854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: b68588618b43 - main - arm64: simplify expression List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b68588618b43720ca2950202491ddbd17599c260 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=b68588618b43720ca2950202491ddbd17599c260 commit b68588618b43720ca2950202491ddbd17599c260 Author: Kyle Evans AuthorDate: 2023-05-15 15:54:15 +0000 Commit: Kyle Evans CommitDate: 2023-05-15 15:54:15 +0000 arm64: simplify expression !a != !b -> a != b; this part was lifted from NetBSD, and I clearly did not reconsider that these are bools (I'm guessing they were ints in an earlier iteration of the NetBSD implementation). while we're here, it should be easy to see that we've covered all of the cases but let's add in an __assert_unreachable() to make it easier on the eyes. Reported by: jrtc27 --- sys/arm64/arm64/undefined.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/undefined.c b/sys/arm64/arm64/undefined.c index 7f436aaef6e5..e1afca40f396 100644 --- a/sys/arm64/arm64/undefined.c +++ b/sys/arm64/arm64/undefined.c @@ -164,9 +164,11 @@ arm_cond_match(uint32_t insn, struct trapframe *frame) case INSN_COND_AL: match = true; break; + default: + __assert_unreachable(); } - return (!match != !invert); + return (match != invert); } #ifdef COMPAT_FREEBSD32