Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Enable MPFR tests on i586 #404

Merged
merged 2 commits into from
Jan 6, 2025
Merged

Enable MPFR tests on i586 #404

merged 2 commits into from
Jan 6, 2025

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jan 6, 2025

No description provided.

@programmerjake
Copy link
Member

i think for i586 it should just use frndint with setting the x87 CW (actually not slow) for floor/ceil. like: https://github.com/NetBSD/src/blob/20433927938987dd64c8f6aa46904b7aca3fa39e/lib/libm/arch/i387/s_ceil.S

if asm! supported x87 registers as inputs/outputs, that would be nice...

@tgross35 tgross35 changed the title Enable MPFR on i586 Enable MPFR tests on i586 Jan 6, 2025
@tgross35 tgross35 marked this pull request as ready for review January 6, 2025 20:33
@tgross35
Copy link
Contributor Author

tgross35 commented Jan 6, 2025

i think for i586 it should just use frndint with setting the x87 CW (actually not slow) for floor/ceil. like: https://github.com/NetBSD/src/blob/20433927938987dd64c8f6aa46904b7aca3fa39e/lib/libm/arch/i387/s_ceil.S

These showed up when I (recently) enabled tests against musl for edge cases, I just marked them xfail to unblock adding tests 5e0c840. This sounds like a good idea though, assuming that is license-compatible (looks like it) we could probably reuse a few x87 routines from there. Opened rust-lang/compiler-builtins#837 to track it.

Somewhat more concerning is that it looks like our fmaf and fdim are not always accurate on this platform...

if asm! supported x87 registers as inputs/outputs, that would be nice...

Yeah, I know a f80 in core::arch has been discussed a lot. I'll probably pick this up after f128 and f16 get further along if nobody else has gotten to it at that point.

MPFR does build and run correctly without SSE, but requires
`force-cross` be enabled.
These will need to be fixed, for now just xfail them so this doesn't
block better test coverage.
@tgross35 tgross35 enabled auto-merge January 6, 2025 20:41
@tgross35 tgross35 merged commit 9d043c5 into rust-lang:master Jan 6, 2025
35 checks passed
@programmerjake
Copy link
Member

if asm! supported x87 registers as inputs/outputs, that would be nice...

Yeah, I know a f80 in core::arch has been discussed a lot. I'll probably pick this up after f128 and f16 get further along if nobody else has gotten to it at that point.

i meant passing a f32 or f64 in a x87 register, we don't need to wait for f80 for that.

@tgross35 tgross35 deleted the i586-mpfr branch January 6, 2025 21:04
tgross35 added a commit that referenced this pull request Apr 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants