From nobody Thu Oct 30 19:54:45 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 4cyFFK6Gvjz6FW69; Thu, 30 Oct 2025 19:54:45 +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 4cyFFK5F2rz4N9Q; Thu, 30 Oct 2025 19:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761854085; 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=3vLk3k2DdPu2wPwIdYIQrtUgXfL5cKzBdVC5tJ8a8sI=; b=wPvvZaMZRNIqiTD0bY4ByfW4+Zfbe7i8zJu5JDqWM0pJh8RbsYcZ/oN1GX4GmiQIPNMYp3 NkGfW5HdQQ/8TrAlgUFz9UBVuuxvnog7O90veUInfAmK/FQM4NGXL+cMlZP9CI5wnV9ulV tt9zxjNuvht6DRQ45czNg0lek7YC3od9tIZFjJKLuG7X9z+xTRh52zXfmgnGROLtK1/tvC aaxf7gpQ8v5HfltmJYALTu4nhtyymRoOmpnJ1pvMyMqdvu5qEXOMtPcIhye4LrwGgVTY7G XixQfsTAicFleatYCfjuYns7o9+oOXi86qhJN7DjaFUfqY2DqDdHSF5tQVdHDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761854085; 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=3vLk3k2DdPu2wPwIdYIQrtUgXfL5cKzBdVC5tJ8a8sI=; b=Vqto4Czd2Jf/0s+virc65+6JzXf/7uy7dj2l6Y3ZAJ1ZaZfGBZUz3qGrxpX5XLAElT4GXU xHMXQJsldRlVrCf62jVUDZpApRUGZCVaLgZDAx50kLxqjy58F6R4LQdPLRXz+bnKPf+5PZ vILoY1GpQNc1kjHECZl4ubhp88684yVTEZzXZSkeAbaB+Th/oiZ/8TYyc5N07TclI/oY3/ wPa98HFgJUWvw0wTU/JbsyBQsf7xK1bKTGbqXAJdPLBO80xOPLRtgyUZsY0S6BRj4Zp9cy vbc0dDFiaqOvuY/uTEngHp5qlNiim9H5IVkLYked3VyXR99ajEdNjIjoiZ9iyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761854085; a=rsa-sha256; cv=none; b=pUzN4qyEPG6AQCcv+V29nugDQ5IMY/VyPDiruRpp6L7fxnD8ohIyK3RWcR5Kp/Tt/F9OpO DtsMH0PckTYa3xH7GvCBKDG933stAN5fjUce1lN/76CMn6qo/j10KYZm2Y3+9jssrcdl7S zla+rkK07GczfRXKO8GzBoQW6v9EFBfV1n1rjE82hJtBSbLoPdFKGRDYMWfvE1gTXBetW+ PNYOyDXFb45SJ9/Etd+hNioVrG+f1tTEQ+K/JJPEGYDLbGmd8PADKAYGPKjkS842xIW+xs duweijQqjGg5pUbLd48yQFiCjf7CX4gBhBwTsRGvjRkwWRgRKGNnabUiPXoT6g== 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 4cyFFK4nkrzcn6; Thu, 30 Oct 2025 19:54:45 +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 59UJsjo9036464; Thu, 30 Oct 2025 19:54:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59UJsjj6036461; Thu, 30 Oct 2025 19:54:45 GMT (envelope-from git) Date: Thu, 30 Oct 2025 19:54:45 GMT Message-Id: <202510301954.59UJsjj6036461@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 91f66f9b377e - main - 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91f66f9b377e09f59f481e653d8f64120a183806 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=91f66f9b377e09f59f481e653d8f64120a183806 commit 91f66f9b377e09f59f481e653d8f64120a183806 Author: John Baldwin AuthorDate: 2025-10-30 19:52:51 +0000 Commit: John Baldwin CommitDate: 2025-10-30 19:52:51 +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. 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 --- 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; }