Skip to content

Commit 6e11dc2

Browse files
committed
Modification to arm_math.h
Remove redefinition of __CLZ and __SSAT.
1 parent c5a5438 commit 6e11dc2

File tree

2 files changed

+0
-108
lines changed

2 files changed

+0
-108
lines changed

cmsis/TARGET_CORTEX_M/arm_math.h

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -572,32 +572,6 @@ extern "C"
572572
(((q63_t) (x >> 32) * y)));
573573
}
574574

575-
/*
576-
#if defined (ARM_MATH_CM0_FAMILY) && defined ( __CC_ARM )
577-
#define __CLZ __clz
578-
#endif
579-
*/
580-
/* note: function can be removed when all toolchain support __CLZ for Cortex-M0 */
581-
#if defined (ARM_MATH_CM0_FAMILY) && ((defined (__ICCARM__)) )
582-
CMSIS_INLINE __STATIC_INLINE uint32_t __CLZ(
583-
q31_t data);
584-
585-
CMSIS_INLINE __STATIC_INLINE uint32_t __CLZ(
586-
q31_t data)
587-
{
588-
uint32_t count = 0;
589-
uint32_t mask = 0x80000000;
590-
591-
while ((data & mask) == 0)
592-
{
593-
count += 1u;
594-
mask = mask >> 1u;
595-
}
596-
597-
return (count);
598-
}
599-
#endif
600-
601575
/**
602576
* @brief Function to Calculates 1/in (reciprocal) value of Q31 Data type.
603577
*/
@@ -700,47 +674,6 @@ extern "C"
700674
return (signBits + 1);
701675
}
702676

703-
704-
/*
705-
* @brief C custom defined intrinisic function for only M0 processors
706-
*/
707-
#if defined(ARM_MATH_CM0_FAMILY)
708-
CMSIS_INLINE __STATIC_INLINE q31_t __SSAT(
709-
q31_t x,
710-
uint32_t y)
711-
{
712-
int32_t posMax, negMin;
713-
uint32_t i;
714-
715-
posMax = 1;
716-
for (i = 0; i < (y - 1); i++)
717-
{
718-
posMax = posMax * 2;
719-
}
720-
721-
if (x > 0)
722-
{
723-
posMax = (posMax - 1);
724-
725-
if (x > posMax)
726-
{
727-
x = posMax;
728-
}
729-
}
730-
else
731-
{
732-
negMin = -posMax;
733-
734-
if (x < negMin)
735-
{
736-
x = negMin;
737-
}
738-
}
739-
return (x);
740-
}
741-
#endif /* end of ARM_MATH_CM0_FAMILY */
742-
743-
744677
/*
745678
* @brief C custom defined intrinsic function for M3 and M0 processors
746679
*/

features/unsupported/dsp/cmsis_dsp/arm_math.h

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -659,47 +659,6 @@ extern "C"
659659
return (signBits + 1);
660660
}
661661

662-
663-
/*
664-
* @brief C custom defined intrinisic function for only M0 processors
665-
*/
666-
#if defined(ARM_MATH_CM0_FAMILY)
667-
static __INLINE q31_t __SSAT(
668-
q31_t x,
669-
uint32_t y)
670-
{
671-
int32_t posMax, negMin;
672-
uint32_t i;
673-
674-
posMax = 1;
675-
for (i = 0; i < (y - 1); i++)
676-
{
677-
posMax = posMax * 2;
678-
}
679-
680-
if(x > 0)
681-
{
682-
posMax = (posMax - 1);
683-
684-
if(x > posMax)
685-
{
686-
x = posMax;
687-
}
688-
}
689-
else
690-
{
691-
negMin = -posMax;
692-
693-
if(x < negMin)
694-
{
695-
x = negMin;
696-
}
697-
}
698-
return (x);
699-
}
700-
#endif /* end of ARM_MATH_CM0_FAMILY */
701-
702-
703662
/*
704663
* @brief C custom defined intrinsic function for M3 and M0 processors
705664
*/

0 commit comments

Comments
 (0)