Halfword memory accesses
The compiler now knows the LDRH and STRH instructions and will use them if
you specify "-cpu 4" (or later). If you do use "-cpu 4" (meaning StrongARM or
later), also specify "-memaccess -L22-S22" if you want your software to be
Risc PC-compatible. This is because the Risc PC memory system does not
support halfword accesses, even though the StrongARM does. LDRSB does work
on the Risc PC, and will be used if "-cpu 4" is specified regardless of the
-memaccess setting.
The -memaccess option allows (or disallows) specific types of memory access;
it is used to indicate capabilities of the memory system beyond the ARM core.
The current types are:
L22 load of a halfword from a halfword-aligned address
S22 store of a halfword to a halfword-aligned address
L41 load of a (rotated) word from a byte-aligned address
By default, all three are enabled. In the -memaccess option, prefix with "+"
to enable or "-" to disable, as in the example above.
|