On Mon, 16 Nov 2026 at 08:53, Philippe Mathieu-Daudé
<[email protected]> wrote:
>
> On 13/11/26 19:55, Peter Maydell wrote:
> > As a more general question, is this something we would want
> > for architectures where both endiannesses are relevant (e.g.
> > mips, ppc64)? At the moment we consistently for all targets
> > handle big vs little endian as "it's a separate target with
> > its own executable". That's convenient because you can at
> > compile time hardwire in things like variations in struct
> > layout between the two. We could switch to doing that kind
> > of thing at runtime, but what is the benefit we're aiming
> > for by doing that?
>
> I did the other conversions (Microblaze, Xtensa, PPC, MIPS, SH4)
> and wanted to test the water first where this would get more attention,
> with the series involving less changes.
>
> My motivation is MIPS where we currently have 6 binaries and I'd like
> to add binaries to cover more ABIs without having a combinatory
> explosion and have 18 linux-user MIPS binaries. With this approach I
> reduced the current MIPS set to 3 binaries and add 2 more, ending with
> 5 covering more ABIs instead of currently 6.
>
> In order to get there I need the few core changes introduced in this
> series, which affect all user binaries. I have the idea ARM users are
> the first ones interested by no performance change thus is where
> I started the benchmark to prove this approach have no impact in emulation.
>
> The TargetInfo structure change (one initializer LTO-protected and
> all accessors via read-only exposed structure) is also what Richard
> was very keen to have (page size support planned) instead of the
> current approach.
>
> I'm thus returning the question as: why would we not want to do this?

Mostly because what we have today works, and the idea of "the
target ABI is known at compile-time" is quite deeply embedded in the
way the linux-user code is written (both in terms of ifdefs and
also C types being defined appropriately for one specific ABI).

The idea of not having to have 18 different MIPS linux-user binaries
is pretty tempting, though.

thanks
-- PMM

Reply via email to