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

Bug in Signed Saturate function of cores/teensy4/core_cmInstr.h #709

Closed
waxxmaster opened this issue Jul 30, 2023 · 0 comments
Closed

Bug in Signed Saturate function of cores/teensy4/core_cmInstr.h #709

waxxmaster opened this issue Jul 30, 2023 · 0 comments

Comments

@waxxmaster
Copy link

Hello !

The input and return type of the signed saturate function ( __SSAT(ARG1,ARG2) ) is incorrect in the file : cores/teensy4/core_cmInstr.h

it should be int32_t, but it is declared as uin32_t like the __USAT function below.

Correct code :

#define __SSAT(ARG1,ARG2) \ ({ \ int32_t __RES, __ARG1 = (ARG1); \ __ASM ("ssat %0, %1, %2" : "=r" (__RES) : "I" (ARG2), "r" (__ARG1) ); \ __RES; \ })

Is this possible to correct it ?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant