A.4 – Endianness Rules

<< Click to Display Table of Contents >>

Navigation:  ASA-EMulatR Reference Guide > Introduction > Appendix > Appendix A - Topics - Core >

A.4 – Endianness Rules

Alpha is always little-endian. There is no big-endian mode. This is an architectural constant across all Alpha generations (21064, 21164, 21264/EV6).

 

Instructions: 32-bit instructions are stored in little-endian format in memory. Opcode extraction works on little-endian values. No byte-swapping is needed for instruction fetch.

 

Data accesses: LDQ, LDL, LDWU, LDBU all read little-endian memory. STQ, STL, STW, STB all write little-endian. No automatic byte-swapping occurs in hardware.

 

Byte manipulation: Alpha provides byte manipulation instructions (INSWL, EXTQH, INSBL, EXTBL, etc.) for software-controlled byte operations. Big-endian data must be explicitly converted by software. OSF/1, Tru64 UNIX, and Linux/Alpha all assume little-endian memory layout.

 

MMIO: Some Alpha systems (AlphaServer) have I/O controllers that support per-device endianness configuration. This is handled by the I/O bridge/chipset, not the CPU. The CPU always operates in little-endian mode.

 

EmulatR implementation rule: SafeMemory stores all data in host-native format (little-endian on x86-64 hosts). No byte-swapping layer exists in the memory path. If running on a big-endian host (not a current target), a byte-swap layer would need to be added at the SafeMemory boundary.

 

See Also: Alpha Architecture Reference Manual – Data Types; Chapter 15 – Memory System Implementation Details (SafeMemory).