Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__PKHBT and __PKHTB are STILL wrong #49

Open
etheory opened this issue Mar 27, 2024 · 2 comments
Open

__PKHBT and __PKHTB are STILL wrong #49

etheory opened this issue Mar 27, 2024 · 2 comments
Assignees
Labels
bug Something isn't working cmsis CMSIS-related issue or pull-request.

Comments

@etheory
Copy link

etheory commented Mar 27, 2024

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

@RJMSTM RJMSTM self-assigned this Mar 28, 2024
@RJMSTM RJMSTM added the cmsis CMSIS-related issue or pull-request. label Mar 28, 2024
@RJMSTM
Copy link
Contributor

RJMSTM commented Mar 29, 2024

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 RJMSTM moved this from To do to Analyzed in stm32cube-mcu-fw-dashboard Mar 29, 2024
@etheory
Copy link
Author

etheory commented Mar 29, 2024

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.

@ALABSTM ALABSTM added the bug Something isn't working label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cmsis CMSIS-related issue or pull-request.
Projects
Development

No branches or pull requests

3 participants