Skip to content

Delete FEATURE_MULTIREG_RETURN #116122

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

Merged
merged 2 commits into from
May 30, 2025
Merged

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented May 30, 2025

It was made obsolete by earlier thread suspension changes

It was made obsolete by earlier thread suspension changes
@Copilot Copilot AI review requested due to automatic review settings May 30, 2025 00:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the obsolete FEATURE_MULTIREG_RETURN functionality that is no longer needed due to earlier thread suspension changes.

  • Removed FEATURE_MULTIREG_RETURN related comments and code in src/coreclr/vm/threads.h
  • Updated union definitions in src/coreclr/vm/amd64/cgencpu.h to rely on UNIX_AMD64_ABI where applicable
  • Removed the IsValidReturnRegister helper and FEATURE_MULTIREG_RETURN logic in src/coreclr/inc/gcinfotypes.h and clrdefinitions.cmake

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/coreclr/vm/threads.h Removed obsolete comments regarding FEATURE_MULTIREG_RETURN
src/coreclr/vm/amd64/cgencpu.h Adjusted union configuration based on UNIX_AMD64_ABI
src/coreclr/inc/gcinfotypes.h Removed the IsValidReturnRegister function while retaining its invocation
src/coreclr/clrdefinitions.cmake Removed compile definitions for FEATURE_MULTIREG_RETURN
Comments suppressed due to low confidence (1)

src/coreclr/inc/gcinfotypes.h:253

  • The function IsValidReturnRegister has been removed, but its usage remains in the assertion. Please update or remove this assert to match the new logic.
_ASSERTE(IsValidReturnRegister(returnRegOrdinal));

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

endif()
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:FEATURE_MULTIREG_RETURN>)
elseif (CLR_CMAKE_TARGET_ARCH_ARM)
if (CLR_CMAKE_HOST_WIN32 AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
Copy link
Member Author

Choose a reason for hiding this comment

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

This was left-over from Win Arm32 that I have deleted as well.

@VSadov
Copy link
Member

VSadov commented May 30, 2025

At some point I thought that even HijackArgs is no longer a necessary thing. We could capture the entire context as OS does when it interrupts/signals a thread, and then use what JIT thinks is GC-live - in the same way as if it was an interrupt, just manually simulated at the point of hijack. But then I realized that the set of possibly GC-live registers after a call could be a lot smaller than all what OS saves, so HijackArgs still makes sense.

Copy link
Member

@VSadov VSadov left a comment

Choose a reason for hiding this comment

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

LGTM!

@jkotas
Copy link
Member Author

jkotas commented May 30, 2025

/ba-g unrelated test failure without a log

@jkotas jkotas merged commit 3b5bcb4 into dotnet:main May 30, 2025
92 of 96 checks passed
@jkotas jkotas deleted the FEATURE_MULTIREG_RETURN branch May 30, 2025 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants