Commit graph

300980 commits

Author SHA1 Message Date
Madhav Madhusoodanan
e84116db8e chore: moved chunk_info to common and code cleanup 2025-08-05 13:27:36 +05:30
Madhav Madhusoodanan
76dce27325 feat: cleaned the IntrinsicType struct and associated functions.
Changes: 1. Removed `from_c` from the IntrinsicType definition. 2. Moved
the `from_c` arm-specific definition to an ArmIntrinsicType-specific
impl block
2025-08-05 13:21:47 +05:30
Folkert de Vries
daa742afe5
Merge pull request #1892 from madhav-madhusoodanan/intrinsic-test-constraint-update
`Intrinsic-test`: Updated the Constraint enum to support discrete values
2025-08-03 10:30:10 +00:00
Madhav Madhusoodanan
3b216c3f6f feat: Added another variant of the Constraint enum 2025-08-03 15:33:46 +05:30
Sayantan Chakraborty
56ba98c7fe
Merge pull request #1893 from folkertdev/loongarch-gcc
use gcc 15 as the linker on loongarch
2025-08-03 03:24:12 +00:00
Folkert de Vries
c861fbd303
use gcc 15 as the linker on loongarch 2025-08-02 14:26:47 +02:00
Trevor Gross
d6c33bf29c
Merge pull request #1891 from Kobzol/ci-gh-app
Use GitHub app for authenticating sync workflows
2025-07-29 08:17:08 +00:00
Jakub Beránek
e6c0136b68
Use GitHub app for authenticating sync workflows 2025-07-29 10:03:52 +02:00
Folkert de Vries
15373cca95
Merge pull request #1888 from madhav-madhusoodanan/intrinsic-test-generate-only-support
`intrinsic-test`: bringing back support for  --generate-only flag
2025-07-27 12:55:11 +00:00
Madhav Madhusoodanan
c07f8bbdc2 chore: handling the case where --generate-only flag is passed 2025-07-27 18:00:41 +05:30
Folkert de Vries
213fd4e2e6
Merge pull request #1887 from madhav-madhusoodanan/intrinsic-test-argument-cleanup
Feat: updated Argument<T> type for functional compatibility with other architectures
2025-07-27 10:57:17 +00:00
Madhav Madhusoodanan
90d97f617f feat: updated Argument<T> type for functional compatibility with other
architectures too
2025-07-27 11:40:00 +05:30
Sayantan Chakraborty
f998575273
Merge pull request #1863 from folkertdev/combine-rust-files
`intrinsic-test`: combine rust files for faster compilation
2025-07-25 21:54:14 +00:00
Folkert de Vries
cc15f022e7
Merge pull request #1879 from heiher/loong-simd-unified-types
loongarch: Use unified data types for SIMD intrinsics
2025-07-25 13:46:59 +00:00
WANG Rui
49ea48d952 loongarch: Use unified data types for SIMD intrinsics 2025-07-25 09:31:58 +08:00
Sayantan Chakraborty
14febfae1b
Merge pull request #1885 from 197g/maskmove-is-non-temporal
Add non-temporal note for maskmoveu_si128
2025-07-24 14:54:05 +00:00
Aurelia Molzer
be947d4d2b Add non-temporal note for maskmoveu_si128
Like any other non-temporal instructions this has additional safety requirements
due to the mismatch with the Rust memory model. It is vital to know when using
this instruction.
2025-07-24 14:52:26 +02:00
Folkert de Vries
0231fa9adf
Merge pull request #1883 from Kobzol/pull
Rustc pull update
2025-07-23 13:26:30 +00:00
Jakub Beránek
8f0ffa8125 Reformat code 2025-07-23 15:01:42 +02:00
Jakub Beránek
67f73c7547 Merge ref '5a30e4307f' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 5a30e4307f
Filtered ref: 59749e9f8c765d3021796a9fe0c188643c4b8d77

