[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230725170426.58050-1-falcon@tinylab.org>
Date: Wed, 26 Jul 2023 01:04:26 +0800
From: Zhangjin Wu <falcon@...ylab.org>
To: ammarfaizi2@...weeb.org
Cc: arnd@...db.de, falcon@...ylab.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, svens@...ux.ibm.com,
thomas@...ch.de, w@....eu
Subject: Re: [PATCH v1 1/8] tools/nolibc: add support for powerpc
Hi,
> Hi Zhangjin,
>
> On Tue, Jul 25, 2023 at 07:02:55PM +0800, Zhangjin Wu wrote:
> > Btw, have checked "=r" instead of "=a" works on i386 too for we already
> > bind the _ret variable with "RET" register, but still need to check if
> > "=a" is necessary?
>
> I need to tell you that syscall6() for i386 can't use "r" and "=r"
> because there was a historical bug that made GCC stuck in a loop forever
> when compiling the nolibc code. It's already fixed in the latest version
> of GCC, but we should still support older compilers.
>
Thanks very much, this information is really important.
My old 'reply' is not rigorous, since the syscall6() uses stack to pass
the 6th argument, so, our new syscall.h didn't support it currently,
the syscalls I have tested about "=r" instead of "=a" were only syscall1-5().
> Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105032
>
> I discovered that bug in 2022 in the latest version of GCC at that time,
> so it's pretty new, and those buggy versions are very likely still in
> the wild today.
Ok, so, with the new syscalls.h proposed, we'd better keep i386
syscall6() as-is.
For the left syscall1-5(), is there any risk when use '=r' instead of 'r'?
Thanks,
Zhangjin
>
> --
> Ammar Faizi
Powered by blists - more mailing lists