From: Ammar Faizi <ammarfaizi2@gnuweeb.org>
To: Zhangjin Wu <falcon@tinylab.org>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
"Sven Schnelle" <svens@linux.ibm.com>,
"Thomas Weißschuh" <thomas@t-8ch.de>, "Willy Tarreau" <w@1wt.eu>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Linux Kselftest Mailing List" <linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH v1 1/8] tools/nolibc: add support for powerpc
Date: Wed, 26 Jul 2023 01:23:37 +0700 [thread overview]
Message-ID: <ZMATKempQBPGCY2v@biznet-home.integral.gnuweeb.org> (raw)
In-Reply-To: <20230725170426.58050-1-falcon@tinylab.org>
On Wed, Jul 26, 2023 at 01:04:26AM +0800, Zhangjin Wu wrote:
> 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().
Yeah, it won't fit with the new design.
i386 runs out of GPRs very quickly. Given that, it had a hard time
implementing syscall6() properly in nolibc. The calling convention
itself actually doesn't require stack for executing 'int $0x80'.
The reason of why it uses stack is because the %ebp register cannot be
listed in the clobber list nor in the constraint if -fomit-frame-pointer
is not activated. Thus, we have to carefully preserve the value on the
stack before using %ebp as the 6-th argument to the syscall. It's a hack
to make it work on i386.
> 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'?
Using "=r" instead of "r" doesn't make sense.
Did you mean "=r" instead of "=a"?
If that's what you mean:
So far I don't see the risk of using "=r" instead of "=a" as long as the
variable is properly marked as 'register' + asm("eax").
--
Ammar Faizi
next prev parent reply other threads:[~2023-07-25 18:23 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 21:09 [PATCH v1 0/8] tools/nolibc: add 32/64-bit powerpc support Zhangjin Wu
2023-07-18 21:10 ` [PATCH v1 1/8] tools/nolibc: add support for powerpc Zhangjin Wu
2023-07-23 7:32 ` Thomas Weißschuh
2023-07-23 8:15 ` Willy Tarreau
2023-07-25 5:44 ` Zhangjin Wu
2023-07-25 6:29 ` Willy Tarreau
2023-07-25 11:02 ` Zhangjin Wu
2023-07-25 14:45 ` Ammar Faizi
2023-07-25 17:04 ` Zhangjin Wu
2023-07-25 18:23 ` Ammar Faizi [this message]
2023-07-25 20:23 ` Zhangjin Wu
2023-07-25 18:27 ` Willy Tarreau
2023-07-25 20:52 ` Zhangjin Wu
2023-07-25 6:14 ` Zhangjin Wu
2023-07-18 21:11 ` [PATCH v1 2/8] tools/nolibc: add support for powerpc64 Zhangjin Wu
2023-07-18 21:13 ` [PATCH v1 3/8] selftests/nolibc: select_null: fix up for big endian powerpc64 Zhangjin Wu
2023-07-18 22:17 ` Thomas Weißschuh
2023-07-18 23:56 ` Zhangjin Wu
2023-07-19 4:33 ` Willy Tarreau
2023-07-19 6:49 ` Zhangjin Wu
2023-07-19 20:25 ` Willy Tarreau
2023-07-20 6:11 ` Thomas Weißschuh
2023-07-18 21:14 ` [PATCH v1 4/8] selftests/nolibc: add extra config file customize support Zhangjin Wu
2023-07-22 12:00 ` Willy Tarreau
2023-07-25 14:30 ` Zhangjin Wu
2023-07-29 7:45 ` Willy Tarreau
2023-07-29 9:43 ` Zhangjin Wu
2023-07-18 21:15 ` [PATCH v1 5/8] selftests/nolibc: add XARCH and ARCH mapping support Zhangjin Wu
2023-07-22 12:03 ` Willy Tarreau
2023-07-18 21:16 ` [PATCH v1 6/8] selftests/nolibc: add test support for powerpc Zhangjin Wu
2023-07-18 21:17 ` [PATCH v1 7/8] selftests/nolibc: add test support for powerpc64le Zhangjin Wu
2023-07-22 12:07 ` Willy Tarreau
2023-07-18 21:18 ` [PATCH v1 8/8] selftests/nolibc: add test support for powerpc64 Zhangjin Wu
2023-07-22 12:10 ` Willy Tarreau
2023-07-25 5:50 ` Zhangjin Wu
2023-07-25 6:02 ` Willy Tarreau
2023-07-23 7:47 ` [PATCH v1 0/8] tools/nolibc: add 32/64-bit powerpc support Thomas Weißschuh
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=ZMATKempQBPGCY2v@biznet-home.integral.gnuweeb.org \
--to=ammarfaizi2@gnuweeb.org \
--cc=arnd@arndb.de \
--cc=falcon@tinylab.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=svens@linux.ibm.com \
--cc=thomas@t-8ch.de \
--cc=w@1wt.eu \
/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