JIT: Sign/zero-extend small primitive arguments for pinvokes on arm32 and Apple arm64#106314
JIT: Sign/zero-extend small primitive arguments for pinvokes on arm32 and Apple arm64#106314jakobbotsch merged 11 commits intodotnet:mainfrom
Conversation
… and Apple arm64 Fix dotnet#101046
| @@ -293,14 +293,11 @@ typedef uint8_t CODE_LOCATION; | |||
|
|
|||
| typedef bool CLR_BOOL; | |||
There was a problem hiding this comment.
Looks like it's still used as the return value for HandleTableRestrictedCallbackFunction.
There was a problem hiding this comment.
And TryGetTaggedMemoryCallback.
These correspond to the following managed methods:
CLR_BOOL is not quite right for neither of these, but I do not think that this mismatch is going to cause any real problem. It would be nice to clean this up in a follow up.
This reverts commit 084f970.
|
@AndyAyersMS, PTAL. This is for RC1 snap. |
|
cc @dotnet/jit-contrib PTAL @AndyAyersMS @jkotas |
| typedef INT32 FC_INT16_RET; | ||
| typedef UINT32 FC_UINT16_RET; | ||
|
|
||
| // Small primitive args are not widened. |
There was a problem hiding this comment.
The comment around line 150 in this file still mentions CLR_BOOL.
There was a problem hiding this comment.
Mind if I update that in a separate change tomorrow?
There was a problem hiding this comment.
Nevermind, updated it as well now due to those other places I missed the conversion.
|
These places are missing the |
|
cc @carlossanlop to include this in RC1 snap if CI tests pass. |
|
Thanks. I'm aware, it's in my list of PRs to wait. @jakobbotsch reached out earlier. |
|
The runtime pipeline is done (some of the jobs didn't have their status updates, presumably because of the outage). Build analysis is happy. We can skip waiting for the superpmi jobs – they were green in the previous run and there hasn't been any JIT changes since then. |
Fix #101046
Alternative to #106312 that keeps the behavior as is for the managed calling convention and only changes it for pinvokes. This requires changing fcalls in the VM to access small primitive typed arguments without assumptions about normalization.