Guillaume Gomez
e6f17e4bbb
Rollup merge of #153834 - N1ark:generic-float-intrinsics, r=tgross35,RalfJung
...
Merge `fabsf16/32/64/128` into `fabs::<F>`
Following [a small conversation on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Float.20intrinsics/with/521501401 ) (and because I'd be interested in starting to contribute on Rust), I thought I'd give a try at merging the float intrinsics :)
This PR just merges `fabsf16`, `fabsf32`, `fabsf64`, `fabsf128`, as it felt like an easy first target.
Notes:
- I'm opening the PR for one intrinsic as it's probably easier if the shift is done one intrinsic at a time, but let me know if you'd rather I do several at a time to reduce the number of PRs.
- Currently this PR increases LOCs, despite being an attempt at simplifying the intrinsics/compilers. I believe this increase is a one time thing as I had to define new functions and move some things around, and hopefully future PRs/commits will reduce overall LoCs
- `fabsf32` and `fabsf64` are `#[rustc_intrinsic_const_stable_indirect]`, while `fabsf16` and `fabsf128` aren't; because `f32`/`f64` expect the function to be const, the generic version must be made indirectly stable too. We'd need to check with T-lang this change is ok; the only other intrinsics where there is such a mismatch is `minnum`, `maxnum` and `copysign`.
- I haven't touched libm because I'm not familiar with how it works; any guidance would be welcome!
2026-03-29 00:06:50 +01:00
..
2026-03-23 12:14:52 +01:00
2026-03-28 16:18:11 +09:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-03-02 00:23:24 +01:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2025-11-03 16:24:36 +00:00
2026-01-05 15:35:01 +09:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2026-01-13 14:32:48 +05:30
2026-01-13 14:32:48 +05:30
2025-12-02 18:25:13 +00:00
2026-02-26 23:34:41 +08:00
2026-02-26 23:34:41 +08:00
2025-08-27 00:23:26 -04:00
2025-08-27 00:23:26 -04:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-03-28 16:18:11 +09:00
2026-03-28 16:18:11 +09:00
2026-03-09 09:11:06 +00:00
2026-03-09 09:11:06 +00:00
2026-03-09 09:11:06 +00:00
2026-03-09 09:11:06 +00:00
2026-03-09 09:11:06 +00:00
2026-03-09 09:11:06 +00:00
2026-03-09 09:11:06 +00:00
2026-03-09 09:11:06 +00:00
2026-03-09 09:11:06 +00:00
2026-03-09 09:11:06 +00:00
2026-03-09 09:11:06 +00:00
2026-03-09 09:11:06 +00:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2026-02-04 04:45:52 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-02-16 22:39:22 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-03-16 21:49:04 +00:00
2026-03-16 21:49:04 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2025-11-03 16:24:36 +00:00
2025-11-03 16:24:36 +00:00
2025-11-27 11:19:00 -05:00
2025-12-12 16:22:25 +00:00
2025-12-12 16:22:25 +00:00
2026-01-18 04:34:46 +09:00
2026-01-18 04:34:46 +09:00
2026-02-27 22:54:10 +09:00
2026-02-27 22:54:10 +09:00
2026-02-27 22:54:10 +09:00
2026-02-27 22:54:10 +09:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-01-16 18:17:35 +01:00
2026-01-16 18:17:35 +01:00
2025-11-03 16:24:36 +00:00
2025-11-03 16:24:36 +00:00
2025-12-09 17:29:23 +00:00
2025-11-03 16:24:36 +00:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-12-02 18:25:13 +00:00
2025-12-02 18:25:13 +00:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-12-02 18:25:13 +00:00
2025-11-08 07:37:15 +01:00
2025-11-03 16:24:35 +00:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-12-09 17:29:23 +00:00
2025-11-03 16:24:36 +00:00
2025-11-03 16:24:36 +00:00
2025-12-02 18:25:13 +00:00
2025-12-02 18:25:13 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:53 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-03-28 16:18:11 +09:00
2026-03-28 16:18:11 +09:00
2025-12-02 18:25:13 +00:00
2025-12-02 18:25:13 +00:00
2025-12-02 18:25:13 +00:00
2025-12-02 18:25:13 +00:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2026-02-26 23:34:41 +08:00
2026-02-26 23:34:41 +08:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2025-12-09 17:29:23 +00:00
2026-03-28 16:18:11 +09:00
2026-03-28 16:18:11 +09:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2025-09-12 14:45:12 -04:00
2025-12-02 18:25:13 +00:00
2025-12-16 02:10:08 +09:00
2025-12-16 02:10:08 +09:00
2025-12-18 21:18:05 +01:00
2025-12-18 21:18:05 +01:00
2026-03-15 01:50:36 +00:00
2025-12-02 11:24:03 +09:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-21 12:38:17 +00:00
2026-03-17 17:30:56 +01:00
2026-03-17 17:30:56 +01:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2025-11-27 11:19:00 -05:00
2025-12-09 17:29:23 +00:00
2025-11-27 11:19:00 -05:00
2025-12-09 17:29:23 +00:00
2025-10-25 22:46:15 +01:00
2025-10-25 22:46:15 +01:00
2026-03-17 17:39:59 +08:00
2025-12-18 21:18:05 +01:00
2026-03-16 22:22:25 +08:00
2026-03-16 22:22:25 +08:00
2026-01-27 09:42:38 +11:00
2026-01-27 09:42:38 +11:00
2025-12-02 18:25:13 +00:00
2025-11-19 15:50:40 +00:00
2025-11-19 15:50:40 +00:00
2026-02-10 13:45:09 +01:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2026-02-26 23:34:41 +08:00
2026-02-26 23:34:41 +08:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-12-02 18:25:13 +00:00
2026-03-17 17:39:59 +08:00
2025-11-03 16:24:36 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-01-05 15:35:01 +09:00
2026-02-22 11:40:27 +01:00
2026-03-05 23:53:54 +01:00
2026-02-01 04:09:25 +00:00
2026-02-01 04:09:25 +00:00
2026-02-01 04:09:25 +00:00
2026-02-01 04:09:25 +00:00
2026-02-04 04:45:52 +00:00
2025-12-17 14:53:14 +00:00
2025-12-17 14:53:14 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2025-12-09 17:29:23 +00:00
2025-12-09 17:29:23 +00:00
2026-03-28 16:18:11 +09:00
2026-03-28 16:18:11 +09:00
2025-11-27 11:19:00 -05:00
2026-02-19 21:24:47 +03:00
2025-08-27 15:06:05 -04:00
2025-08-27 15:06:05 -04:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2025-09-25 20:36:14 +03:00
2025-09-25 20:36:14 +03:00
2025-11-27 11:19:00 -05:00
2025-11-27 11:19:00 -05:00
2025-12-02 18:25:13 +00:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00
2025-11-03 16:24:36 +00:00
2025-11-03 16:24:36 +00:00
2025-11-27 11:19:00 -05:00
2026-02-17 16:51:44 +00:00
2026-02-17 16:51:44 +00:00