diff options
| author | Trevor Gross <tmgross@umich.edu> | 2024-08-19 15:46:05 -0500 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2024-09-24 18:32:58 +0200 |
| commit | 764a177497f9cb27d788e5734b775053187607ac (patch) | |
| tree | 51653e287b13176e134f7ac553f560a6b606078d /library/compiler-builtins/testcrate/tests/div_rem.rs | |
| parent | 4f8afbabdc26f140e2800056440ed14876976b80 (diff) | |
| download | rust-764a177497f9cb27d788e5734b775053187607ac.tar.gz rust-764a177497f9cb27d788e5734b775053187607ac.zip | |
Add `f128` division
Use the new generic division algorithm to expose `__divtf3` and `__divkf3`.
Diffstat (limited to 'library/compiler-builtins/testcrate/tests/div_rem.rs')
| -rw-r--r-- | library/compiler-builtins/testcrate/tests/div_rem.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/library/compiler-builtins/testcrate/tests/div_rem.rs b/library/compiler-builtins/testcrate/tests/div_rem.rs index 2de61c707d8..ac87eb6302b 100644 --- a/library/compiler-builtins/testcrate/tests/div_rem.rs +++ b/library/compiler-builtins/testcrate/tests/div_rem.rs @@ -1,3 +1,4 @@ +#![feature(f128)] #![allow(unused_macros)] use compiler_builtins::int::sdiv::{__divmoddi4, __divmodsi4, __divmodti4}; @@ -146,4 +147,19 @@ mod float_div { f32, __divsf3, Single, all(); f64, __divdf3, Double, all(); } + + #[cfg(not(feature = "no-f16-f128"))] + #[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))] + float! { + f128, __divtf3, Quad, + // FIXME(llvm): there is a bug in LLVM rt. + // See <https://github.com/llvm/llvm-project/issues/91840>. + not(any(feature = "no-sys-f128", all(target_arch = "aarch64", target_os = "linux"))); + } + + #[cfg(not(feature = "no-f16-f128"))] + #[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))] + float! { + f128, __divkf3, Quad, not(feature = "no-sys-f128"); + } } |
