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

reduced register set runtime incorrectly calculates modulo with __umodsi3 #355

Closed
iguryanov opened this issue Mar 21, 2021 · 1 comment
Closed
Assignees
Milestone

Comments

@iguryanov
Copy link

iguryanov commented Mar 21, 2021

Hi,

I was running some tests with em_mini 16registers target, took libgcc.a from 2021.03 release candidate.

At least em_mini has issues with calculating unsinged int modulo with __umodsi3().
for unsigned int X bigger than 0xa000_0000 "x % 10" is always equals x.

I tested only em_mini, only unsigned integers and only 10 on right side.
And to make test faster I checked only for results bigger than 9, not for absolute correctness.

Regards,
Igor.

@claziss
Copy link
Contributor

claziss commented Mar 22, 2021

Thanks for this one. The mask used in udivmodsi4 was wrong. Fixed by this commit:

foss-for-synopsys-dwc-arc-processors/gcc@55a92c9

@abrodkin abrodkin added this to the 2021.03 milestone Mar 23, 2021
@abrodkin abrodkin added bug component: gcc release notes Items to mention in release notes and removed release notes Items to mention in release notes labels Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants