Void PPC goes little-endian ... on 32-bit


It is frequently forgotten that just as 64-bit Power ISA comes in both big-endian (powerpc64, ppc64) and little-endian (ppc64le) variants, you can also have 32-bit little-endian (ppcle) as well as the classic 32-bit big-endian PowerPC most often encountered in Power Mac hardware. But such 32-bit little-endian systems have historically been quite rare (I struggle even to think of any), and distributions supporting them even more so.

So leave it to those wacky VoidPPC developers to not only spin a ppcle variant, but to even make it useful. It should be pointed out that such a distribution can run on little-endian OpenPOWER because there isn't the massive gulf between 32-bit and 64-bit PowerPC like there would be for x86 and x86_64. Accordingly, Daniel Kolesa demonstrated on Twitter a Blackbird running Void Linux but 32-bit little endian. Why do this on a 64-bit capable platform? Because it allows you to run certain 32-bit specific emulation systems like Box86 that due to their design don't run on 64-bit platforms (especially as Void is a 4K page system). And, true to form, the Blackbird was running Unreal Tournament 32-bit through Box86 at "fairly playable speed" — a game which was only ever made available for Linux as a 32-bit x86 binary (the PowerPC binaries were only for MacOS and Amiga). Such a feat with apparently acceptable performance is even more impressive given that Box86 doesn't have JIT support for ppcle either.

The ppcle spin (both glibc and musl variants) is already listed on the stats page and the port should be available shortly. Because of the unusualness of the architecture, cross-compilation depending on LLVM (and things that use it like Rust) may not yet work, but a significant slice of ports appear to already be built.

Comments

  1. https://devblogs.microsoft.com/oldnewthing/20180806-00/?p=99425 ;-)

    ReplyDelete
    Replies
    1. FTA: little endian mode on 6xx PowerPC is not true little-endian mode; it basically just swaps bus lines to make it appear little-endian.

      Delete
  2. we're planning some even more cursed things, like allowing the little endian userlands to work on G3/G4 powermacs

    also there is no technical issue with cross-compiling llvm-requiring stuff, it's just that things that need it on host to emit target ppcle code will not work yet because the ppcle support in llvm is newly patched in and the host toolchains have not yet been rebuilt; things that only require llvm or target work fine, so does cross-compiling llvm itself

    as for rust, i started porting it this week but now i'm gone until the end of year, so it will have to wait until january; i got it to crossbuild but there was some weird problem with cargo when attempting to self-bootstrap it later, so it needs investigating

    ReplyDelete
    Replies
    1. Its good to know I'm not the only one with cursed thoughts. I've been toying with cross compiling PowerPCLE packages for RiscySlack. Will definitely be checking out your works.

      Awesome job.

      Delete
    2. > allowing the little endian userlands to work on G3/G4 powermacs
      If this can work, does that mean that there's a possibility to make 64le userland to work on pre-POWER8 ppc64 machines?

      Delete

Post a Comment

Comments are subject to moderation. Be nice.