Commit graph

1565 commits

Author SHA1 Message Date
Trevor Gross
54e7ff15c0 Revert "ci: Pin the nightly toolchain for i686-pc-windows-gnu"
Since [1], the issue should be resolved so the workaround can be
dropped.

This reverts commit 88e83b96ad09f3cf9e2d1b4543a7d43f9c5a77c0.

[1]: https://github.com/rust-lang/compiler-builtins/pull/759
2025-02-23 03:40:11 -05:00
github-actions[bot]
f851256581 chore: release v0.1.147 2025-02-19 19:16:19 -05:00
Ralf Jung
2b6de7a68f remove win64_128bit_abi_hack 2025-02-19 15:44:43 -05:00
Trevor Gross
bade6290c8 ci: Pin the nightly toolchain for aarch64-unknown-linux-gnu
Pin aarch64-unknown-linux-gnu to nightly-2025-02-07 until [1] is
resolved.

[1]: https://github.com/llvm/llvm-project/issues/127804
2025-02-19 15:38:45 -05:00
Trevor Gross
4517c7ea90 ci: Pin the nightly toolchain for i686-pc-windows-gnu
Pin i686-pc-windows-gnu to nightly-2025-02-07 until [1] is resolved.

[1]: https://github.com/rust-lang/rust/issues/136795
2025-02-19 15:38:45 -05:00
Trevor Gross
37da10edde ci: Update actions/cache to v4
Github has deprecated v2 so this needs to be bumped.
2025-02-19 15:38:45 -05:00
github-actions[bot]
84cb50e5b5 chore: release v0.1.146 2025-02-06 17:46:20 -06:00
Pavel Grigorenko
7f3bd59cdf Expose erf{,c}{,f} from libm 2025-02-06 14:54:58 -06:00
Trevor Gross
9cba04b3e5
Merge pull request #751 from rust-lang/release-plz-2025-01-28T02-10-10Z
chore: release v0.1.145
2025-02-04 04:59:46 -06:00
github-actions[bot]
dbd3032d42
chore: release v0.1.145 2025-02-04 10:46:49 +00:00
Trevor Gross
57572a583d Revert "Eliminate the use of public_test_dep!"
[1] has not gone forward, so this needs to be reverted again in order to
unblock a compiler-builtins upgrade that is necessary for the LLVM 20
upgrade.

This reverts commit a2494f14e99ae90c964f12bf0c059d63ccc07c2a.

[1]: https://github.com/rust-lang/rust/pull/135501
2025-02-04 04:46:24 -06:00
Pavel Grigorenko
5a5a5a39ad Indentation fix to please clippy 2025-01-31 17:50:46 -06:00
Nikita Popov
ececfaba78 Don't build out of line atomics support code for uefi
https://github.com/llvm/llvm-project/pull/116706 added Windows
support to cpu_model. Compiling for UEFI also goes through that
code path, because we treat it as a windows target. However,
including windows.h is not actually going to work (and the used
API would not be available in an UEFI environment).

Disable building of cpu_model on UEFI to fix this.
2025-01-28 14:06:54 -06:00
Trevor Gross
4e1b885595 Add a version to some FIXMEs that will be resolved in LLVM 20 2025-01-27 20:27:53 -06:00
Trevor Gross
64e0a0a68d Remove use of the start feature
`#![feature(start)]` was removed in [1], but we make use of it in the
intrinsics example. Replace use of this feature with `#[no_mangle]`
applied to `#[main]`.

We don't actually run this example so it is not a problem if this is not
entirely accurate. Currently the example does not run to completion,
instead invoking `rust_begin_unwind`.

[1]: https://github.com/rust-lang/rust/pull/134299
2025-01-27 20:09:47 -06:00
Trevor Gross
ffefc5ad82
Merge pull request #748 from rust-lang/release-plz-2025-01-15T21-19-08Z
chore: release v0.1.144
2025-01-15 16:26:04 -05:00
github-actions[bot]
49595ea04e
chore: release v0.1.144 2025-01-15 21:19:09 +00:00
Trevor Gross
095ecabcad Eliminate the use of public_test_dep!
Replace `public_test_dep!` by placing optionally public items into new
modules, then controlling what is exported with the `public-test-deps`
feature.

