Skip to content

Conversation

@BruceForstall
Copy link
Contributor

@BruceForstall BruceForstall commented Sep 9, 2021

On Windows/x86, if a call returns a SIMD8 in two registers
(eax, edx), and needs to be assembled and stored into a single
SIMD register, AND we don't have the SSE41 ABI available (because
the hardware doesn't support it, or we specifically disable it),
then we need a temporary register. In the failure case, the target
register and temporary register were the same, and then interfered
with each other. The fix is to force the temporary register to
be different from the target register.

No SPMI asm diffs

Fixes #58899

On Windows/x86, if a call returns a SIMD8 in two registers
(eax, edx), and needs to be assembled and stored into a single
SIMD register, AND we don't have the SSE41 ABI available (because
the hardware doesn't support it, or we specifically disable it),
then we need a temporary register. In the failure case, the target
register and temporary register were the same, and then interfered
with each other. The fix is to force the temporary register to
be different from the target register.

Fixes dotnet#58899
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 9, 2021
@ghost
Copy link

ghost commented Sep 9, 2021

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

Issue Details

On Windows/x86, if a call returns a SIMD8 in two registers
(eax, edx), and needs to be assembled and stored into a single
SIMD register, AND we don't have the SSE41 ABI available (because
the hardware doesn't support it, or we specifically disable it),
then we need a temporary register. In the failure case, the target
register and temporary register were the same, and then interfered
with each other. The fix is to force the temporary register to
be different from the target register.

Fixes #58899

Author: BruceForstall
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@BruceForstall
Copy link
Contributor Author

@tannergooding @kunalspathak @dotnet/jit-contrib PTAL

@BruceForstall
Copy link
Contributor Author

Testing is successful; just need a review to merge.

Copy link
Contributor

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

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

Looks like it got introduced when we added support genReg1/genReg2->SIMD8 in
#52581

LGTM.

@BruceForstall BruceForstall merged commit 2679c1e into dotnet:main Sep 10, 2021
@BruceForstall
Copy link
Contributor Author

/backport to release/6.0

@github-actions
Copy link
Contributor

@BruceForstall BruceForstall deleted the Fix58899 branch September 13, 2021 16:11
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure: Interop\PInvoke\Vector2_3_4\Vector2_3_4\Vector2_3_4.dll

2 participants