From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: gcc-patches@gcc.gnu.org
Cc: Alexandre Oliva <oliva@gnu.org>
Subject: [PATCH] libgcc: mark __hardcfr_check_fail as always_inline
Date: Wed, 22 Nov 2023 15:39:11 +0100 [thread overview]
Message-ID: <20231122143911.16620-1-jose.marchesi@oracle.com> (raw)
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.
---
libgcc/hardcfr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libgcc/hardcfr.c b/libgcc/hardcfr.c
index 25ff06742cb..48a87a5a87a 100644
--- a/libgcc/hardcfr.c
+++ b/libgcc/hardcfr.c
@@ -206,7 +206,8 @@ __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.
*/
-static inline void
+
+static inline __attribute__((__always_inline__)) void
__hardcfr_check_fail (size_t const blocks ATTRIBUTE_UNUSED,
vword const *const visited ATTRIBUTE_UNUSED,
vword const *const cfg ATTRIBUTE_UNUSED,
--
2.30.2
next reply other threads:[~2023-11-22 14:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 14:39 Jose E. Marchesi [this message]
2023-11-23 14:13 ` Richard Biener
2023-11-23 15:17 ` Jose E. Marchesi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231122143911.16620-1-jose.marchesi@oracle.com \
--to=jose.marchesi@oracle.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=oliva@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).