Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e8ff6dc

Browse files
committed
Auto merge of #145074 - tgross35:rollup-0tillrm, r=tgross35
Rollup of 9 pull requests Successful merges: - rust-lang/rust#144705 (compiler-builtins: plumb LSE support for aarch64 on linux/gnu when optimized-compiler-builtins not enabled) - rust-lang/rust#144857 (Port `#[allow_internal_unsafe]` to the new attribute system) - rust-lang/rust#144900 (Stabilize `unsigned_signed_diff` feature) - rust-lang/rust#144903 (Rename `begin_panic_handler` to `panic_handler`) - rust-lang/rust#144974 (compiler-builtins subtree update) - rust-lang/rust#145007 (Fix build/doc/test of error index generator) - rust-lang/rust#145018 (Derive `Hash` for rustc_public types) - rust-lang/rust#145045 (doc(library): Fix Markdown in `Iterator::by_ref`) - rust-lang/rust#145046 (Fix doc comment of File::try_lock and File::try_lock_shared) r? `@ghost` `@rustbot` modify labels: rollup
2 parents fe1b064 + 45e6499 commit e8ff6dc

File tree

162 files changed

+530
-543
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+530
-543
lines changed

‎.github/workflows/main.yaml‎

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ jobs:
3434
- name: Fetch pull request ref
3535
run: git fetch origin "$GITHUB_REF:$GITHUB_REF"
3636
if: github.event_name == 'pull_request'
37-
- run: python3 ci/ci-util.py generate-matrix >> "$GITHUB_OUTPUT"
37+
- run: |
38+
set -eo pipefail # Needed to actually fail the job if ci-util fails
39+
python3 ci/ci-util.py generate-matrix | tee "$GITHUB_OUTPUT"
3840
id: script
3941
4042
test:
@@ -50,7 +52,6 @@ jobs:
5052
os: ubuntu-24.04-arm
5153
- target: aarch64-pc-windows-msvc
5254
os: windows-2025
53-
test_verbatim: 1
5455
build_only: 1
5556
- target: arm-unknown-linux-gnueabi
5657
os: ubuntu-24.04
@@ -70,8 +71,12 @@ jobs:
7071
os: ubuntu-24.04
7172
- target: powerpc64le-unknown-linux-gnu
7273
os: ubuntu-24.04
74+
- target: powerpc64le-unknown-linux-gnu
75+
os: ubuntu-24.04-ppc64le
7376
- target: riscv64gc-unknown-linux-gnu
7477
os: ubuntu-24.04
78+
- target: s390x-unknown-linux-gnu
79+
os: ubuntu-24.04-s390x
7580
- target: thumbv6m-none-eabi
7681
os: ubuntu-24.04
7782
- target: thumbv7em-none-eabi
@@ -88,10 +93,8 @@ jobs:
8893
os: macos-13
8994
- target: i686-pc-windows-msvc
9095
os: windows-2025
91-
test_verbatim: 1
9296
- target: x86_64-pc-windows-msvc
9397
os: windows-2025
94-
test_verbatim: 1
9598
- target: i686-pc-windows-gnu
9699
os: windows-2025
97100
channel: nightly-i686-gnu
@@ -102,11 +105,23 @@ jobs:
102105
needs: [calculate_vars]
103106
env:
104107
BUILD_ONLY: ${{ matrix.build_only }}
105-
TEST_VERBATIM: ${{ matrix.test_verbatim }}
106108
MAY_SKIP_LIBM_CI: ${{ needs.calculate_vars.outputs.may_skip_libm_ci }}
107109
steps:
110+
- name: Print $HOME
111+
shell: bash
112+
run: |
113+
set -x
114+
echo "${HOME:-not found}"
115+
pwd
116+
printenv
108117
- name: Print runner information
109118
run: uname -a
119+
120+
# Native ppc and s390x runners don't have rustup by default
121+
- name: Install rustup
122+
if: matrix.os == 'ubuntu-24.04-ppc64le' || matrix.os == 'ubuntu-24.04-s390x'
123+
run: sudo apt-get update && sudo apt-get install -y rustup
124+
110125
- uses: actions/checkout@v4
111126
- name: Install Rust (rustup)
112127
shell: bash
@@ -117,7 +132,12 @@ jobs:
117132
rustup update "$channel" --no-self-update
118133
rustup default "$channel"
119134
rustup target add "${{ matrix.target }}"
135+
136+
# Our scripts use nextest if possible. This is skipped on the native ppc
137+
# and s390x runners since install-action doesn't support them.
120138
- uses: taiki-e/install-action@nextest
139+
if: "!(matrix.os == 'ubuntu-24.04-ppc64le' || matrix.os == 'ubuntu-24.04-s390x')"
140+
121141
- uses: Swatinem/rust-cache@v2
122142
with:
123143
key: ${{ matrix.target }}
@@ -144,7 +164,7 @@ jobs:
144164
shell: bash
145165
- run: echo "RUST_COMPILER_RT_ROOT=$(realpath ./compiler-rt)" >> "$GITHUB_ENV"
146166
shell: bash
147-
167+
148168
- name: Download musl source
149169
run: ./ci/update-musl.sh
150170
shell: bash
@@ -256,7 +276,7 @@ jobs:
256276
with:
257277
name: ${{ env.BASELINE_NAME }}
258278
path: ${{ env.BASELINE_NAME }}.tar.xz
259-
279+
260280
- name: Run wall time benchmarks
261281
run: |
262282
# Always use the same seed for benchmarks. Ideally we should switch to a
@@ -311,8 +331,8 @@ jobs:
311331
timeout-minutes: 10
312332
steps:
313333
- uses: actions/checkout@v4
314-
- name: Install stable `rustfmt`
315-
run: rustup set profile minimal && rustup default stable && rustup component add rustfmt
334+
- name: Install nightly `rustfmt`
335+
run: rustup set profile minimal && rustup default nightly && rustup component add rustfmt
316336
- run: cargo fmt -- --check
317337

