Skip to content
Snippets Groups Projects
Commit 2040606f authored by Timothy B. Terriberry's avatar Timothy B. Terriberry
Browse files

Minor ARMv5E cleanups.

Missed the armv5e extension on a couple of functions.
parent 006273c5
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,8 @@ static inline opus_val32 MAC16_32_Q15_armv5e(opus_val32 c, opus_val16 a,
/** 16x16 multiply-add where the result fits in 32 bits */
#undef MAC16_16
static inline opus_val32 MAC16_16(opus_val32 c, opus_val16 a, opus_val16 b)
static inline opus_val32 MAC16_16_armv5e(opus_val32 c, opus_val16 a,
opus_val16 b)
{
int res;
__asm__(
......@@ -95,11 +96,11 @@ static inline opus_val32 MAC16_16(opus_val32 c, opus_val16 a, opus_val16 b)
);
return res;
}
#define MAC16_16(c, a, b) (MAC16_16(c, a, b))
#define MAC16_16(c, a, b) (MAC16_16_armv5e(c, a, b))
/** 16x16 multiplication where the result fits in 32 bits */
#undef MULT16_16
static inline opus_val32 MULT16_16(opus_val16 a, opus_val16 b)
static inline opus_val32 MULT16_16_armv5e(opus_val16 a, opus_val16 b)
{
int res;
__asm__(
......@@ -110,6 +111,6 @@ static inline opus_val32 MULT16_16(opus_val16 a, opus_val16 b)
);
return res;
}
#define MULT16_16(a, b) (MULT16_16(a, b))
#define MULT16_16(a, b) (MULT16_16_armv5e(a, b))
#endif
......@@ -108,7 +108,9 @@
/** 16x16 multiply-add where the result fits in 32 bits */
#define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b))))
/** 16x32 multiply-add, followed by a 15-bit shift right. Results fits in 32 bits */
/** 16x32 multiply, followed by a 15-bit shift right and 32-bit add.
b must fit in 31 bits.
Result fits in 32 bits. */
#define MAC16_32_Q15(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15)))
#define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment