From 017962caec17f27a5438b0ab1be2ee3226d00a1c Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Mon, 30 Mar 2020 11:19:44 +0200 Subject: [PATCH] CMSIS-DSP: Fix for issue 874 --- Source/BasicMathFunctions/arm_scale_f32.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Source/BasicMathFunctions/arm_scale_f32.c b/Source/BasicMathFunctions/arm_scale_f32.c index 0b970191..053492f6 100644 --- a/Source/BasicMathFunctions/arm_scale_f32.c +++ b/Source/BasicMathFunctions/arm_scale_f32.c @@ -164,16 +164,23 @@ void arm_scale_f32( while (blkCnt > 0U) { + float32_t in1, in2, in3, in4; + /* C = A * scale */ /* Scale input and store result in destination buffer. */ - *pDst++ = (*pSrc++) * scale; + in1 = (*pSrc++) * scale; - *pDst++ = (*pSrc++) * scale; + in2 = (*pSrc++) * scale; - *pDst++ = (*pSrc++) * scale; + in3 = (*pSrc++) * scale; - *pDst++ = (*pSrc++) * scale; + in4 = (*pSrc++) * scale; + + *pDst++ = in1; + *pDst++ = in2; + *pDst++ = in3; + *pDst++ = in4; /* Decrement loop counter */ blkCnt--;