Hacker News new | ask | show | jobs
by bawolff 1673 days ago
Interesting. What would the benefit be of changing endianess at runtime?

From an efficiency perspective does that mean the chip has to do both so worst of both worlds?

[I dont know much about the world of cpu design, these might be stupid questions]

2 comments

It's more something you'd do at boot, if you had to select between an OS built for one or another.

The POWER ISA was used in PowerPC which was used for the successors of a few 68k machines (most famously the Macintosh) and in that case the OS was built for big-endian. So having big-endian support was key there.

IBM i and AIX still run big, in fact. Important for IBM's institutional customers.

As for endian shifts, technically every OpenPOWER chip goes big for every OPAL call into the low-level HAL, even if the OS is little. The overhead is minimal. I can't think of much application use for that, though (per-page endianness which some PowerPCs supported is much more useful).

Network application.

The CPU probably works on just one endianess and convert the data format when reading from memory. The overhead is on kepping track when to do it. But Im speculating, havent looked into this.