summaryrefslogtreecommitdiff
path: root/shared-module/audiomixer
diff options
context:
space:
mode:
authorjepler <jepler@gmail.com>2019-09-08 21:17:36 -0500
committerjepler <jepler@gmail.com>2019-09-08 21:18:15 -0500
commit8768896d6b0ddb35568ad996781a33fd3a0df94f (patch)
tree51567ae9ec7d8f1ac803f5808c1b0ce2e178553f /shared-module/audiomixer
parentbd7b03fc7ec1ca4f255e45e680d9fd053ad8ff4f (diff)
audiomixer: Supply constants in a way "-Og" optimization expects
These arguments are constrained to be compile-time constants, a fact that gcc complains about under "-Og" optimization, but not in normal builds. Declare them as enumerated types
Diffstat (limited to 'shared-module/audiomixer')
-rw-r--r--shared-module/audiomixer/Mixer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shared-module/audiomixer/Mixer.c b/shared-module/audiomixer/Mixer.c
index e0fb4fab8..a52489f85 100644
--- a/shared-module/audiomixer/Mixer.c
+++ b/shared-module/audiomixer/Mixer.c
@@ -262,8 +262,8 @@ static inline uint32_t mult16signed(uint32_t val, int32_t mul) {
}
#if (defined (__ARM_ARCH_7EM__) && (__ARM_ARCH_7EM__ == 1)) //Cortex-M4 w/FPU
int32_t hi, lo;
- int32_t bits = 16; // saturate to 16 bits
- int32_t shift = 0; // shift is done automatically
+ enum { bits = 16 }; // saturate to 16 bits
+ enum { shift = 0 }; // shift is done automatically
asm volatile("smulwb %0, %1, %2" : "=r" (lo) : "r" (mul), "r" (val));
asm volatile("smulwt %0, %1, %2" : "=r" (hi) : "r" (mul), "r" (val));
asm volatile("ssat %0, %1, %2, asr %3" : "=r" (lo) : "I" (bits), "r" (lo), "I" (shift));