diff options
| author | Harm Hanemaaijer <fgenfb@yahoo.com> | 2013-07-12 16:23:34 +0200 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:57:10 +0200 |
| commit | 3491087e78064e411066ee17b07d7abad4af3e84 (patch) | |
| tree | 95677199bfe8707fe3351153cd1bf5daf4de69f5 /scripts/Makefile.lib | |
| parent | 3edd7a2c542d2489ad734023966721ab87e7109e (diff) | |
Optimize ARM memset and memzero functions
The ARM memset and memzero functions are optimized with lower overhead
for small requests, generation of more 16-bit Thumb2 instructions when
compiled in Thumb2 mode, and configurable destination alignment before
the main block-copying loop.
The new compile-time constant MEMSET_WRITE_ALIGN_BYTES is introduced
in assembler.h, to augment the CALGN macro that previously regulated
32-byte write alignment but was only used on the Feroceon platform.
MEMSET_WRITE_ALIGN_BYTES can have values of 0 (no write alignment),
8, or 32. Apart from Feroceon, memset write alignment of 32 bytes
appears to benefit the armv6 platform, while the armv7 platform
seems benefit from alignment to 8 bytes for memset/memzero.
The CALGN macro is renamed to MEMSET_CALGN for memset and memzero; the
original CALGN macro is reserved for the memcpy family of functions
(memcpy, copy_from_user, copy_to_user) currently implemented in
copy_template.S, and the associated compile time constant
WRITE_ALIGN_BYTES defines the write alignment for memcpy-related
functions that will be utilized in subsequent contributions. Because
the current CALGN implementation in copy_template.S only implements
32-byte write alignment and is broken on Thumb2, it is only enabled
when WRITE_ALIGN_BYTES is equal to 32 and Thumb2 mode is not enabled.
Finally, memset and memzero now include a directive to enable unified
ARM assembler syntax.
Signed-off-by: Harm Hanemaaijer <fgenfb@yahoo.com>
Diffstat (limited to 'scripts/Makefile.lib')
0 files changed, 0 insertions, 0 deletions
