Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

JIT: fix regression when returning struct with no fields on SysV #18708

Merged
merged 1 commit into from
Jun 29, 2018

Conversation

AndyAyersMS
Copy link
Member

The runtime classifies such structs as being returned by reference, so we
need to follow suit in the jit. If the classifier says the value can't be
returned in a register, then so be it.

Add a test case.

The runtime classifies such structs as being returned by reference, so we
need to follow suit in the jit. If the classifier says the value can't be
returned in a register, then so be it.

Add a test case.
@AndyAyersMS
Copy link
Member Author

@briansull PTAL
Should address failures seen in integrating a new coreclr into corefx: dotnet/corefx#30725

Verified CSharp tests pass on Unix with this change. One minor (and inconsequential diff) from PMI over fx (as the jit was self-consistent, but did not agree w/ the runtime). Expected diffs in new test case and in the CoreFX test case code.

@AndyAyersMS
Copy link
Member Author

cc @dotnet/jit-contrib

@jakobbotsch
Copy link
Member

Would this explain the difference seen in https://github.com/dotnet/coreclr/issues/18672#issuecomment-400806623?

Copy link

@CarolEidt CarolEidt left a comment

Choose a reason for hiding this comment

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

LGTM

@AndyAyersMS
Copy link
Member Author

@jakobbotsch I don't think so -- even though #18672 has a struct S1 with no fields, it's not the return type for any calls.

@AndyAyersMS AndyAyersMS merged commit 65d3199 into dotnet:master Jun 29, 2018
@AndyAyersMS AndyAyersMS deleted the FixPassInRegisterSysV branch June 29, 2018 16:32
AndyAyersMS added a commit to AndyAyersMS/coreclr that referenced this pull request Jun 29, 2018
The issue the test was hitting was worked around in dotnet#18282.

Fixes #17967.

Also add GitHub_18522_8 to the arm/arm64 lists (from dotnet#18708).
AndyAyersMS added a commit to AndyAyersMS/coreclr that referenced this pull request Jul 2, 2018
The issue the test was hitting was worked around in dotnet#18282.

Fixes #17967.

Also add GitHub_18522_8 to the arm/arm64 lists (from dotnet#18708).
AndyAyersMS added a commit that referenced this pull request Jul 4, 2018
The issue the test was hitting was worked around in #18292.

Fixes #17967.

Also add GitHub_18522_8 to the arm/arm64 lists (from #18708).
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…net/coreclr#18708)

The runtime classifies such structs as being returned by reference, so we
need to follow suit in the jit. If the classifier says the value can't be
returned in a register, then so be it.

Add a test case.

Commit migrated from dotnet/coreclr@65d3199
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants