Skip to content
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

Partially stabilize LoongArch target features #135015

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

Conversation

heiher
Copy link
Contributor

@heiher heiher commented Jan 2, 2025

Stabilization PR for the LoongArch target features. This PR stabilizes some of the target features tracked by #44839.

Specifically, this PR stabilizes the following target features:

  • frecipe
  • lasx
  • lbt
  • lsx
  • lvz

Docs PR: rust-lang/reference#1707

r? @Amanieu

@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 2, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 2, 2025

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

@heiher heiher force-pushed the stabilize-loongarch-target-features branch from cb6584c to 29c94f5 Compare January 2, 2025 07:35
@jieyouxu jieyouxu added the O-loongarch Target: LoongArch (LA32R, LA32S, LA64) label Jan 2, 2025
@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member

RalfJung commented Jan 2, 2025

If "d" and "f" work anything like the RISC-V features of the same name, they should not be stabilized yet. We need to figure out #116344 and #131799 for LoongArch first.

Does any of the other features ever have any effect on calling conventions or ABI?

@jieyouxu jieyouxu added the A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. label Jan 2, 2025
@heiher
Copy link
Contributor Author

heiher commented Jan 2, 2025

If "d" and "f" work anything like the RISC-V features of the same name, they should not be stabilized yet. We need to figure out #116344 and #131799 for LoongArch first.

Does any of the other features ever have any effect on calling conventions or ABI?

Thank you! Other than f and d, there are no other target features affecting the calling convention and ABI.

@heiher heiher changed the title Stabilize LoongArch target features Partially stabilize LoongArch target features Jan 2, 2025
@heiher heiher force-pushed the stabilize-loongarch-target-features branch from 29c94f5 to 4c59f0d Compare January 2, 2025 14:16
@ehuss
Copy link
Contributor

ehuss commented Jan 2, 2025

This will need a PR for documentation at https://github.com/rust-lang/reference/blob/master/src/attributes/codegen.md, and a lang (+whoever?) FCP.

Comment on lines 773 to 774
("relax", STABLE, &[]),
("ual", STABLE, &[]),
Copy link
Member

Choose a reason for hiding this comment

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

  • relax refers to linker relaxation support and may not be appropriate to expose as a target feature.
  • ual refers to support for unaligned memory access, similar to strict-align on ARM targets. It's probably fine to stabilize as-is, but we may want to double-check with other targets if we want to have a consistent feature name between all of them (alternatively it's also fine to make the feature target-specific).

Copy link
Member

Choose a reason for hiding this comment

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

Also to be clear, ual can only affect how unaligned accesses are codegen'd, and nothing else. See this recent discussion on Zulip.

If we have target feature docs somewhere, they should clarify hat unaligned accesses are still UB except when performed via {read,write}_unaligned.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with skipping these two target features and stabilizing them at a more appropriate time.

@Amanieu
Copy link
Member

Amanieu commented Jan 2, 2025

r? lang

@rustbot rustbot added the T-lang Relevant to the language team, which will review and decide on the PR/issue. label Jan 2, 2025
@rustbot rustbot assigned joshtriplett and unassigned Amanieu Jan 2, 2025
@heiher
Copy link
Contributor Author

heiher commented Jan 3, 2025

This will need a PR for documentation at https://github.com/rust-lang/reference/blob/master/src/attributes/codegen.md, and a lang (+whoever?) FCP.

PR: rust-lang/reference#1707

@heiher heiher force-pushed the stabilize-loongarch-target-features branch from 4c59f0d to 71e17a0 Compare January 3, 2025 07:10
@bors
Copy link
Contributor

bors commented Jan 6, 2025

☔ The latest upstream changes (presumably #134794) made this pull request unmergeable. Please resolve the merge conflicts.

@heiher heiher force-pushed the stabilize-loongarch-target-features branch from 71e17a0 to 49b6947 Compare January 6, 2025 06:56
@traviscross traviscross added the I-lang-nominated Nominated for discussion during a lang team meeting. label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. I-lang-nominated Nominated for discussion during a lang team meeting. O-loongarch Target: LoongArch (LA32R, LA32S, LA64) 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. T-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants