From: Helge Deller <deller@gmx.de>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-parisc@vger.kernel.org,
David Laight <david.laight.linux@gmail.com>
Subject: Re: [PATCH v2] tools/nolibc: add 64-bit parisc support
Date: Sat, 12 Sep 2026 22:15:30 +0200 [thread overview]
Message-ID: <495ef25e-0bac-4f98-b0da-ae0d96dcea59@gmx.de> (raw)
In-Reply-To: <20260831-nolibc-parisc64-v2-1-022f9beff7a6@weissschuh.net>
On 8/31/26 06:32, Thomas Weißschuh wrote:
> Extend the existing parisc support to also handle 64-bit mode.
>
> Some peculiarities:
> * The nonstandard ftruncate64 system call requires a workaround.
> * The linker defaults to main() as entry point, which needs to be
> switched to _start() explicitly.
> * The linker defaults to dynamic linking, which needs to be disabled
> explicitly.
> * With the default -Os, gcc does not use 64-bit multiplication
> instructions, requiring libgcc. Use -O2 instead.
> * There is no qemu-user available.
> * CONFIG_COMPAT needs to be disabled to avoid build errors due to a
> missing 32-bit vDSO compiler.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Changes in v2:
> - Rebase on latest nolibc/for-next.
> - Fix typo in comment.
> - Reorder conditions in run-tests.sh.
> - Fix llvm=1 check in run-tests.sh.
> - Link to v1: https://patch.msgid.link/20260820-nolibc-parisc64-v1-1-067ebe7c8efb@weissschuh.net
> ---
> tools/include/nolibc/arch-parisc.h | 26 +++++++++++++++++++++++---
> tools/include/nolibc/stdlib.h | 2 +-
> tools/testing/selftests/nolibc/Makefile.nolibc | 5 +++++
> tools/testing/selftests/nolibc/run-tests.sh | 10 +++++++---
> 4 files changed, 36 insertions(+), 7 deletions(-)
>
> diff --git a/tools/include/nolibc/arch-parisc.h b/tools/include/nolibc/arch-parisc.h
> index 417043ecbc53..5c595ef88a62 100644
> --- a/tools/include/nolibc/arch-parisc.h
> +++ b/tools/include/nolibc/arch-parisc.h
> @@ -7,9 +7,7 @@
> #ifndef _NOLIBC_ARCH_PARISC_H
> #define _NOLIBC_ARCH_PARISC_H
>
> -#if defined(__LP64__)
> -#error 64-bit not supported
> -#endif
> +#include <linux/unistd.h>
>
> #include "compiler.h"
> #include "crt.h"
> @@ -167,9 +165,15 @@
> void __attribute__((weak, noreturn)) __nolibc_entrypoint __nolibc_no_stack_protector _start(void)
> {
> __asm__ volatile (
> +#ifdef __LP64__
> + ".import __gp\n" /* Set up the dp register */
> + "ldil L%__gp, %dp\n"
> + "ldo R%__gp(%r27), %dp\n"
change to:
"ldo R%__gp(%dp), %dp\n"
> +#else
> ".import $global$\n" /* Set up the dp register */
> "ldil L%$global$, %dp\n"
> "ldo R%$global$(%r27), %dp\n"
change to:
"ldo R%$global$(%dp), %dp\n"
Helge
prev parent reply other threads:[~2026-09-12 20:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 4:32 Thomas Weißschuh
2026-09-12 20:15 ` Helge Deller [this message]
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=495ef25e-0bac-4f98-b0da-ae0d96dcea59@gmx.de \
--to=deller@gmx.de \
--cc=david.laight.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux@weissschuh.net \
/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
all inboxes | Powered by JetHome®