Commit Graph

4027 Commits

Author SHA1 Message Date
bjorn3
77dae8c881 Merge branch 'sync_from_rust' 2024-03-08 20:43:24 +00:00
bjorn3
5ec45d3d7a Merge commit '54cbb6e7531f95e086d5c3dd0d5e73bfbe3545ba' into sync_cg_clif-2024-03-08 2024-03-08 20:41:29 +00:00
bjorn3
54cbb6e753 Use sqrt clif instruction for sqrt rust intrinsics 2024-03-08 20:20:45 +00:00
bjorn3
b0809eadef Cleanup .gitignore 2024-03-08 19:52:57 +00:00
bjorn3
da083a8fc2 Remove configuration section from readme
None of these options are available in the rustup version, so it only
has the potential for confusion.
2024-03-08 19:52:51 +00:00
bjorn3
436fce0747 Remove y.rs
It has been deprecated for over a year now.
2024-03-08 19:37:23 +00:00
bjorn3
2b0f51b0b8 Disable Linux MinGW cross-compilation testing for now 2024-03-08 19:02:56 +00:00
bjorn3
6b220e5a2e Disable portable-simd sqrt test on MinGW 2024-03-08 19:02:56 +00:00
bjorn3
4976aa5216 Workaround a couple of bugs in rustc's test suite 2024-03-08 19:02:56 +00:00
bjorn3
5320a800e3 Rustup to rustc 1.78.0-nightly (9c3ad802d 2024-03-07) 2024-03-08 10:22:03 +00:00
bjorn3
dd7117b543 Sync from rust 9c3ad802d9 2024-03-08 10:05:56 +00:00
Matthias Krüger
5ffd498ca1 Rollup merge of #119365 - nbdd0121:asm-goto, r=Amanieu
Add asm goto support to `asm!`

Tracking issue: #119364

