From: Fredrik Noring <noring@nocrew.org>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: qemu-devel@nongnu.org,
"Richard Henderson" <richard.henderson@linaro.org>,
"Laurent Vivier" <laurent@vivier.eu>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Mathieu Malaterre" <malat@debian.org>,
"YunQiang Su" <wzssyqa@gmail.com>,
"James Cowgill" <james410@cowgill.org.uk>,
"David Daney" <ddaney.cavm@gmail.com>,
"Jürgen Urban" <JuergenUrban@gmx.de>,
"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [PATCH 3/4] default-configs: Support o32 ABI with 64-bit MIPS CPUs
Date: Sat, 12 Dec 2020 18:03:49 +0100 [thread overview]
Message-ID: <X9T39YSpcVb4kuWa@sx9> (raw)
In-Reply-To: <alpine.LFD.2.21.2011191634540.656242@eddie.linux-mips.org>
On Thu, Nov 19, 2020 at 04:45:29PM +0000, Maciej W. Rozycki wrote:
> On Thu, 19 Nov 2020, Philippe Mathieu-Daudé wrote:
>
> > MIPS o32 ABI on 64-bit CPUs looks like a ILP32-on-64bit data
> > model, allowing 64-bit arithmetic and data movement instructions.
> >
> > This is the default ABI used by the "Sony Linux Toolkit for
> > Playstation 2".
>
> Please don't, not at least with a generic configuration (i.e. make it
> unambiguous that this is R5900-specific). This only works with R5900
> because it does not implement the MIPS ISA correctly (e.g. see what $ra is
> set to with JAL/JALR/etc. in the kernel mode), and it is not supported by
> the standard Linux ABI. Use n32 instead, which has the same functionality
> and is standard (and is also a better ABI in terms of performance).
>
> You'd probably need to implement all the R5900 addressing quirks for your
> proposed hack to match hardware, or otherwise you'll end up with emulation
> that creates its own reality.
I agree. Modern Linux kernel and GCC are important too. It seems both o32
and n32, with quirks, are generally accepted, but R5900 MMIs and other
special features are less clear:
For example, given the fact that the 128-bit MMIs are unconditionally
executable on R5900 hardware, a user may be forgiven to believe that they
always work. But unless the Linux kernel restores 128-bit registers in its
operating mode switches, which could be o32, there will be silent data
corruption (and ensuing frustration).
(For this reason I favour full register restores in all operating modes.)
Fredrik
next prev parent reply other threads:[~2020-12-12 19:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 16:17 [PATCH 0/4] linux-user: Support o32 ABI with 64-bit MIPS CPUs Philippe Mathieu-Daudé
2020-11-19 16:17 ` [PATCH 1/4] linux-user/mips64: Restore setup_frame() for o32 ABI Philippe Mathieu-Daudé
2020-11-19 23:07 ` Richard Henderson
2020-12-17 10:18 ` Laurent Vivier
2021-02-11 21:33 ` Laurent Vivier
2020-11-19 16:17 ` [PATCH 2/4] linux-user/mips64: Support o32 ABI syscalls Philippe Mathieu-Daudé
2020-11-19 23:08 ` Richard Henderson
2020-11-19 23:09 ` Richard Henderson
2020-12-17 10:40 ` Laurent Vivier
2020-12-17 16:10 ` Philippe Mathieu-Daudé
2020-12-17 17:20 ` Fredrik Noring
2020-12-17 20:14 ` Laurent Vivier
2021-02-11 21:33 ` Laurent Vivier
2020-11-19 16:17 ` [PATCH 3/4] default-configs: Support o32 ABI with 64-bit MIPS CPUs Philippe Mathieu-Daudé
2020-11-19 16:45 ` Maciej W. Rozycki
2020-11-19 17:13 ` Philippe Mathieu-Daudé
2020-12-12 8:29 ` Fredrik Noring
2020-12-12 17:03 ` Fredrik Noring [this message]
2020-11-19 16:17 ` [PATCH 4/4] RFC qemu-binfmt-conf.sh: Add MIPS64 o32 ABI Philippe Mathieu-Daudé
2020-11-19 23:14 ` Richard Henderson
2020-11-19 16:27 ` [PATCH 0/4] linux-user: Support o32 ABI with 64-bit MIPS CPUs no-reply
2020-12-13 15:14 ` Philippe Mathieu-Daudé
2021-02-09 18:31 ` Philippe Mathieu-Daudé
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=X9T39YSpcVb4kuWa@sx9 \
--to=noring@nocrew.org \
--cc=JuergenUrban@gmx.de \
--cc=aurelien@aurel32.net \
--cc=ddaney.cavm@gmail.com \
--cc=f4bug@amsat.org \
--cc=james410@cowgill.org.uk \
--cc=laurent@vivier.eu \
--cc=macro@linux-mips.org \
--cc=malat@debian.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=wzssyqa@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).