diff options
author | Nebuleon Fumika | 2012-12-31 13:46:47 -0500 |
---|---|---|
committer | Nebuleon Fumika | 2012-12-31 13:46:47 -0500 |
commit | c5d385d6643e157d6f90d3608004f0f37b64ab75 (patch) | |
tree | 1f703aa40e11aded99b4e0a4476a21bd25074d61 /source/port.h | |
parent | 22fa90a3b3383cc5ba24ce61a7de1d9c64b6601b (diff) | |
download | snes9x2005-c5d385d6643e157d6f90d3608004f0f37b64ab75.tar.gz snes9x2005-c5d385d6643e157d6f90d3608004f0f37b64ab75.tar.bz2 snes9x2005-c5d385d6643e157d6f90d3608004f0f37b64ab75.zip |
MIPS requires 2-byte reads to be aligned to even addresses. #define FAST_ALIGNED_LSB_WORD_ACCESS and use it to read absolute 24-bit addresses as either 1 byte & 1 halfword, or 1 halfword & 1 byte.
Diffstat (limited to 'source/port.h')
-rw-r--r-- | source/port.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/port.h b/source/port.h index 5b94d06..1e34410 100644 --- a/source/port.h +++ b/source/port.h @@ -274,6 +274,11 @@ EXTERN_C void MixSound(void); defined(__WIN32__) || defined(__alpha__) #define LSB_FIRST #define FAST_LSB_WORD_ACCESS +#elif defined(__MIPSEL__) +#define LSB_FIRST +// On little-endian MIPS, a 16-bit word can be read directly from an address +// only if it's aligned. +#define FAST_ALIGNED_LSB_WORD_ACCESS #else //#define MSB_FIRST #define LSB_FIRST |