C/C++ Development Suite
Login
Introduction
Summary of changes from 5.54 to 5.55
Summary of changes up to 5.60
Summary of changes from 5.61 to 5.64
Halfword memory access
Packed structs
Inline assembler
C99 pragmas
Constant data
Global data controls
New/changed options

Downloads
Downloads Year 2

   

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.

© 2003/2006 Castle Technology Ltd 32-bit RISC OS