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

JIT ARM32: Fix wrong emitAttr passed for loads/stores in PUTARG_STK #68540

Merged
merged 2 commits into from
Apr 27, 2022

Conversation

jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Apr 26, 2022

On arm architectures the small load/store instructions all work larger
registers and for loads the instruction automatically normalizes the
result. Due to this we always expect to pass the normalized size for
loads/stores when generating these instructions, but in this particular
place we did not do so, resulting in asserts on arm32.

On arm64 the function ignores the size so nothing happens.

I assume this is the right fix based on genCodeForIndir and genCodeForStoreInd that both use emitActualTypeSize when emitting these same instructions.

cc @dotnet/jit-contrib PTAL @BruceForstall

Fix #60827

On arm architectures the small load/store instructions all work larger
registers and for loads the instruction automatically normalizes the
result. Due to this we always expect to pass the normalized size for
loads/stores when generating these instructions, but in this particular
place we did not do so, resulting in asserts on arm32.

On arm64 the function ignores the size so nothing happens.

Fix dotnet#60827
@ghost ghost assigned jakobbotsch Apr 26, 2022
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 26, 2022
@ghost
Copy link

ghost commented Apr 26, 2022

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

Issue Details

On arm architectures the small load/store instructions all work larger
registers and for loads the instruction automatically normalizes the
result. Due to this we always expect to pass the normalized size for
loads/stores when generating these instructions, but in this particular
place we did not do so, resulting in asserts on arm32.

On arm64 the function ignores the size so nothing happens.

I assume this is the right fix based on genCodeForIndir and genCodeForStoreInd that both use emitActualTypeSize when emitting these same instructions.

cc @dotnet/jit-contrib PTAL @BruceForstall

Author: jakobbotsch
Assignees: jakobbotsch
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch jakobbotsch merged commit 561957b into dotnet:main Apr 27, 2022
@jakobbotsch jakobbotsch deleted the fix-60827 branch April 27, 2022 08:31
@ghost ghost locked as resolved and limited conversation to collaborators May 27, 2022
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.

JIT ARM32: Assertion failed 'size == EA_4BYTE' during 'Generate code'
3 participants