318338
extensive:

‎.github/workflows/rustc-pull.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ jobs:
1212
if: github.repository == 'rust-lang/compiler-builtins'
1313
uses: rust-lang/josh-sync/.github/workflows/rustc-pull.yml@main
1414
with:
15+
github-app-id: ${{ vars.APP_CLIENT_ID }}
1516
# https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/compiler-builtins.20subtree.20sync.20automation/with/528482375
1617
zulip-stream-id: 219381
1718
zulip-topic: 'compiler-builtins subtree sync automation'
18-
zulip-bot-email: "compiler-builtins-ci-bot@rust-lang.zulipchat.com"
19+
zulip-bot-email: "compiler-builtins-ci-bot@rust-lang.zulipchat.com"
1920
pr-base-branch: master
2021
branch-name: rustc-pull
2122
secrets:
2223
zulip-api-token: ${{ secrets.ZULIP_API_TOKEN }}
23-
token: ${{ secrets.GITHUB_TOKEN }}
24+
github-app-secret: ${{ secrets.APP_PRIVATE_KEY }}

‎builtins-shim/Cargo.toml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ default = ["compiler-builtins"]
3737
# implementations and also filling in unimplemented intrinsics
3838
c = ["dep:cc"]
3939

40-
# Workaround for the Cranelift codegen backend. Disables any implementations
41-
# which use inline assembly and fall back to pure Rust versions (if available).
40+
# For implementations where there is both a generic version and a platform-
41+
# specific version, use the generic version. This is meant to enable testing
42+
# the generic versions on all platforms.
4243
no-asm = []
4344

4445
# Workaround for codegen backends which haven't yet implemented `f16` and

‎builtins-test-intrinsics/src/main.rs‎

Lines changed: 16 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ mod intrinsics {
4040
x as f64
4141
}
4242

43-
#[cfg(all(
44-
f16_enabled,
45-
f128_enabled,
46-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
47-
))]
43+
#[cfg(all(f16_enabled, f128_enabled))]
4844
pub fn extendhftf(x: f16) -> f128 {
4945
x as f128
5046
}
@@ -201,11 +197,7 @@ mod intrinsics {
201197

202198
/* f128 operations */
203199

204-
#[cfg(all(
205-
f16_enabled,
206-
f128_enabled,
207-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
208-
))]
200+
#[cfg(all(f16_enabled, f128_enabled))]
209201
pub fn trunctfhf(x: f128) -> f16 {
210202
x as f16
211203
}
@@ -220,50 +212,32 @@ mod intrinsics {
220212
x as f64
221213
}
222214

223-
#[cfg(all(
224-
f128_enabled,
225-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
226-
))]
215+
#[cfg(f128_enabled)]
227216
pub fn fixtfsi(x: f128) -> i32 {
228217
x as i32
229218
}
230219

231-
#[cfg(all(
232-
f128_enabled,
233-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
234-
))]
220+
#[cfg(f128_enabled)]
235221
pub fn fixtfdi(x: f128) -> i64 {
236222
x as i64
237223
}
238224

239-
#[cfg(all(
240-
f128_enabled,
241-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
242-
))]
225+
#[cfg(f128_enabled)]
243226
pub fn fixtfti(x: f128) -> i128 {
244227
x as i128
245228
}
246229

247-
#[cfg(all(
248-
f128_enabled,
249-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
250-
))]
230+
#[cfg(f128_enabled)]
251231
pub fn fixunstfsi(x: f128) -> u32 {
252232
x as u32
253233
}
254234

255-
#[cfg(all(
256-
f128_enabled,
257-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
258-
))]
235+
#[cfg(f128_enabled)]
259236
pub fn fixunstfdi(x: f128) -> u64 {
260237
x as u64
261238
}
262239

263-
#[cfg(all(
264-
f128_enabled,
265-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
266-
))]
240+
#[cfg(f128_enabled)]
267241
pub fn fixunstfti(x: f128) -> u128 {
268242
x as u128
269243
}
@@ -540,47 +514,25 @@ fn run() {
540514
bb(extendhfdf(bb(2.)));
541515
#[cfg(f16_enabled)]
542516
bb(extendhfsf(bb(2.)));
543-
#[cfg(all(
544-
f16_enabled,
545-
f128_enabled,
546-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
547-
))]
517+
#[cfg(all(f16_enabled, f128_enabled))]
548518
bb(extendhftf(bb(2.)));
549519
#[cfg(f128_enabled)]
550520
bb(extendsftf(bb(2.)));
551521
bb(fixdfti(bb(2.)));
552522
bb(fixsfti(bb(2.)));
553-
#[cfg(all(
554-
f128_enabled,
555-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
556-
))]
523+
#[cfg(f128_enabled)]
557524
bb(fixtfdi(bb(2.)));
558-
#[cfg(all(
559-
f128_enabled,
560-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
561-
))]
525+
#[cfg(f128_enabled)]
562526
bb(fixtfsi(bb(2.)));
563-
#[cfg(all(
564-
f128_enabled,
565-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
566-
))]
527+
#[cfg(f128_enabled)]
567528
bb(fixtfti(bb(2.)));
568529
bb(fixunsdfti(bb(2.)));
569530
bb(fixunssfti(bb(2.)));
570-
#[cfg(all(
571-
f128_enabled,
572-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
573-
))]
531+
#[cfg(f128_enabled)]
574532
bb(fixunstfdi(bb(2.)));
575-
#[cfg(all(
576-
f128_enabled,
577-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
578-
))]
533+
#[cfg(f128_enabled)]
579534
bb(fixunstfsi(bb(2.)));
580-
#[cfg(all(
581-
f128_enabled,
582-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
583-
))]
535+
#[cfg(f128_enabled)]
584536
bb(fixunstfti(bb(2.)));
585537
#[cfg(f128_enabled)]
586538
bb(floatditf(bb(2)));
@@ -616,11 +568,7 @@ fn run() {
616568
bb(truncsfhf(bb(2.)));
617569
#[cfg(f128_enabled)]
618570
bb(trunctfdf(bb(2.)));
619-
#[cfg(all(
620-
f16_enabled,
621-
f128_enabled,
622-
not(any(target_arch = "powerpc", target_arch = "powerpc64"))
623-
))]
571+
#[cfg(all(f16_enabled, f128_enabled))]
624572
bb(trunctfhf(bb(2.)));
625573
#[cfg(f128_enabled)]
626574
bb(trunctfsf(bb(2.)));

‎builtins-test/benches/float_conv.rs‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ float_bench! {
365365

366366
/* float -> unsigned int */
367367

368-
#[cfg(not(all(target_arch = "powerpc64", target_endian = "little")))]
369368
float_bench! {
370369
name: conv_f32_u32,
371370
sig: (a: f32) -> u32,
@@ -387,7 +386,6 @@ float_bench! {
387386
],
388387
}
389388

390-
#[cfg(not(all(target_arch = "powerpc64", target_endian = "little")))]
391389
float_bench! {
392390
name: conv_f32_u64,
393391
sig: (a: f32) -> u64,
@@ -409,7 +407,6 @@ float_bench! {
409407
],
410408
}
411409

412-
#[cfg(not(all(target_arch = "powerpc64", target_endian = "little")))]
413410
float_bench! {
414411
name: conv_f32_u128,
415412
sig: (a: f32) -> u128,
@@ -505,7 +502,6 @@ float_bench! {
505502

506503
/* float -> signed int */
507504

508-
#[cfg(not(all(target_arch = "powerpc64", target_endian = "little")))]
509505
float_bench! {
510506
name: conv_f32_i32,
511507
sig: (a: f32) -> i32,
@@ -527,7 +523,6 @@ float_bench! {
527523
],
528524
}
529525

530-
#[cfg(not(all(target_arch = "powerpc64", target_endian = "little")))]
531526
float_bench! {
532527
name: conv_f32_i64,
533528
sig: (a: f32) -> i64,
@@ -549,7 +544,6 @@ float_bench! {
549544
],
550545
}
551546

552-
#[cfg(not(all(target_arch = "powerpc64", target_endian = "little")))]
553547
float_bench! {
554548
name: conv_f32_i128,
555549
sig: (a: f32) -> i128,
@@ -666,9 +660,6 @@ pub fn float_conv() {
666660
conv_f64_i128(&mut criterion);
667661

668662
#[cfg(f128_enabled)]
669-
// FIXME: ppc64le has a sporadic overflow panic in the crate functions
670-
// <https://github.com/rust-lang/compiler-builtins/issues/617#issuecomment-2125914639>
671-
#[cfg(not(all(target_arch = "powerpc64", target_endian = "little")))]
672663
{
673664
conv_u32_f128(&mut criterion);
674665
conv_u64_f128(&mut criterion);

‎builtins-test/benches/float_extend.rs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,7 @@ float_bench! {
110110
pub fn float_extend() {
111111
let mut criterion = Criterion::default().configure_from_args();
112112

113-
// FIXME(#655): `f16` tests disabled until we can bootstrap symbols
114113
#[cfg(f16_enabled)]
115-
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
116114
{
117115
extend_f16_f32(&mut criterion);
118116
extend_f16_f64(&mut criterion);

‎builtins-test/benches/float_trunc.rs‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ float_bench! {
121121
pub fn float_trunc() {
122122
let mut criterion = Criterion::default().configure_from_args();
123123

124-
// FIXME(#655): `f16` tests disabled until we can bootstrap symbols
125124
#[cfg(f16_enabled)]
126-
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
127125
{
128126
trunc_f32_f16(&mut criterion);
129127
trunc_f64_f16(&mut criterion);
@@ -133,11 +131,8 @@ pub fn float_trunc() {
133131

134132
#[cfg(f128_enabled)]
135133
{
136-
// FIXME(#655): `f16` tests disabled until we can bootstrap symbols
137134
#[cfg(f16_enabled)]
138-
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
139135
trunc_f128_f16(&mut criterion);
140-
141136
trunc_f128_f32(&mut criterion);
142137
trunc_f128_f64(&mut criterion);
143138
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /