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

Add f128 float to integer conversion functions #613

Merged
merged 5 commits into from
May 21, 2024

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented May 16, 2024

Add the following:

  • __fixtfsi
  • __fixtfdi
  • __fixtfti
  • __fixunstfsi
  • __fixunstfdi
  • __fixunstfti

@tgross35 tgross35 force-pushed the f16-f128-convert branch 3 times, most recently from 642d082 to 568377b Compare May 18, 2024 03:27
@tgross35 tgross35 changed the title Add f16 and f128 conversion functions Add f128 float to integer conversion functions May 18, 2024
@tgross35
Copy link
Contributor Author

I think this one should be all set now

@tgross35 tgross35 marked this pull request as ready for review May 18, 2024 03:45
}

if target.starts_with("i586") {
// i586 seems to not have ``__fixunstfti`, but does have everything else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's strange that this is only missing for i586 but not i686 since they should both be linking to the same libgcc. Are the docker images using different package versions for these 2 targets?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just didn't show up because i686 was already disabled a few lines up due to an ABI issue https://github.com/rust-lang/compiler-builtins/pull/613/files#diff-05ae0211bd995d6870067db299c32944cf2b743226442889bb07d48232afc2c5R22-R24. Interesting, I guess that specific issue must not be a problem on i586.

I explicitly listed i586 here to be clear.

Deduplicate code used for float to integer conversions in order to make
adding `f128` conversion functions easier.
tgross35 and others added 3 commits May 20, 2024 20:00
`as` casts are only allowed for primitives, doing the same operations
with `rustc_apfloat` requires using functions. Add a way to specify
these separately.
Add the following:

- `__fixtfsi`
- `__fixtfdi`
- `__fixtfti`
- `__fixunstfsi`
- `__fixunstfdi`
- `__fixunstfti`
@Amanieu Amanieu merged commit 1f701b0 into rust-lang:master May 21, 2024
24 checks passed
@tgross35 tgross35 deleted the f16-f128-convert branch May 21, 2024 00:06
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

Successfully merging this pull request may close these issues.

2 participants