From nobody Sat Apr 20 10:32:41 2024 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 4VM7BL1p4yz5HVtw; Sat, 20 Apr 2024 10:32:42 +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 4VM7BK4gCFz4Prs; Sat, 20 Apr 2024 10:32:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713609161; 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=jqnleGtJ3FfJfCIxe7rC0OsT6spNPa1TnD93IkQ3Jr0=; b=OIfJJdQ+HQopv5GyuuoY9dqQVmxUcPPVBR3VT+Bowso+M3RzD4LKzhqrlBPTDvm9L5Uz37 dMWdCoV6T3Xdrk58SorSt+jihWNcEfAktb/MLVvgURqPaDC5Q0Sq9b43VjuFkPFibCEOfJ XGqk2B/R7GenTJJaHe8mCzLf8T8H1vqR/p7kl5zh1yOWwsyaqAGbSnFZxT8tGocqab0WPB 5VnzvK8fjDZqr3UprTzuj13zOp08xvDG9h04QWSnow8Za5UXkODZIn9UCqwvXSVBIy29Wf /VvizykUTkLovTFAoPWQJZmejQ4ufbXXs+Rc3b6BfKLZUq4gP8HNImSRGxUbVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713609161; a=rsa-sha256; cv=none; b=EJzMofus2ZeufePp+oejfXFhejs1Tnkq/i60hNAYqK76h1V6ljPXqz9KcssYYyo5mCSTsU xvIqfKsHTVmZpBGbmDJvyEA0RiV3bVmNLJ3AyKuTCmYVehkjiPiP73HW9VOJqPzgSDFMKD 9gWcJWLPN4xeZH4qR7DYkkEPju8nGQowzpLz8Efgwd6oHs1AINL63MekbO8Ukz/ZJszNjD xeSzi8x5JRPugBVJgHgGyiW57FuHLoiV01IBb8vS7HN538MwY8JncEQmG0xa3mb/o+2pTH /xWepiaNdvecU7ijy3l9/0PERF0Mf6fUPvv4g2V/YdTMtkGpVOQXMIXHnIBpIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713609161; 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=jqnleGtJ3FfJfCIxe7rC0OsT6spNPa1TnD93IkQ3Jr0=; b=FijVTfXPGtNvfMm9HQIBR37HsKGoecTKjof/a8aJr0OVbxvw0gai9FOc29/VQF2R37vbFP hPn3KcFstsBJo4ZddXjYWhgQpoMZ6LeAdwamSOkjkx0+8w8ZPyhuf+cV0JSNuVzocTfwuZ aSzhjFGXpmtTkhbsoz2f5mrKBGsMLUZiSnol3LZobJaImirlw/Ea6vSj1D99WSSge0USJd hu0oFjBFAeXM9k9Y32zA43uwObS2HKwKOudhrAeAqAKm0Ua/DKwq4jTYimjjK4X+pBGdUA /znTcvAfj0W/3aAHpFqNKkcBBMR53Qxiwm2Cp63/IL9IfpTDUBrCstQ7gmYNyA== 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 4VM7BK3DdXzYqD; Sat, 20 Apr 2024 10:32:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43KAWfcT011636; Sat, 20 Apr 2024 10:32:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43KAWfst011633; Sat, 20 Apr 2024 10:32:41 GMT (envelope-from git) Date: Sat, 20 Apr 2024 10:32:41 GMT Message-Id: <202404201032.43KAWfst011633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f0e05595a1b4 - stable/14 - Fix arm64 build after llvm 18.1.3 upgrade (take 2) 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f0e05595a1b47554cdbfcb84f33d03b921d375de Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f0e05595a1b47554cdbfcb84f33d03b921d375de commit f0e05595a1b47554cdbfcb84f33d03b921d375de Author: Dimitry Andric AuthorDate: 2024-04-07 09:23:06 +0000 Commit: Dimitry Andric CommitDate: 2024-04-20 10:03:25 +0000 Fix arm64 build after llvm 18.1.3 upgrade (take 2) Instead of compiling the whole sys/arm64/arm64/vfp.c file without -mgeneral-regs-only, which might have unwanted side effects, add ".arch_extension fp" / ".arch_extension nofp" pairs to the inline assembly. PR: 276104 Suggested by: andrew MFC after: 1 month (cherry picked from commit 61e482f2fcd53bbc7fd3d4cc8b7df79d5d57d75c) --- sys/arm64/arm64/vfp.c | 4 ++++ sys/conf/files.arm64 | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/vfp.c b/sys/arm64/arm64/vfp.c index ced1a446f0a8..be98af945b0a 100644 --- a/sys/arm64/arm64/vfp.c +++ b/sys/arm64/arm64/vfp.c @@ -110,6 +110,7 @@ vfp_store(struct vfpstate *state) vfp_state = state->vfp_regs; __asm __volatile( + ".arch_extension fp\n" "mrs %0, fpcr \n" "mrs %1, fpsr \n" "stp q0, q1, [%2, #16 * 0]\n" @@ -128,6 +129,7 @@ vfp_store(struct vfpstate *state) "stp q26, q27, [%2, #16 * 26]\n" "stp q28, q29, [%2, #16 * 28]\n" "stp q30, q31, [%2, #16 * 30]\n" + ".arch_extension nofp\n" : "=&r"(fpcr), "=&r"(fpsr) : "r"(vfp_state)); state->vfp_fpcr = fpcr; @@ -145,6 +147,7 @@ vfp_restore(struct vfpstate *state) fpsr = state->vfp_fpsr; __asm __volatile( + ".arch_extension fp\n" "ldp q0, q1, [%2, #16 * 0]\n" "ldp q2, q3, [%2, #16 * 2]\n" "ldp q4, q5, [%2, #16 * 4]\n" @@ -163,6 +166,7 @@ vfp_restore(struct vfpstate *state) "ldp q30, q31, [%2, #16 * 30]\n" "msr fpcr, %0 \n" "msr fpsr, %1 \n" + ".arch_extension nofp\n" : : "r"(fpcr), "r"(fpsr), "r"(vfp_state)); } diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index b142999ec659..218571d0e23a 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -82,8 +82,7 @@ arm64/arm64/uma_machdep.c standard arm64/arm64/undefined.c standard arm64/arm64/unwind.c optional ddb | kdtrace_hooks | stack \ compile-with "${NORMAL_C:N-fsanitize*}" -arm64/arm64/vfp.c standard \ - compile-with "${NORMAL_C:N-mgeneral-regs-only}" +arm64/arm64/vfp.c standard arm64/arm64/vm_machdep.c standard arm64/coresight/coresight.c standard