This merge was created using https://github.com/rust-lang/josh-sync.
2025-07-23 14:59:10 +02:00
Jake Goulding
0b88bea0d5 Move dist-apple-various from x86_64 to aarch64
`macos-13` is going away soonish.
2025-07-23 11:35:50 -04:00
Jakub Beránek
a343926954 Prepare for merging from rust-lang/rust
This updates the rust-version file to 5a30e4307f.
2025-07-23 14:58:49 +02:00
Folkert de Vries
75fc5ceefb
Merge pull request #1882 from klensy/deps
drop few unused deps
2025-07-23 10:22:11 +00:00
bors
5a30e4307f Auto merge of #143412 - Kobzol:std-detect-in-stdlib, r=Amanieu
Move `std_detect` into stdlib

This PR moves the `std_detect` crate from `stdarch` to be a part of rust-lang/rust instead.

The first commit actually moves the whole directory from the stdarch Josh subtree, so that git blame history is kept intact. Then I had to make a few changes to appease `tidy`.

The most complex thing here is porting the tests. We can't have `std_detect` both in r-l/r and stdarch, because they could get desynchronized, so we have to perform the move more or less "atomically", which means that we also have to port all the existing `std_detect` tests from the `stdarch` repository.

The stdarch repo runs the following `std_detect` tests:

### Build
The `build-std-detect.sh` script (e2b6512aed/ci/build-std-detect.sh) builds `std_detect` using the nightly compiler for several targets. This will be subsumed by normal `x build library` on our Tier 1/2 targets. However, the stdarch repository also tests the following targets:
- aarch64-unknown-freebsd
- armv6-unknown-freebsd
- powerpc-unknown-freebsd
- powerpc64-unknown-freebsd
- aarch64-unknown-openbsd

Which we don't build/test on our CI currently. I think we have mostly two options here:
1) Ignore these targets
2) Create a special CI job that will build stage 1 rustc and then cross-compile std (or just the `std_detect` crate?) for these targets.

### Documentation
The `dox.sh` script (3fec5adcd5/ci/dox.sh) builds and documents `std_detect` for several targets. All of them are Tier 2/we have `dist-` jobs for them, so I think that we can just skip this and let our normal CI subsume it?

### Tests
The `run.sh` script (1b201cec2c/ci/run.sh) runs `cargo test` on `std_detect` with a bunch of variations of feature flags. This will be subsumed by `x test library` in our CI. The only problem is that `stdarch` runs these tests for a ludicrous number of targets:
```
        - tuple: i686-unknown-linux-gnu
        - tuple: x86_64-unknown-linux-gnu
        - tuple: arm-unknown-linux-gnueabihf
        - tuple: armv7-unknown-linux-gnueabihf
        - tuple: aarch64-unknown-linux-gnu
        - tuple: aarch64_be-unknown-linux-gnu
        - tuple: riscv32gc-unknown-linux-gnu
        - tuple: riscv64gc-unknown-linux-gnu
        - tuple: powerpc-unknown-linux-gnu
        - tuple: powerpc64-unknown-linux-gnu
        - tuple: powerpc64le-unknown-linux-gnu
        - tuple: s390x-unknown-linux-gnu
        - tuple: i586-unknown-linux-gnu
        - tuple: nvptx64-nvidia-cuda
        - tuple: thumbv6m-none-eabi
        - tuple: thumbv7m-none-eabi
        - tuple: thumbv7em-none-eabi
        - tuple: thumbv7em-none-eabihf
        - tuple: loongarch64-unknown-linux-gnu
        - tuple: wasm32-wasip1
        - tuple: x86_64-apple-darwin
        - tuple: x86_64-apple-ios-macabi
        - tuple: aarch64-apple-darwin
        - tuple: aarch64-apple-ios-macabi
        - tuple: x86_64-pc-windows-msvc
        - tuple: i686-pc-windows-msvc
        - tuple: aarch64-pc-windows-msvc
        - tuple: x86_64-pc-windows-gnu
        - tuple: aarch64-unknown-linux-gnu
        - tuple: aarch64_be-unknown-linux-gnu
        - tuple: armv7-unknown-linux-gnueabihf
        - tuple: loongarch64-unknown-linux-gnu
        - tuple: powerpc-unknown-linux-gnu
        - tuple: powerpc64-unknown-linux-gnu
        - tuple: powerpc64le-unknown-linux-gnu
        - tuple: riscv32gc-unknown-linux-gnu
        - tuple: riscv64gc-unknown-linux-gnu
        - tuple: s390x-unknown-linux-gnu
        - tuple: x86_64-unknown-linux-gnu
        - tuple: aarch64-apple-darwin
        - tuple: aarch64-apple-ios-macabi
```
We definitely do not run *tests* for all of these targets on our CI.

# Outcome
We have decided to just subsume std_detect tests by our normal test suite for now, and not create a separate CI job. Therefore, this PR performs the following changes in target testing for `std_detect`:

The following T3 targets would go from "build" to "nothing":
```
aarch64-unknown-freebsd (T3)
armv6-unknown-freebsd (T3)
powerpc-unknown-freebsd (T3)
powerpc64-unknown-freebsd (T3)
aarch64-unknown-openbsd (T3)
```

The following T3 targets would go from "test" to "nothing":
```
aarch64_be-unknown-linux-gnu (T3)
riscv32gc-unknown-liux-gnu (T3)
```

The following T2 targets would go from "test" to "build":
```
arm-unknown-linux-gnueabihf (T2)
armv7-unknown-linux-gnueabihf (T2)
riscv64gc-unknown-linux-gnu (T2)
powerpc-unknown-linux-gnu (T2)
powerpc64-unknown-linux-gnu (T2)
powerpc64le-unknown-linux-gnu (T2)
s390x-unknown-linux-gnu (T2)
i586-unknown-linux-gnu (T2)
loongarch64-unknown-linux-gnu (T2)
wasm32-wasip1 (T2)
x86_64-apple-ios-macabi (T2)
aarch64-apple-ios-macabi (T2)
aarch64-pc-windows-msvc (T2)
armv7-unknown-linux-gnueabihf (T2)
loongarch64-unknown-linux-gnu (T2)
powerpc-unknown-linux-gnu (T2)
```

I have confirmed in https://github.com/rust-lang/stdarch/pull/1873 that the current version of this PR would pass stdarch's CI testsuite.

r? `@ghost`

try-job: armhf-gnu
try-job: arm-android
2025-07-23 09:52:16 +00:00
klensy
d8bf6c48a4 bump serde_with. Weird that it works without std feature, but 2025-07-23 12:22:33 +03:00
klensy
cb27ff0715 remove unused deps 2025-07-23 11:40:44 +03:00
bors
20aa182235 Auto merge of #143897 - cjgillot:derive-walk, r=petrochenkov
Implement AST visitors using a derive macro.

AST visitors are large and error-prone beasts. This PR attempts to write them using a derive macro.

The design uses three traits: `Visitor`, `Visitable`, `Walkable`.
- `Visitor` is the trait implemented by downstream crates, it lists `visit_stuff` methods, which call `Walkable::walk_ref` by default;
- `Walkable` is derived using the macro, the generated `walk_ref` method calls `Visitable::visit` on each component;
- `Visitable` is implemented by `common_visitor_and_walkers` macro, to call the proper `Visitor::visit_stuff` method if it exists, to call `Walkable::walk_ref` if there is none.

I agree this is quite a lot of spaghetti macros. I'm open to suggestions on how to reduce the amount of boilerplate code.

If this PR is accepted, I believe the same design can be used for the HIR visitor.
2025-07-23 04:24:50 +00:00
bors
a7a1618e6c Auto merge of #144249 - GuillaumeGomez:asm-tests, r=jieyouxu
Rename `tests/{assembly,codegen}` into `tests/{assembly,codegen}-llvm` and ignore these testsuites if configured backend doesn't match

Follow-up of https://github.com/rust-lang/rust/pull/144125.

This PR changes `compiletest` so that `asm` tests are only run if they match the current codegen backend. To better reflect it, I renamed the `tests/ui/asm` folder into `tests/ui/asm-llvm`. Like that, we can add new asm tests for other backends if we want without needing to add extra code to `compiletest`.

Next step will be to use the new code annotations added in rust-lang/rust#144125 to ignore ui tests failing in cg_gcc until it's fixed on our side.

