Skip to content

Conversation

@folkertdev
Copy link
Contributor

This makes it a bit easier to see what assembly is actually used.

@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 Nov 12, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 12, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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

{
naked_asm!("adds r0, r0, r1", "bx lr")
cfg_select! {
any(target_arch = "x86_64", target_arch = "x86") => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be any(target_os = "windows", target_os = "linux")?

Seems like the next clause is also the wrong one?

Copy link
Contributor Author

@folkertdev folkertdev Nov 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did change the clause, but I believe that the change is correct. What assembly to use depends on the target architecture, not on the target operating system.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I guess in practice this worked before because we run this test with specific targets... so macOS really was always aarch64, while linux/win was x86_64/x86.

//@[linux] compile-flags: --target x86_64-unknown-linux-gnu
//@[linux] needs-llvm-components: x86
//@[win_x86] compile-flags: --target x86_64-pc-windows-gnu
//@[win_x86] needs-llvm-components: x86
//@[win_i686] compile-flags: --target i686-pc-windows-gnu
//@[win_i686] needs-llvm-components: x86
//@[macos] compile-flags: --target aarch64-apple-darwin
//@[macos] needs-llvm-components: aarch64

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 16, 2025

📌 Commit 6a6ffa6 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 16, 2025
bors added a commit that referenced this pull request Nov 16, 2025
Rollup of 7 pull requests

Successful merges:

 - #148703 (Use `overflow_checks` intrinsic so `IterRangeFrom` yields MAX before panicking in debug)
 - #148881 (use `cfg_select!` to pick assembly in codegen test)
 - #148911 (Make flags from `*FLAGS*` (such as `RUSTFLAGS`) env. vars. have precedence over flags set by bootstrap)
 - #148914 (fix incorrect import in `std_detect` on `aarch64-unknown-openbsd`)
 - #148971 (Document Error::{new,other} as to be avoided in pre_exec)
 - #148983 (Use rustc target metadata for build-manifest target lists)
 - #148995 (add must_use to extract_if methods)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 46650a1 into rust-lang:main Nov 16, 2025
11 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 16, 2025
rust-timer added a commit that referenced this pull request Nov 16, 2025
Rollup merge of #148881 - folkertdev:cfg-select-codegen-naked, r=Mark-Simulacrum

use `cfg_select!` to pick assembly in codegen test

This makes it a bit easier to see what assembly is actually used.
@jhpratt
Copy link
Member

jhpratt commented Nov 17, 2025

still in queue

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 17, 2025
Muscraft pushed a commit to Muscraft/rust that referenced this pull request Nov 17, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#148703 (Use `overflow_checks` intrinsic so `IterRangeFrom` yields MAX before panicking in debug)
 - rust-lang#148881 (use `cfg_select!` to pick assembly in codegen test)
 - rust-lang#148911 (Make flags from `*FLAGS*` (such as `RUSTFLAGS`) env. vars. have precedence over flags set by bootstrap)
 - rust-lang#148914 (fix incorrect import in `std_detect` on `aarch64-unknown-openbsd`)
 - rust-lang#148971 (Document Error::{new,other} as to be avoided in pre_exec)
 - rust-lang#148983 (Use rustc target metadata for build-manifest target lists)
 - rust-lang#148995 (add must_use to extract_if methods)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

5 participants