Skip to content

Make named asm_labels lint not trigger on hexagon register spans #143037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

androm3da
Copy link
Contributor

Fixes #143021

@rustbot
Copy link
Collaborator

rustbot commented Jun 26, 2025

r? @SparrowLii

rustbot has assigned @SparrowLii.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 26, 2025
@rust-log-analyzer

This comment has been minimized.

@androm3da androm3da force-pushed the bcain/hexagon_regspan_label branch from 1a4538b to 18a091e Compare June 26, 2025 02:56
@rust-log-analyzer

This comment has been minimized.

@androm3da androm3da force-pushed the bcain/hexagon_regspan_label branch from 18a091e to dea531e Compare June 26, 2025 03:17
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
normalized stderr:
error: avoid using named labels in inline assembly
##[error]  --> $DIR/hexagon-register-pairs.rs:18:15
   |
LL |         asm!("r1:0 = memd(r29+#0)", lateout("r0") _, lateout("r1") _);
   |               ^^
   |
   = help: only local labels of the form `<number>:` should be used in inline asm
   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
   = note: `#[deny(named_asm_labels)]` on by default

error: avoid using named labels in inline assembly
##[error]  --> $DIR/hexagon-register-pairs.rs:19:15
   |
LL |         asm!("r3:2 = combine(#1, #0)", lateout("r2") _, lateout("r3") _);
   |               ^^
   |
   = help: only local labels of the form `<number>:` should be used in inline asm
   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information

error: avoid using named labels in inline assembly
##[error]  --> $DIR/hexagon-register-pairs.rs:20:15
   |
LL |         asm!("r15:14 = memd(r30+#8)", lateout("r14") _, lateout("r15") _);
   |               ^^^
   |
   = help: only local labels of the form `<number>:` should be used in inline asm
   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information

error: avoid using named labels in inline assembly
##[error]  --> $DIR/hexagon-register-pairs.rs:31:15
   |
LL |         asm!("label1: r7:6 = combine(#2, #3)");
   |               ^^^^^^
   |
   = help: only local labels of the form `<number>:` should be used in inline asm
   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information

error: avoid using named labels in inline assembly
##[error]  --> $DIR/hexagon-register-pairs.rs:31:23
   |
LL |         asm!("label1: r7:6 = combine(#2, #3)");
   |                       ^^
   |
   = help: only local labels of the form `<number>:` should be used in inline asm
   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information

error: avoid using named labels in inline assembly
##[error]  --> $DIR/hexagon-register-pairs.rs:34:15
   |
LL |         asm!("hexagon_label: nop");
   |               ^^^^^^^^^^^^^
   |
   = help: only local labels of the form `<number>:` should be used in inline asm
   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information

error: aborting due to 6 previous errors




The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args asm/hexagon-register-pairs.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/asm/hexagon-register-pairs.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/asm/hexagon-register-pairs" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--target" "hexagon-unknown-linux-musl" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--extern" "minicore=/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/asm/hexagon-register-pairs/libminicore.rlib"
stdout: none
--- stderr -------------------------------
error: avoid using named labels in inline assembly
##[error]  --> /checkout/tests/ui/asm/hexagon-register-pairs.rs:18:15
   |
LL |         asm!("r1:0 = memd(r29+#0)", lateout("r0") _, lateout("r1") _);
   |               ^^
   |
   = help: only local labels of the form `<number>:` should be used in inline asm
   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
   = note: `#[deny(named_asm_labels)]` on by default

error: avoid using named labels in inline assembly
##[error]  --> /checkout/tests/ui/asm/hexagon-register-pairs.rs:19:15
   |
LL |         asm!("r3:2 = combine(#1, #0)", lateout("r2") _, lateout("r3") _);
   |               ^^
   |
   = help: only local labels of the form `<number>:` should be used in inline asm
   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information

error: avoid using named labels in inline assembly
##[error]  --> /checkout/tests/ui/asm/hexagon-register-pairs.rs:20:15
   |
LL |         asm!("r15:14 = memd(r30+#8)", lateout("r14") _, lateout("r15") _);
   |               ^^^
   |
   = help: only local labels of the form `<number>:` should be used in inline asm
   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information

error: avoid using named labels in inline assembly
##[error]  --> /checkout/tests/ui/asm/hexagon-register-pairs.rs:31:15
   |
LL |         asm!("label1: r7:6 = combine(#2, #3)"); //~ ERROR avoid using named labels
   |               ^^^^^^
   |
   = help: only local labels of the form `<number>:` should be used in inline asm
   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information

error: avoid using named labels in inline assembly
##[error]  --> /checkout/tests/ui/asm/hexagon-register-pairs.rs:31:23
   |
LL |         asm!("label1: r7:6 = combine(#2, #3)"); //~ ERROR avoid using named labels
   |                       ^^
   |
   = help: only local labels of the form `<number>:` should be used in inline asm
   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information

error: avoid using named labels in inline assembly
##[error]  --> /checkout/tests/ui/asm/hexagon-register-pairs.rs:34:15
   |
LL |         asm!("hexagon_label: nop"); //~ ERROR avoid using named labels
   |               ^^^^^^^^^^^^^
   |
   = help: only local labels of the form `<number>:` should be used in inline asm
   = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information

error: aborting due to 6 previous errors
------------------------------------------


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"avoid using named labels" mis-identifies inst operand as label
4 participants