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 __truncdfsf2 intrinsic #448

Merged
merged 4 commits into from
Dec 13, 2021
Merged

Add __truncdfsf2 intrinsic #448

merged 4 commits into from
Dec 13, 2021

Conversation

ayrtonm
Copy link
Contributor

@ayrtonm ayrtonm commented Dec 12, 2021

This adds the truncdfsf2 intrinsic and a corresponding fuzz test case. I also kept the implementation of trunc generic to make it easy to add truncdfhf2 and truncsfhf2 if rust ever gets f16 support.

This adds the truncdfsf2 intrinsic and a corresponding fuzz test case. The
implementation of trunc is generic to make it easy to add truncdfhs2 and
truncsfhf2 if rust ever gets `f16` support.
@ayrtonm
Copy link
Contributor Author

ayrtonm commented Dec 12, 2021

I added __truncdfsf2vfp to try to fix the failing thumbv7 tests, but I'm not sure if I need to add anything else to make sure LLVM generates the optimized version from compiler-rt.

Also looks like there's some issues when checking for duplicate symbols on both arm and x86, so I think the issue may be unrelated. I removed truncdfsf2.c from build.rs locally but nm still shows the __truncdfsf2 symbol in the rlib that's causing CI to fail so I'm not sure what I'm missing.

@Amanieu
Copy link
Member

Amanieu commented Dec 13, 2021

You may need to add #[maybe_use_optimized_c_shim], see the explanation in macros.rs.

…dfsf2vfp

Also fixed the calling convention for truncdfsf2 on ARM
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