Skip to content

Add __addhf3, __subhf3, __mulhf3, and hf comparisons #1009

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

Merged
merged 2 commits into from
Aug 9, 2025

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Aug 9, 2025

LLVM does not currently emit these, but it is being discussed as an option on platforms where f32 is not hardware supported. Glibc/libgcc also has the comparison functions 1 already.

The generic implementations for addition, subtraction, and multiplication work for f16 without any complications, as do comparisons, so add them here.

@tgross35 tgross35 force-pushed the f16-basic-arith branch 3 times, most recently from c2b768c to 92227d1 Compare August 9, 2025 20:30
Like `__real@`, and `__xmm@`, Windows can emit duplicate `__ymm@`
symbols for constants.
LLVM does not currently emit these, but it is being discussed as an
option on platforms where `f32` is not hardware supported. Glibc/libgcc
also has the comparison functions [1] already.

The generic implementations for addition, subtraction, and
multiplication work for f16 without any complications, as do
comparisons, so add them here.

[1]: https://sourceware.org/git/?p=glibc.git;a=commit;h=6ec6c77867af4ddfec7323e0ac6ede89effca852
@tgross35 tgross35 marked this pull request as ready for review August 9, 2025 21:07
@tgross35 tgross35 merged commit 9c176c2 into rust-lang:master Aug 9, 2025
38 checks passed
@tgross35 tgross35 deleted the f16-basic-arith branch August 9, 2025 21:09
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.

1 participant