libgcc: mark __hardcfr_check_fail as always_inline

Message ID 20231122143911.16620-1-jose.marchesi@oracle.com
State Unresolved
Headers
Series libgcc: mark __hardcfr_check_fail as always_inline |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Jose E. Marchesi Nov. 22, 2023, 2:39 p.m. UTC
  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(-)
  

Patch

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,