Originally Posted by Darkstar
I never understood what the big advantage of having a BE/LE switchable CPU was. I mean couldn't they decide on either one and stick with it? or maybe create two different hardware versions, one for BE and one for LE? why the need for switching at runtime?
When the AIM alliance (Apple, IBM and Motorola) sat down and agreed on the requirements for the CPU that they would use to take over (computing) world, requirements included being able to run some form of MacOS, OS/2, Windows and AIX, and being capable of emulating 68k and x86 at usable speeds in software. MacOS was full of big endian assumptions, while OS/2 and Windows were full of little endian assumptions.

The candidates for the architecture to us as the basis were IBM POWER and Motorola RipFire 88k. POWER already had relatively mature tools as IBM had been deploying it in the AIX RS/6000 series for a while. They removed some instructions that were expensive to implement in terms of silicon (e.g. saturating add/subtract) or reduced performance in superscalar architectures (e.g. MQ register and associated multiply/divide). They added some extra instructions that they thought would be nice and re-defined the MMU. Little endian mode was added to give just the minimum functionality needed to OS/2 and Windows. There was no way they were going to make different chips for BE and LE - it would just be to expensive to set up volume production for, and you'd end up with twice the overhead for test harnesses, QA, etc.

The 601 is a transitional chip. It implements all 32-bit POWER and PowerPC instructions that were defined at the time, and it uses the old POWER MMU and page table format. This allowed people to use the existing IBM and GNU compilers immediately without waiting for updates that didn't try to use the deprecated features. The 603 and later PowerPC chips drop the deprecated features and use the new PowerPC MMU and page table format. Later POWER chips (POWER4 and later IIRC) implement PowerPC as well, and AIX emulates the old deprecated user mode instructions in software.

IBM ported AIX to PowerPC little endian so it could run on the "generic" PReP motherboards. Despite always running big endian on SPARC, Solaris runs little endian on PPC for the same reason. The IBM PPC ThinkPad 800 series is little endian to allow users to run Windows and Solaris. Of course, MacOS never ran little endian on PowerPC - that only happened on x86 with Rhapsody and OSX.

edit: here's a good article on the changes from POWER to PowerPC, including motivations:
http://www.cs.virginia.edu/~jm6dg/fractal/backup/misc/powerpc.pdf

Last edited by Vas Crabb; 01/25/14 01:01 PM.