[Bug math/33576] New: Don't direct inlined math functions
hjl.tools at gmail dot com
sourceware-bugzilla@sourceware.org
Fri Oct 24 06:17:34 GMT 2025
https://sourceware.org/bugzilla/show_bug.cgi?id=33576
Bug ID: 33576
Summary: Don't direct inlined math functions
Product: glibc
Version: 2.43
Status: NEW
Severity: normal
Priority: P2
Component: math
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
CC: adhemerval.zanella at linaro dot org
Target Milestone: ---
When a math function should be inlined, we shouldn't redirect it with:
float (rintf) (float) asm ("__" "rint" "f");
Instead
1. Include <math-use-builtins.h> in include/libc-symbols.h.
2. Change math-use-builtins-xxx.h to define
#define USE_xxx_BUILTIN xxx
if xxx should be inlined and define
#define USE_xxx_BUILTIN no_xxx_builtin
if xxx won't be inlined.
3. Change MATH_REDIRECT to something like
# define MATH_REDIRECT(FUNC, PREFIX, ARGS) \
float (USE_ ## FUNC ## f ## _BUILTIN) (ARGS) asm (PREFIX #FUNC "f"); \
double (USE_ ## FUNC ## _BUILTIN) (ARGS (double)) asm (PREFIX #FUNC );
MATH_REDIRECT_LDBL and MATH_REDIRECT_F128 should be modified similarly.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list