This PR implements asm-goto support, using the syntax described in "future possibilities" section of [RFC2873](https://rust-lang.github.io/rfcs/2873-inline-asm.html#asm-goto).

Currently I have only implemented the `label` part, not the `fallthrough` part (i.e. fallthrough is implicit). This doesn't reduce the expressive though, since you can use label-break to get arbitrary control flow or simply set a value and rely on jump threading optimisation to get the desired control flow. I can add that later if deemed necessary.

r? ``@Amanieu``
cc ``@ojeda``
2024-03-08 08:19:17 +01:00
bjorn3
1ace86eb0b Implement all x86 vendor intrinsics used by glam
Fixes rust-lang/rustc_codegen_cranelift#1463
2024-03-06 17:22:12 +01:00
Ralf Jung
804eeff180 only set noalias on Box with the global allocator 2024-03-05 15:03:33 +01:00
Oli Scherer
9277766840 Add a scheme for moving away from extern "rust-intrinsic" entirely 2024-03-04 16:13:50 +00:00
bjorn3
8c46d93ca0 Update to Cranelift 0.105.2
Fixes rust-lang/rustc_codegen_cranelift#1460
2024-02-29 14:55:16 +00:00
Trevor Gross
e45b4d3209 Add f16 and f128 to rustc_type_ir::FloatTy and rustc_abi::Primitive
Make changes necessary to support these types in the compiler.
2024-02-28 12:58:32 -05:00
bors
c099ed3d1e Auto merge of #121635 - 823984418:remove_archive_builder_lifetime_a, r=nnethercote
Remove useless lifetime of ArchiveBuilder

`trait ArchiveBuilder<'a>` has a seemingly useless lifetime a, so I remove it. If this is intentional, please reject this PR.

```rust
pub trait ArchiveBuilder<'a> {
    fn add_file(&mut self, path: &Path);

    fn add_archive(
        &mut self,
        archive: &Path,
        skip: Box<dyn FnMut(&str) -> bool + 'static>,
    ) -> io::Result<()>;

    fn build(self: Box<Self>, output: &Path) -> bool;
}
```
2024-02-27 03:27:48 +00:00
bors
15d98cd3b5 Auto merge of #121655 - matthiaskrgr:rollup-qpx3kks, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #121598 (rename 'try' intrinsic to 'catch_unwind')
 - #121639 (Update books)
 - #121648 (Update Vec and String `{from,into}_raw_parts`-family docs)
 - #121651 (Properly emit `expected ;` on `#[attr] expr`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-02-27 00:55:14 +00:00
Matthias Krüger
acb6f1afdd Rollup merge of #121598 - RalfJung:catch_unwind, r=oli-obk
rename 'try' intrinsic to 'catch_unwind'

The intrinsic has nothing to do with `try` blocks, and corresponds to the stable `catch_unwind` function, so this makes a lot more sense IMO.

Also rename Miri's special function while we are at it, to reflect the level of abstraction it works on: it's an unwinding mechanism, on which Rust implements panics.
2024-02-27 00:40:00 +01:00
bors
df6d03155d Auto merge of #121516 - RalfJung:platform-intrinsics-begone, r=oli-obk
remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsics

`@Amanieu` `@workingjubilee` I don't think there is any reason these need to be "special"? The [original RFC](https://rust-lang.github.io/rfcs/1199-simd-infrastructure.html) indicated eventually making them stable, but I think that is no longer the plan, so seems to me like we can clean this up a bit.

Blocked on https://github.com/rust-lang/stdarch/pull/1538, https://github.com/rust-lang/rust/pull/121542.
2024-02-26 22:24:16 +00:00
823984418
c460cf1737 remove useless lifetime of ArchiveBuilder 2024-02-26 22:37:04 +08:00
Ralf Jung
65f7789761 rename 'try' intrinsic to 'catch_unwind' 2024-02-26 11:10:18 +01:00
Chris Denton
fcb86c871f Cranelift: Don't use raw-dylib in std 2024-02-25 10:22:34 -03:00
Ralf Jung
08e4eafa49 fix use of platform_intrinsics in tests 2024-02-25 08:15:44 +01:00
Ralf Jung
9bb1109478 remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsics 2024-02-25 08:14:52 +01:00
Gary Guo
8cec9989b2 Implement asm goto in MIR and MIR lowering 2024-02-24 18:50:09 +00:00
Gary Guo
98dcd85054 Change InlineAsm to allow multiple targets instead 2024-02-24 18:50:09 +00:00
bjorn3
e9e6b7cd0d
Merge pull request #1459 from uweigand/update-libc
Update libc dependency to 0.2.153
2024-02-23 18:12:41 +01:00
Ulrich Weigand
26ee4c93b5 Update libc dependency to 0.2.153 2024-02-23 17:33:46 +01:00
Ralf Jung
ac8c8b612d remove simd_reduce_{min,max}_nanless 2024-02-21 20:50:47 +01:00
bors
709c00a047 Auto merge of #120718 - saethlin:reasonable-fast-math, r=nnethercote
Add "algebraic" fast-math intrinsics, based on fast-math ops that cannot return poison

Setting all of LLVM's fast-math flags makes our fast-math intrinsics very dangerous, because some inputs are UB. This set of flags permits common algebraic transformations, but according to the [LangRef](https://llvm.org/docs/LangRef.html#fastmath), only the flags `nnan` (no nans) and `ninf` (no infs) can produce poison.

And this uses the algebraic float ops to fix https://github.com/rust-lang/rust/issues/120720

cc `@orlp`
2024-02-21 09:43:33 +00:00
bjorn3
8fb0fbef62 Fix rustc test suite 2024-02-20 21:57:28 +00:00
bjorn3
d23026ac1b Update to Cranelift 0.105 2024-02-20 20:52:27 +00:00
bjorn3
b03b41420b Fix stack alignment problem on s390x 2024-02-20 17:45:28 +00:00
bjorn3
c7a50c2636 Adapt filtering of rustc tests for upstream changes 2024-02-20 17:44:00 +00:00
Ben Kimock
968e79540d Add "algebraic" versions of the fast-math intrinsics 2024-02-20 12:39:03 -05:00
bjorn3
49db50eaa5 Rustup to rustc 1.78.0-nightly (3246e7951 2024-02-19) 2024-02-20 16:59:44 +00:00
bjorn3
e1841fbee0 Sync from rust 3246e79513 2024-02-20 15:52:04 +00:00
bjorn3
ba7404a293
Merge pull request #1457 from uweigand/simd-endian
Fix simd_select_bitmask on big-endian systems
2024-02-19 14:38:00 +01:00
bjorn3
2768789b20
Merge pull request #1458 from uweigand/hash-endian
Fix download hash check on big-endian systems
2024-02-19 14:37:43 +01:00
Ulrich Weigand
bc1bca798f Fix download hash check on big-endian systems
Ensure the hash_file and hash_dir routines give identical results
on big- and little-endian systems.  The default hash routines for
integer types are endian-dependent, so all such hash inputs need
to be byte-swapped.

This applies in particular to the file hashes used as input when
computing directory hashes.

In addition, the default hash routines for composite types use
a length prefix, which it itself an integer type (usize).  In
order to be able to byte-swap that prefix, we have to re-implement
those bits of the standard library ourselves.
2024-02-19 14:08:49 +01:00
Ulrich Weigand
b886be124d Fix simd_select_bitmask on big-endian systems
The mask input for simd_select_bitmask depends on the host byteorder
in the same way as the mask output of simd_bitmask does.  Fix the
implementation to work on both big- and little-endian systems.
2024-02-19 12:33:08 +01:00
bors
4f23c244e9 Auto merge of #121034 - obeis:improve-static-mut-ref, r=RalfJung
Improve wording of `static_mut_ref`

Close #120964
2024-02-18 08:00:34 +00:00
Obei Sideg
8ce7f62e58 Improve wording of static_mut_ref
Rename `static_mut_ref` lint to `static_mut_refs`.
2024-02-18 06:01:40 +03:00
Matthias Krüger
f7143af56c Rollup merge of #121209 - nnethercote:infallible-join_codegen, r=bjorn3
Make `CodegenBackend::join_codegen` infallible.

Because they all are, in practice.

r? ```@bjorn3```
2024-02-17 18:47:42 +01:00
Nicholas Nethercote
0fd329b96a Make CodegenBackend::join_codegen infallible.
Because they all are, in practice.
2024-02-17 10:51:35 +11:00
bjorn3
e4584e84d9 Re-enable fixed rustc tests 2024-02-15 11:51:43 +00:00
bjorn3
3918b4783d Workaround UB in cranelift-jit 2024-02-15 10:23:58 +00:00
bjorn3
35b431884f Disable test broken due to upstream bug 2024-02-15 10:21:06 +00:00