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

fix divdi3 expand #71

Open
GoogleCodeExporter opened this issue May 5, 2016 · 1 comment
Open

fix divdi3 expand #71

GoogleCodeExporter opened this issue May 5, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

with our method of converting 64 bit int to 64 bit FP, using FP div and
truncation the result, we can only safely divide 64 bit ints that are
strictly lower than 2^53 (size of mantissa in IEEE-754 double precision
binary format is 52 bits).

for numbers >= 2^53 we should call the sw DF division routine (probably
built by soft-fp).

Original issue reported on code.google.com by [email protected] on 9 Dec 2008 at 4:37

@GoogleCodeExporter
Copy link
Author

argh, my bad, this should be listed as enhancement. this probably comes from 
looking
at the gcc source for way too long.

currently, we call the libgcc2 divdi3 routine. this is ok for the time being in 
order
to get gcc fully working asap.

for performance reasons, we should use hw FP div for DI numbers <2^53, and 
libgcc2
routine for larger numbers. for that we will have to (a) code and expand that 
will do
runtime checking of DI variable values and decide which way to go, and (b)
appropriate *constrained* insertions that will choose which way to go for 
build-time
constants.

Original comment by [email protected] on 10 Dec 2008 at 9:27

  • Added labels: Priority-Low, Type-Enhancement
  • Removed labels: Priority-High, Type-Defect

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

1 participant