summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2026-04-18 13:19:57 +0300
committerThomas Weißschuh <linux@weissschuh.net>2026-04-27 21:08:48 +0300
commit32db83195f75bda670ca9282d9868ad02b1d6185 (patch)
tree580463b94dfed9c01597a623c26bd733b1246a36 /include/linux/debugobjects.h
parentf38a0bb74576f418f264b8d407be8de7aac1f42a (diff)
downloadlinux-32db83195f75bda670ca9282d9868ad02b1d6185.tar.xz
tools/nolibc: add __nolibc_arg_to_reg()
In the architecture specific system call glue, all arguments are currently casted to 'long' to fit into registers. This works for pointers as 'long' has the same size as pointers. However the system call registers for X32 and MIPS N32 need to be 'long long' to work correctly for 64-bit values expected by the system call ABI. Casting a pointer to a 'long long' will produce a compiler warning while casting 64-bit integers to 'long' will truncate those. Add a helper which can be used to correctly cast both pointers and integers into 'long long' registers. Cast the pointers through 'unsigned' to avoid any sign extensions. Both builtins have been available since at least GCC 3 and clang 3. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260418-nolibc-largefile-v1-2-b91f0775bac3@weissschuh.net
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions