Skip to content

-Zregparm=3 support in rustc #116972

Closed
Closed

Description

@ojeda

i.e. the equivalent of Clang's/GCC's -mregparm=3. The kernel needs it to support the x86 32-bit architecture, together with -Zreg-struct-return.

It could potentially be a "global target feature", i.e. a target feature that is required to be set the same way for all compilation units.

https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#index-regparm-function-attribute_002c-x86
https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-mregparm

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Oct 20, 2023
  2. added
    A-ABIArea: Concerning the application binary interface (ABI)
    on Oct 20, 2023
  3. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Oct 21, 2023
  4. RalfJung commented on Sep 17, 2024

    @RalfJung
    Member

    It could potentially be a #121970 (comment), i.e. a target feature that is required to be set the same way for all compilation units.

    Indeed, something like this has to be done for stabilization -- we have to make sure we detect linking crates that use different values for this flag.

    (Also, that means without stable -Zbuild-std, this can't actually be used on stable.)

  5. 2 remaining items

  6. added a commit that references this issue on Oct 22, 2024
  7. added a commit that references this issue on Oct 22, 2024
  8. added a commit that references this issue on Oct 22, 2024
  9. added a commit that references this issue on Oct 22, 2024
  10. added a commit that references this issue on Oct 22, 2024
  11. ojeda commented on Nov 18, 2024

    @ojeda
    ContributorAuthor

    See #131749.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ABIArea: Concerning the application binary interface (ABI)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions