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

arc soft float multiply error #695

Open
keith-packard opened this issue Aug 14, 2023 · 3 comments
Open

arc soft float multiply error #695

keith-packard opened this issue Aug 14, 2023 · 3 comments
Labels
area: GCC Issues related to GCC (GNU Compiler Collection)

Comments

@keith-packard
Copy link
Collaborator

I found one case where the soft 32-bit float multiplication function, __mulsf3, for arc is generating an incorrect result.

0x1.000002p-2f * 0x1.000002p-126f

The exact result is 0x1.000004000004p-128, or 0x0.400001000001p-126. This should get rounded to 0x0.400002p-126, but the arc soft float code returns 0x0.4p-126.

I've tested soft float on arm and riscv and they both work correctly, along with various hardware floating point devices as well

@keith-packard keith-packard added the area: GCC Issues related to GCC (GNU Compiler Collection) label Aug 14, 2023
@abrodkin
Copy link
Collaborator

Cc @claziss

@claziss
Copy link

claziss commented Aug 15, 2023

Please @keith-packard can you tell me for which architecture you see this, and what gcc version u use?

@keith-packard
Copy link
Collaborator Author

GCC for Zephyr SDK 0.16.2-rc1 (12.2.0). arcem, archs and em architectures. I'm pretty sure it's just a bug in the custom arc soft float assembly implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: GCC Issues related to GCC (GNU Compiler Collection)
Projects
None yet
Development

No branches or pull requests

3 participants