From nobody Wed Nov 5 20:18:09 2025 X-Original-To: dev-commits-src-all@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 4d1xTZ2Ng8z655g3; Wed, 05 Nov 2025 20:18:10 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d1xTZ1jvZz44kr; Wed, 05 Nov 2025 20:18:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762373890; 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=M5O/yxj69jINxwbZQ7Kqx2i06K86XS9IhNcdk1/HSfE=; b=PvhlxgrJ0cKx9HqC4WtOMaZ1gb8u1RfARB3qrmJrWrICLVMNGY3Ys52MCV8wM7HlrT+Fq1 glJy7G9bY7SqJDHHSS2NdjIyro8APLSX+yBlqqC/F1Ap0S4wW/ciWTJJEf2RSgS3tm76h1 2QVgk3NwHfllyxB+KqhVtDYIPnU0dbAfcGjTDcPZ2BJA23mUki17A+1ymzhnIQvx8B5kup fyhBf11iNCM++n+nJZHoiky4Uw4tE4C3TbqA7XZBnLgsnRTPiGX0tOXBhlHaeGAxrzRSN+ r1og+RL3w0H8tPVdIRnHUYCcMViQAxn1cmN4LOgKqCJPbSuRsrLadpQ1jD2B2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1762373890; 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=M5O/yxj69jINxwbZQ7Kqx2i06K86XS9IhNcdk1/HSfE=; b=MMxu2gvDfiw1wCoS6hmlTNhSldOBcq6n4/P4mdcoV/Ogk5utZzTCsgskTC5Ok8SZKkWBP7 2DztNlXq0oaZHsuiw/6JXhimilTxrRjerykifIV+gwx6/WEDUIzrCeUORUVvrOAjvG5Hpl ns1edjfWH8DEHZS5EQ+eVT1CJjPoKFn9bBh/xMejykM7Kj6g8tOnHZAoAPSaYncT2ZWLEV uXToV9duepUTxuSlSOd5Te5j4RLKPyza1bW4K59XWcugYFzUMRa21nW9QdIf+f3dOu//+v UXU59sqjCNEEWYisPOd8IKIFDxMrWBnGnUgPvAwfeBjxwuIe1qxWv+vWQuBwGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1762373890; a=rsa-sha256; cv=none; b=AeXC7K29wx+04gJN9AiolXUWNis+B18fTXftH/qHmN4nq2jU2tguv8XxHzGzWrn42JUjfL suwVQoKkByF6TVnw0aRT17ZZ7291I7Q/xr2oBSovxpdhQEX+AM6SGeTiVhHF2Uzrm5zVhr 12GSgUrxHrnDPRx7LaHG51ChRAi1OwzjEa/hhkaqCDIPaVaPjI3JEWpWNzObV5kn9Fn42c Z84tOfZ21dcUGm2BErwkHX9j+GI2kE1X4xfG09cU0QR/VUUsTLFNaq5XMhPBbehIh1H293 E8/Cr1MB3LKQr6XdD9aRTIhGTQRk97N3YiX1coasTOFsDeFtydrQPBC2jETOXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4d1xTZ0v1Bzy3h; Wed, 05 Nov 2025 20:18:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5A5KI9fY062563; Wed, 5 Nov 2025 20:18:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5A5KI9VV062560; Wed, 5 Nov 2025 20:18:09 GMT (envelope-from git) Date: Wed, 5 Nov 2025 20:18:09 GMT Message-Id: <202511052018.5A5KI9VV062560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 054da4a6d033 - releng/15.0 - riscv: Treat pointer register as an input in fpe_store List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 054da4a6d033feb1948d609a0dc20a1c82bc8943 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=054da4a6d033feb1948d609a0dc20a1c82bc8943 commit 054da4a6d033feb1948d609a0dc20a1c82bc8943 Author: John Baldwin AuthorDate: 2025-10-30 19:52:51 +0000 Commit: Colin Percival CommitDate: 2025-11-05 20:18:00 +0000 riscv: Treat pointer register as an input in fpe_store The contents of the memory is an output, but the pointer to that memory is an input. This was correct in the original version of D45697, but when adding appropriate clobbers, the pointer operand was incorrectly switched to an output rather than left an input for fpe_store. Approved by: re (cperciva) Reviewed by: jrtc27 Obtained from: CheriBSD Fixes: 44d4ee7f3dad ("riscv: add FPE code.") MFC after: 1 day Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D53441 (cherry picked from commit 91f66f9b377e09f59f481e653d8f64120a183806) (cherry picked from commit 0b5e4af65d0d3dfaa318b8e6adaaa4297f94af17) --- sys/riscv/riscv/fpe.c | 66 +++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/sys/riscv/riscv/fpe.c b/sys/riscv/riscv/fpe.c index b6c66e5e4f09..63103a794a8e 100644 --- a/sys/riscv/riscv/fpe.c +++ b/sys/riscv/riscv/fpe.c @@ -69,39 +69,39 @@ fpe_store(struct fpreg *regs) __asm __volatile( "frcsr %0 \n" - "fsd f0, (16 * 0)(%1)\n" - "fsd f1, (16 * 1)(%1)\n" - "fsd f2, (16 * 2)(%1)\n" - "fsd f3, (16 * 3)(%1)\n" - "fsd f4, (16 * 4)(%1)\n" - "fsd f5, (16 * 5)(%1)\n" - "fsd f6, (16 * 6)(%1)\n" - "fsd f7, (16 * 7)(%1)\n" - "fsd f8, (16 * 8)(%1)\n" - "fsd f9, (16 * 9)(%1)\n" - "fsd f10, (16 * 10)(%1)\n" - "fsd f11, (16 * 11)(%1)\n" - "fsd f12, (16 * 12)(%1)\n" - "fsd f13, (16 * 13)(%1)\n" - "fsd f14, (16 * 14)(%1)\n" - "fsd f15, (16 * 15)(%1)\n" - "fsd f16, (16 * 16)(%1)\n" - "fsd f17, (16 * 17)(%1)\n" - "fsd f18, (16 * 18)(%1)\n" - "fsd f19, (16 * 19)(%1)\n" - "fsd f20, (16 * 20)(%1)\n" - "fsd f21, (16 * 21)(%1)\n" - "fsd f22, (16 * 22)(%1)\n" - "fsd f23, (16 * 23)(%1)\n" - "fsd f24, (16 * 24)(%1)\n" - "fsd f25, (16 * 25)(%1)\n" - "fsd f26, (16 * 26)(%1)\n" - "fsd f27, (16 * 27)(%1)\n" - "fsd f28, (16 * 28)(%1)\n" - "fsd f29, (16 * 29)(%1)\n" - "fsd f30, (16 * 30)(%1)\n" - "fsd f31, (16 * 31)(%1)\n" - : "=&r"(fcsr), "=r"(fp_x), "=m"(*fp_x)); + "fsd f0, (16 * 0)(%2)\n" + "fsd f1, (16 * 1)(%2)\n" + "fsd f2, (16 * 2)(%2)\n" + "fsd f3, (16 * 3)(%2)\n" + "fsd f4, (16 * 4)(%2)\n" + "fsd f5, (16 * 5)(%2)\n" + "fsd f6, (16 * 6)(%2)\n" + "fsd f7, (16 * 7)(%2)\n" + "fsd f8, (16 * 8)(%2)\n" + "fsd f9, (16 * 9)(%2)\n" + "fsd f10, (16 * 10)(%2)\n" + "fsd f11, (16 * 11)(%2)\n" + "fsd f12, (16 * 12)(%2)\n" + "fsd f13, (16 * 13)(%2)\n" + "fsd f14, (16 * 14)(%2)\n" + "fsd f15, (16 * 15)(%2)\n" + "fsd f16, (16 * 16)(%2)\n" + "fsd f17, (16 * 17)(%2)\n" + "fsd f18, (16 * 18)(%2)\n" + "fsd f19, (16 * 19)(%2)\n" + "fsd f20, (16 * 20)(%2)\n" + "fsd f21, (16 * 21)(%2)\n" + "fsd f22, (16 * 22)(%2)\n" + "fsd f23, (16 * 23)(%2)\n" + "fsd f24, (16 * 24)(%2)\n" + "fsd f25, (16 * 25)(%2)\n" + "fsd f26, (16 * 26)(%2)\n" + "fsd f27, (16 * 27)(%2)\n" + "fsd f28, (16 * 28)(%2)\n" + "fsd f29, (16 * 29)(%2)\n" + "fsd f30, (16 * 30)(%2)\n" + "fsd f31, (16 * 31)(%2)\n" + : "=&r"(fcsr), "=m"(*fp_x) : "r"(fp_x)); regs->fp_fcsr = fcsr; }