Commit graph

4915 commits

Author SHA1 Message Date
bjorn3
26242be173 Sync from rust 70b3f4666e 2025-05-31 13:37:50 +00:00
Ralf Jung
99e783d4e9 atomic_load intrinsic: use const generic parameter for ordering 2025-05-28 22:57:55 +02:00
bjorn3
2357fb6578 Merge branch 'sync_from_rust' 2025-05-25 18:55:47 +00:00
bjorn3
4f24d142d9 Merge commit '979dcf8e2f' into sync_cg_clif-2025-05-25 2025-05-25 18:51:16 +00:00
bjorn3
979dcf8e2f Rustup to rustc 1.89.0-nightly (5e16c6620 2025-05-24) 2025-05-25 18:39:17 +00:00
bjorn3
aa04a27268 Sync from rust 5e16c66206 2025-05-25 18:33:21 +00:00
bjorn3
0da0dac6ea
Merge pull request #1574 from beetrees/f16-f128-mvp
Add `f16`/`f128` support
2025-05-24 15:38:31 +02:00
beetrees
02195f56c7
Enable tests and compiler-builtins for f16/f128 2025-05-24 13:51:53 +01:00
beetrees
2055f01323
Add f16/f128 intrinsic support 2025-05-24 13:51:53 +01:00
beetrees
e46186f994
Add support for casting to and from f16/f128 2025-05-24 13:45:19 +01:00
beetrees
38d48dbe08
Add f16/f128 comparison support 2025-05-24 13:45:19 +01:00
beetrees
27a9590d3d
Add f16/f128 +/-/*///% support 2025-05-24 13:45:19 +01:00
beetrees
87c425b9e1
Add basic support for f16/f128 values 2025-05-24 13:45:19 +01:00
beetrees
f0fb19ccc8
Add missing float libcalls to compiler_builtins.rs 2025-05-24 13:45:12 +01:00
beetrees
dcd3168c97
Use correct sign extension on __powi*f2 arguments 2025-05-23 15:51:51 +01:00
bjorn3
7c026ea31d
Add missing space in usage.md 2025-05-23 16:41:37 +02:00
beetrees
3ab6af049b
Use Cranelift bitcast instead of store & load to bitcast between vectors and non-vectors (#1580) 2025-05-21 15:59:52 +02:00
Trevor Gross
ff1a5ab4c3 Rename cfg_match! to cfg_select!
At [1] it was pointed out that `cfg_match!` syntax does not actually
align well with match syntax, which is a possible source of confusion.
The comment points out that usage is instead more similar to ecosystem
`select!` macros. Rename `cfg_match!` to `cfg_select!` to match this.

Tracking issue: https://github.com/rust-lang/rust/issues/115585

[1]: https://github.com/rust-lang/rust/issues/115585#issuecomment-2346307605
2025-05-20 21:16:23 +00:00
stefnotch
8e3d0b2b03
Update availability of Cranelift (#1579)
- include source
2025-05-20 17:17:36 +02:00
bjorn3
4c39287e34 Update to Cranelift 0.120 2025-05-20 12:59:03 +00:00
bjorn3
81af658cb3 Make clif ir debug output a bit nicer 2025-05-20 12:16:04 +00:00
bjorn3
04c7e5a7e3 Rustup to rustc 1.89.0-nightly (60dabef95 2025-05-19) 2025-05-20 09:43:45 +00:00
bjorn3
0e43247bc9 Fix rustc testsuite 2025-05-18 16:29:38 +00:00
bjorn3
bc02a99f8f Rustup to rustc 1.89.0-nightly (777d37277 2025-05-17) 2025-05-18 14:30:42 +00:00
bjorn3
7b670d243f Sync from rust 777d372772 2025-05-18 14:21:04 +00:00
Urgau
e6d288ba17 Use intrinsics for {f16,f32,f64,f128}::{minimum,maximum} operations 2025-05-09 17:11:23 +02:00
bjorn3
2f8f464390 Fix mini_core on Windows and macOS 2025-05-07 14:08:11 +00:00
bjorn3
9196eb3dd1 Fix mini_core for panic=unwind 2025-05-07 13:05:47 +00:00
bjorn3
fe059c1c54 Clif ir comment improvements 2025-05-07 12:25:01 +00:00
bjorn3
dfe76361d1 Rustup to rustc 1.88.0-nightly (13e879094 2025-05-04) 2025-05-05 13:53:58 +00:00
Michael Goulet
5930cd904e Rename Instance::new to Instance::new_raw and add a note that it is raw 2025-05-05 13:17:35 +00:00
bjorn3
a308984e69 Rustup to rustc 1.88.0-nightly (b45dd71d1 2025-04-30) 2025-05-01 09:26:49 +00:00
bjorn3
e864f0f244 Sync from rust b45dd71d18 2025-05-01 09:18:16 +00:00
Matthias Krüger
23f12ff125 Rollup merge of #134232 - bjorn3:naked_asm_improvements, r=wesleywiser
Share the naked asm impl between cg_ssa and cg_clif

This was introduced in https://github.com/rust-lang/rust/pull/128004.
2025-04-30 17:27:57 +02:00
bjorn3
66d2f6bb05 Fix rustc test suite 2025-04-30 14:48:45 +00:00
bjorn3
e17184bf9f Rustup to rustc 1.88.0-nightly (74509131e 2025-04-29) 2025-04-30 13:21:43 +00:00
bjorn3
88c48cd308 Sync from rust 74509131e8 2025-04-30 13:12:22 +00:00
bjorn3
bfabf71781 Fix naked asm symbol name for cg_clif on macOS 2025-04-30 12:59:50 +00:00
bjorn3
7a8d368ac9 Fix std_example.rs on s390x 2025-04-29 08:37:31 +00:00
Chris Denton
6412cfbacb Rollup merge of #140323 - tgross35:cfg-unstable-float, r=Urgau
Implement the internal feature `cfg_target_has_reliable_f16_f128`

Support for `f16` and `f128` is varied across targets, backends, and backend versions. Eventually we would like to reach a point where all backends support these approximately equally, but until then we have to work around some of these nuances of support being observable.

Introduce the `cfg_target_has_reliable_f16_f128` internal feature, which provides the following new configuration gates:

* `cfg(target_has_reliable_f16)`
* `cfg(target_has_reliable_f16_math)`
* `cfg(target_has_reliable_f128)`
* `cfg(target_has_reliable_f128_math)`

`reliable_f16` and `reliable_f128` indicate that basic arithmetic for the type works correctly. The `_math` versions indicate that anything relying on `libm` works correctly, since sometimes this hits a separate class of codegen bugs.

These options match configuration set by the build script at [1]. The logic for LLVM support is duplicated as-is from the same script. There are a few possible updates that will come as a follow up.

The config introduced here is not planned to ever become stable, it is only intended to replace the build scripts for `std` tests and `compiler-builtins` that don't have any way to configure based on the codegen backend.

MCP: https://github.com/rust-lang/compiler-team/issues/866
Closes: https://github.com/rust-lang/compiler-team/issues/866

[1]: 555e1d0386/library/std/build.rs (L84-L186)

---

The second commit makes use of this config to replace `cfg_{f16,f128}{,_math}` in `library/`. I omitted providing a `cfg(bootstrap)` configuration to keep things simpler since the next beta branch is in two weeks.

try-job: aarch64-gnu
try-job: i686-msvc-1
try-job: test-various
try-job: x86_64-gnu
try-job: x86_64-msvc-ext2
2025-04-28 23:29:17 +00:00
bjorn3
17403cd406 Fix rustc test suite 2025-04-28 15:25:25 +00:00
bjorn3
fcf198b539 Rustup to rustc 1.88.0-nightly (cb31a009e 2025-04-27) 2025-04-28 15:25:21 +00:00
bjorn3
41dbfa749f Sync from rust cb31a009e3 2025-04-28 15:25:08 +00:00
Andrew Zhogin
c179f96fa9 AsyncDrop implementation using shim codegen of async_drop_in_place::{closure}, scoped async drop added. 2025-04-28 16:23:13 +07:00
Trevor Gross
daaae11f4d Implement the internal feature cfg_target_has_reliable_f16_f128
Support for `f16` and `f128` is varied across targets, backends, and
backend versions. Eventually we would like to reach a point where all
backends support these approximately equally, but until then we have to
work around some of these nuances of support being observable.

Introduce the `cfg_target_has_reliable_f16_f128` internal feature, which
provides the following new configuration gates:

* `cfg(target_has_reliable_f16)`
* `cfg(target_has_reliable_f16_math)`
* `cfg(target_has_reliable_f128)`
* `cfg(target_has_reliable_f128_math)`

`reliable_f16` and `reliable_f128` indicate that basic arithmetic for
the type works correctly. The `_math` versions indicate that anything
relying on `libm` works correctly, since sometimes this hits a separate
class of codegen bugs.

These options match configuration set by the build script at [1]. The
logic for LLVM support is duplicated as-is from the same script. There
are a few possible updates that will come as a follow up.

The config introduced here is not planned to ever become stable, it is
only intended to replace the build scripts for `std` tests and
`compiler-builtins` that don't have any way to configure based on the
codegen backend.

MCP: https://github.com/rust-lang/compiler-team/issues/866
Closes: https://github.com/rust-lang/compiler-team/issues/866

[1]: 555e1d0386/library/std/build.rs (L84-L186)
2025-04-27 19:58:44 +00:00
Urgau
6e2490ca9f
Merge pull request #1576 from Urgau/triagebot-issue-links-no-mentions
Enable `[no-mentions]` and `[issue-links]` in `rustbot`
2025-04-27 20:14:46 +02:00
bjorn3
f55c2c0d89
Merge pull request #1575 from rust-lang/exception-handling-preparation
Preparations for exception handling support
2025-04-24 17:02:03 +02:00
bjorn3
b59f697ee9 Relocation improvements for .eh_frame
This is necessary to handle LSDA references in the future once unwinding
is supported.
2025-04-24 13:16:21 +00:00
bjorn3
349430c08e Avoid creating a second UnwindContext in finalize_definitions
Once UnwindContext sets the personality function it will need to define
a DW.ref.rust_eh_personality function which would cause a duplicate
definition if UnwindContext is called a second time.
2025-04-24 13:08:32 +00:00
bjorn3
eef57cb4e2 Pass Option<Span> to codegen_unwind_terminate
In preparation for unwinding support.
2025-04-24 13:02:28 +00:00