This is nicer for automatic formatting and diagnostics.

This is a reland of 2e2a9255 ("Eliminate the use of
`public_test_dep!`"), which was reverted in 47e50fd2 ('Revert "Eliminate
the use of..."') due to a bug exposed at [1]. This was fixed in [2], so
the cleanup should be able to be applied again.

[1]: https://github.com/rust-lang/rust/pull/128691
[2]: https://github.com/rust-lang/rust/pull/135278
2025-01-15 16:18:41 -05:00
Trevor Gross
d41e606004
Merge pull request #746 from rust-lang/release-plz-2025-01-15T03-53-28Z
chore: release v0.1.143
2025-01-14 23:01:00 -05:00
github-actions[bot]
05d429523d
chore: release v0.1.143 2025-01-15 03:53:29 +00:00
Trevor Gross
7a87cdbae5 Use a C-safe return type for __rust_[ui]128_* overflowing intrinsics
Most of our Rust-specific overflowing intrinsics currently return
`(i128, bool)`, which is not guaranteed to have a stable ABI. Switch to
returning the overflow via a mutable parameter and only directly
returning the integer result.

`__rust_i128_mulo` now matches the function signature of `__muloti4`,
but they do not share the same ABI on Windows so we cannot easily
deduplicate them.
2025-01-14 22:53:04 -05:00
Trevor Gross
57dde638b9
Merge pull request #744 from rust-lang/release-plz-2025-01-07T23-21-35Z
chore: release v0.1.142
2025-01-07 18:29:56 -05:00
github-actions[bot]
d0a79fd542
chore: release v0.1.142 2025-01-07 23:21:35 +00:00
Trevor Gross
156e12f8d9
Merge pull request #743 from tgross35/fix-opt-level
Account for optimization levels other than numbers
2025-01-07 18:21:12 -05:00
Trevor Gross
83a61e67fd Account for optimization levels other than numbers
The build script currently panics with `opt-level=z` or `opt-level=s`.
Account for this here.

This is the `compiler-builtins` version of [1].

Fixes: https://github.com/rust-lang/compiler-builtins/issues/742

[1]: https://github.com/rust-lang/libm/pull/417
2025-01-07 18:13:04 -05:00
Trevor Gross
77f34f3a4c Update the libm submodule
This includes [1], which fixes a bug parsing non-numeric optimization
levels.

[1]: https://github.com/rust-lang/libm/pull/417
2025-01-07 18:11:40 -05:00
Trevor Gross
ae2ef2031a
Merge pull request #739 from rust-lang/release-plz-2025-01-03T03-17-10Z
chore: release v0.1.141
2025-01-06 21:09:59 -05:00
github-actions[bot]
1b0adb233c
chore: release v0.1.141 2025-01-07 01:57:53 +00:00
Trevor Gross
e6ea2802d1 Update the libm submodule 2025-01-06 20:57:24 -05:00
Trevor Gross
f4f942c3e9 Update the libm submodule 2025-01-06 19:17:41 -05:00
Trevor Gross
cf08352443
Merge pull request #738 from tgross35/float-trait-renaming
Float trait: shorten prefixes, rename EXP_MAX to EXP_SAT
2025-01-02 22:16:45 -05:00
Trevor Gross
5d60d2a905 Fix new clippy::precedence errors
`clippy::precedence` now applies to bitwise `&` and `|`. Update with all
of its suggestions, including a separate elided lifetime suggestion.
2025-01-03 03:09:07 +00:00
Trevor Gross
7065cd0420 Rename EXP_MAX to EXP_SAT
"Maximum" is technically correct here with regards to what the
bitpattern can represent, but it is not the numeric maximum value of the
exponent which has a relationship with the bias. So, replace the maximum
terminology with "saturated" to indicate it only means the full
bitpattern.

This change is more relevant to `libm` than `compiler-builtins`.
2025-01-03 02:56:34 +00:00
Trevor Gross
b47d3cc2f8 Shorten prefixes for float constants
Change `SIGNIFICAND_*` to `SIG_*` and `EXPONENT_*` to `EXP_*`. This
makes things more consistent with `libm`, and terseness is convenient
here since there isn't anything to confuse.
2025-01-03 02:54:56 +00:00
github-actions[bot]
a078f5a0c5 chore: release v0.1.140 2024-12-26 00:16:33 -05:00
Sebastian Neubauer
e8eb76a45a
Disable f128 for amdgpu (#737)
`compiler_builtins` fails to compile to amdgpu if f128 is enabled.
The reason seems to be that compiler_builtins uses libcalls in the
implementation. I’m not really familiar with what libcalls are, but the
LLVM amdgpu backend explicitly does not support them.

Error message:
```
LLVM ERROR: unsupported libcall legalization
```
2024-12-26 00:01:14 -05:00
Trevor Gross
cd4b4a6cbf
Merge pull request #736 from tgross35/fix-abs-diff
Fix a bug in `abs_diff`
2024-12-22 17:25:43 -05:00
Trevor Gross
a4d9b4a6a2 Fix a bug in abs_diff
These implementations of `abs_diff` were added in c2ff1b3119
("Completely overhaul fuzz testing"), but the signed implementation is
wrong when |x| + |y| exceeds the integer's limits (e.g.
`(-128).abs_diff(1)` should be 128 but currently these return 127.

Resolve this by just using `std`'s implementation since that is stable
now. This isn't used anywhere critical, we probably just weren't hitting
the edge case.
2024-12-22 22:08:31 +00:00
Trevor Gross
09d628d5e1
Merge pull request #730 from tgross35/f16-f128-config-update
Disable `f16` on platforms that have recursion problems
2024-11-05 07:16:23 -06:00
Trevor Gross
04ccb683d9 Disable f16 on platforms that have recursion problems
CI in [1] seems to indicate that there are cases where the `f16`
infinite recursion bug ([2], [3]) can make its way into what gets called
during tests, even though this doesn't seem to be the usual case. In
order to make sure that we avoid these completely, just unset
`f16_enabled` on any platforms that have the recursion problem.

This also refactors the `match` statement to be more in line with
`library/std/build.rs`.

[1]: https://github.com/rust-lang/compiler-builtins/pull/729
[2]: https://github.com/llvm/llvm-project/issues/97981
[3]: https://github.com/rust-lang/compiler-builtins/issues/651
2024-11-05 02:57:34 -06:00
Trevor Gross
63e801bbf8
Merge pull request #728 from rust-lang/release-plz-2024-11-03T23-08-40Z
chore: release v0.1.139
2024-11-03 17:35:48 -06:00
github-actions[bot]
c33f521bb5
chore: release v0.1.139 2024-11-03 23:08:41 +00:00
Trevor Gross
83641751f8
Merge pull request #727 from beetrees/remove-sparcv9-pattern
Remove incorrect `sparcv9` match pattern from `configure_f16_f128`
2024-11-03 17:08:18 -06:00
beetrees
10bdf3b6c1
Remove incorrect sparcv9 match pattern from configure_f16_f128 2024-11-03 22:54:01 +00:00
Trevor Gross
dd750943bb
Merge pull request #725 from rust-lang/release-plz-2024-11-01T10-00-30Z
chore: release v0.1.138
2024-11-01 06:07:40 -05:00
github-actions[bot]
4c7450d10c
chore: release v0.1.138 2024-11-01 11:00:27 +00:00
Trevor Gross
28fb4bc868 Enable the changelog for release-plz
This crate isn't meant for direct use, but having an easy way to see
what changed between versions would still be helpful when this crate is
updated in rust-lang/rust.
2024-11-01 05:59:57 -05:00
WANG Rui
ec673535f7 ci: add support for loongarch64-unknown-linux-gnu 2024-11-01 05:48:47 -05:00
hev
ca996df5c1
Use f16_enabled/f128_enabled in examples/intrinsics.rs (#724)
Enable conditional compilation for intrinsics with `f16_enabled` and `f128_enabled`
2024-11-01 10:34:51 +00:00
hev
53b3e71bbc
Disable f16 for LoongArch64 (#722)
Disable `f161` for LoongArch64 due to incorrect code generation on LLVM 19,
which causes failures in `testcrate/tests/conv.rs`. This workaround will
remain in place until llvm/llvm-project#109093 is merged or we upgrade to
LLVM 20.
2024-11-01 10:00:00 +00:00