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

Conversation

@mikedn
Copy link

@mikedn mikedn commented Jun 5, 2018

The data operand can theoretically be a small int so we need to use its actual type to determine instruction size.

In practice this issue does not seem to happen as the importer is pretty insistent in spilling interlocked arguments to lclvars that have the proper type. Even when the data argument is already a small int lclvar (e.g. short method argument) this still doesn't cause problems because there's a cast between the method argument and LOCKADD.

The data operand can theoretically be a small int so we need to use its actual type to determine instruction size.

In practice this issue does not seem to happen as the importer is pretty insistent in spilling interlocked arguments to lclvars that have the proper type. Even when the data argument is already a small int lclvar (e.g. short method argument) this still doesn't cause problems because there's a cast between the method argument and LOCKADD.
@mikedn mikedn mentioned this pull request Jun 5, 2018
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 - thanks!

@CarolEidt CarolEidt merged commit d6a8692 into dotnet:master Jun 6, 2018
@mikedn mikedn deleted the lockadd4 branch October 5, 2019 07:16
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Use the actual type of LOCKADD's data operand

Commit migrated from dotnet/coreclr@d6a8692
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.

2 participants