From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1861) id 15080385C6C4; Thu, 23 Nov 2023 16:32:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 15080385C6C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700757131; bh=0i0ETrm9wokDMVKePLdAIxWyvwuEyiaPdl/oxMowCnE=; h=From:To:Subject:Date:From; b=y1mizmuo+FjudazZgmuNtyKX4qHMx3KglOsvq0dULKpYe8dCYfhCIJ0Iu7V5P4//F 2kBxRJzus/ycYEKYl3Lgz7HJdW2uTODSJhnwDeqeSZmCig+nTrm+plsvJElEGyrV/Q Yi1BEMp2RYBpYk6TGVp5gv05JPl75DuMiNgTPb0Y= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jose E. Marchesi To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-5790] libgcc: mark __hardcfr_check_fail as always_inline X-Act-Checkin: gcc X-Git-Author: Jose E. Marchesi X-Git-Refname: refs/heads/master X-Git-Oldrev: ba0869323e1d45b1328b4cb723cb139a2e2146c3 X-Git-Newrev: 2eb833534c7e715c276658ecb810715e8718e5c3 Message-Id: <20231123163211.15080385C6C4@sourceware.org> Date: Thu, 23 Nov 2023 16:32:11 +0000 (GMT) List-Id: https://gcc.gnu.org/g:2eb833534c7e715c276658ecb810715e8718e5c3 commit r14-5790-g2eb833534c7e715c276658ecb810715e8718e5c3 Author: Jose E. Marchesi Date: Wed Nov 22 15:32:17 2023 +0100 libgcc: mark __hardcfr_check_fail as always_inline The function __hardcfr_check_fail in hardcfr.c is internal and static inline. It receives many arguments, which require more than five registers to be passed in bpf-none-unknown targets. BPF is limited to that number of registers to pass arguments, and therefore libgcc fails to build in that target. This patch marks the function with the always_inline attribute, fixing the bpf build. Tested in bpf-unknown-none target and x86_64-linux-gnu host. libgcc/ChangeLog: * hardcfr.c (__hardcfr_check_fail): Mark as always_inline. Diff: --- libgcc/hardcfr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libgcc/hardcfr.c b/libgcc/hardcfr.c index 25ff06742cb..376a36202c8 100644 --- a/libgcc/hardcfr.c +++ b/libgcc/hardcfr.c @@ -206,6 +206,10 @@ __hardcfr_debug_cfg (size_t const blocks, enabled, it also forces __hardcfr_debug_cfg (above) to be compiled into an out-of-line function, that could be called from a debugger. */ + +#ifdef __BPF__ +__attribute__((__always_inline__)) +#endif static inline void __hardcfr_check_fail (size_t const blocks ATTRIBUTE_UNUSED, vword const *const visited ATTRIBUTE_UNUSED,