cc `@antoyo` `@oli-obk`
r? `@Kobzol`
2025-07-22 18:39:58 +00:00
Folkert de Vries
4bf215162a
Merge pull request #1880 from folkertdev/remove-lazy-static-dep
`intrinsic-test`: remove `lazy_static` dependency
2025-07-22 18:37:22 +00:00
Jakub Beránek
9a1179c4de
Embed auxv files directly into the test binary 2025-07-22 20:22:16 +02:00
Jakub Beránek
81d90d8257
Improve error messages of auxv loading 2025-07-22 20:22:16 +02:00
Jakub Beránek
5e52677a82
Remove licenses from std-detect
They are subsumed by the main repo licenses.
2025-07-22 20:22:16 +02:00
Jakub Beránek
cbd9fe012a
Bless bootstrap tests 2025-07-22 20:22:16 +02:00
Jakub Beránek
847f8db5ad
Remove std_detect from stdarch's CI 2025-07-22 20:22:16 +02:00
Jakub Beránek
608297247a
Remove std_detect from stdarch examples 2025-07-22 20:22:16 +02:00
Jakub Beránek
ffa97a647e
Fix warning 2025-07-22 20:22:16 +02:00
Jakub Beránek
e07a1bbb79
Move tests around to appease tidy 2025-07-22 20:22:16 +02:00
Folkert de Vries
aaa5d91a02
remove lazy_static dependency from intrinsic-test
we use `std::sync::LazyLock` now.
2025-07-22 20:20:48 +02:00
Jakub Beránek
8dc2abb5c3
Update stdarch README 2025-07-22 20:17:49 +02:00
Jakub Beránek
ee6f2c5276
Reformat std_detect 2025-07-22 20:17:46 +02:00
Jakub Beránek
1057a2213a
Allow platform-specific code in std_detect 2025-07-22 20:17:24 +02:00
Jakub Beránek
b23ab7888a
Make std_detect a direct dependency of std 2025-07-22 20:17:23 +02:00
Jakub Beránek
5b2de8ab27
Move std_detect from library/stdarch to library 2025-07-22 20:17:06 +02:00
Sayantan Chakraborty
4b95bb7d67
Merge pull request #1881 from folkertdev/s390x-project-simd
work around not being able to project into SIMD values
2025-07-22 18:03:20 +00:00
Folkert de Vries
b658b3d251
work around not being able to project out of SIMD values any more 2025-07-22 19:32:09 +02:00
bors
2e53675668 Auto merge of #144222 - Kobzol:stdarch-push, r=folkertdev
stdarch subtree update

Subtree update of `stdarch` to 5531955678.

Created using https://github.com/rust-lang/josh-sync.

I saw that there were non-trivial changes made to `std_detect` in `stdarch` recently. So I want to get them merged here before we move forward with https://github.com/rust-lang/rust/pull/143412.

r? `@folkertdev`
2025-07-22 15:25:31 +00:00
Guillaume Gomez
6bfa00816d Only run tests/assembly-* and tests/codegen-* tests if they match the current codegen backend 2025-07-22 16:43:03 +02:00
Guillaume Gomez
a27f3e3fd1 Rename tests/codegen into tests/codegen-llvm 2025-07-22 14:28:48 +02:00
Guillaume Gomez
ed93c1783b Rename tests/assembly into tests/assembly-llvm 2025-07-22 14:27:48 +02:00
bors
35487a2e7c Auto merge of #144294 - matthiaskrgr:rollup-ybvall3, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#142454 (Add modern AVR mcus like avr128db28 and attiny3224)
 - rust-lang/rust#142924 (tidy: move rustdoc js stuff into a tidy extra check)
 - rust-lang/rust#143373 (Unquerify maybe_unused_trait_imports.)
 - rust-lang/rust#144082 (tests: cover more `exported_private_dependencies` cases)
 - rust-lang/rust#144126 (Fix empty target_config in apply_rust_config bootstrap)
 - rust-lang/rust#144164 ( opt-dist: add an option for setting path to stage0 root)
 - rust-lang/rust#144265 (Dont ICE on copy error being suppressed due to overflow)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-22 11:32:36 +00:00