STMicroelectronics/STM32CubeG4

__PKHBT and __PKHTB are STILL wrong

etheory opened this issue · 6 comments

As you can see here:

#if 0
#define __PKHBT(ARG1,ARG2,ARG3) \
({ \
uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \
__ASM ("pkhbt %0, %1, %2, lsl %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \
__RES; \
})
#define __PKHTB(ARG1,ARG2,ARG3) \
({ \
uint32_t __RES, __ARG1 = (ARG1), __ARG2 = (ARG2); \
if (ARG3 == 0) \
__ASM ("pkhtb %0, %1, %2" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2) ); \
else \
__ASM ("pkhtb %0, %1, %2, asr %3" : "=r" (__RES) : "r" (__ARG1), "r" (__ARG2), "I" (ARG3) ); \
__RES; \
})
#endif
#define __PKHBT(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0x0000FFFFUL) | \
((((uint32_t)(ARG2)) << (ARG3)) & 0xFFFF0000UL) )
#define __PKHTB(ARG1,ARG2,ARG3) ( ((((uint32_t)(ARG1)) ) & 0xFFFF0000UL) | \
((((uint32_t)(ARG2)) >> (ARG3)) & 0x0000FFFFUL) )

The version in this repository is STILL incorrect, and should be fixed please. Here is the CMSIS version:
https://github.com/ARM-software/CMSIS_5/blob/a75f01746df18bb5b929dfb8dc6c9407fac3a0f3/CMSIS/Core/Include/cmsis_gcc.h#L2183-L2200

I reported this months ago and you closed my PR since you said it didn't match the CMSIS version, but clearly it does: #39

Here is the commit change where they changed this: ARM-software/CMSIS_5@8a1fd91

Hello @etheory,

The latest version of CMSIS available on the STM32CubeG4 repository is 5.6.0, which does not include the most recent commits indicating that this change has already been made."

image

I will forward this matter to the development team to determine whether we will integrate the latest version of CMSIS.

Thank you for your contribution.

Regards,

Hello @etheory,

The latest version of CMSIS available on the STM32CubeG4 repository is 5.6.0, which does not include the most recent commits indicating that this change has already been made."

image

I will forward this matter to the development team to determine whether we will integrate the latest version of CMSIS.

Thank you for your contribution.

Regards,

@RJMSTM CMSIS-5.6.0 is 5 years old. The commit that resolved this issue is 2 years old. That's pretty old. It definitely feels like your dependencies should be more up to date than that. Thanks.