forked from len0rd/rockbox
ARMv6 supports unaligned memory accesses and they are enabled on our only ARMv6 target so we might as well use them. Speeds up decoding of a flac8 file by 3.5%.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28183 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
918e895c12
commit
5b2d7e23a0
1 changed files with 3 additions and 3 deletions
|
@ -186,9 +186,9 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef AV_RB32
|
#ifndef AV_RB32
|
||||||
/* Coldfire cpu's support unaligned long reads */
|
/* Coldfire and ARMv6 and above support unaligned long reads */
|
||||||
#ifdef CPU_COLDFIRE
|
#if defined CPU_COLDFIRE || (defined CPU_ARM && ARM_ARCH >= 6)
|
||||||
#define AV_RB32(x) (*(const uint32_t*)(x))
|
#define AV_RB32(x) (htobe32(*(const uint32_t*)(x)))
|
||||||
#else
|
#else
|
||||||
# define AV_RB32(x) \
|
# define AV_RB32(x) \
|
||||||
((((const uint8_t*)(x))[0] << 24) | \
|
((((const uint8_t*)(x))[0] << 24) | \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue