MIPS: add another mipsr2 endian function
Used by WAV and AIFF encoders for recording. Change-Id: If1bf05583c6b5c123c91eb9c4dfe0e11efd3a0f7
This commit is contained in:
parent
f64e8dc33c
commit
c78ba1aa68
1 changed files with 7 additions and 0 deletions
|
@ -41,4 +41,11 @@ static inline uint16_t swap16_hw(uint16_t value)
|
||||||
return (uint16_t)out;
|
return (uint16_t)out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline uint32_t swap_odd_even32_hw(uint32_t value)
|
||||||
|
{
|
||||||
|
register uint32_t out;
|
||||||
|
__asm__ ("wsbh %0, %1" : "=r"(out) : "r"(value));
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* __MIPSR2_ENDIAN_H__ */
|
#endif /* __MIPSR2_ENDIAN_H__ */
|
||||||
|
|
Loading…
Reference in a new issue