
1.6 R4000 Processor

When the R4000 processor is configured as a big-endian system, byte 0 is the most-significant (leftmost) byte, thereby providing compatibility with MC 68000, and IBM 370, conventions. Figure 1-4 shows this configuration.
Figure 1-4 Big-Endian Byte Ordering
When configured as a little-endian system, byte 0 is always the least-significant (rightmost) byte, which is compatible with iAPX, x86 and DEC VAX, conventions. Figure 1-5 shows this configuration.
Figure 1-5 Little-Endian Byte Ordering
In this text, bit 0 is always the least-significant (rightmost) bit; thus, bit designations are always little-endian (although no instructions explicitly designate bit positions within words).
Figures 1-6 and 1-7 show little-endian and big-endian byte ordering in doublewords.
Figure 1-6 Little-Endian Data in a Doubleword
Figure 1-7 Big-Endian Data in a Doubleword
The CPU uses byte addressing for halfword, word, and doubleword accesses with the following alignment constraints:
LWL LWR SWL SWR
LDL LDR SDL SDR
These instructions are used in pairs to provide addressing of misaligned words. Addressing misaligned data incurs one additional instruction cycle over that required for addressing aligned data.
Figures 1-8 and 1-9 show the access of a misaligned word that has byte address 3.
Figure 1-8 Big-Endian Misaligned Word Addressing
Figure 1-9 Little-Endian Misaligned Word Addressing
Generated with CERN WebMaker
The following special instructions load and store words that are not aligned on 4-byte (word) or 8-word (doubleword) boundaries:

Copyright 1996, MIPS Technologies, Inc. -- 21 MAR 96




![]()