Uh oh!
There was an error while loading. Please reload this page.
Fix zero-extending displacement on win_x86_x64 JIT - #117945
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a zero-extending issue in the x86_x64 JIT compiler that was causing crossgen2-comparison test failures. The issue occurred when comparing crossgen output targeting x86 from both x86 and x64 JITs, which produced different encodings due to incorrect displacement handling.
- Changed displacement variable type from
unsignedtointto properly handle sign extension - Ensures 32-bit displacement values are correctly sign-extended to 64-bit values instead of being zero-extended
- Prevents the JIT from incorrectly treating displacements as large positive numbers and using inefficient larger encodings
max-charlamb
commented
Jul 22, 2025
/azp list |
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
max-charlamb
commented
Jul 22, 2025
/azp run runtime-coreclr crossgen2 outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jkotas
commented
Jul 22, 2025
cc @dotnet/jit-contrib |
Uh oh!
There was an error while loading. Please reload this page.
jkotas
commented
Jul 22, 2025
@max-charlamb The JIT codebase is auto-formatted. Could you please apply the auto-formatter patch from one of the failing formatter legs? |
max-charlamb
commented
Jul 22, 2025
/azp run runtime-coreclr crossgen2 outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Uh oh!
There was an error while loading. Please reload this page.
Resolves#115661
crossgen2-comparison test comparing crossgen targeting x86 from a x86 and x64 JIT has been failing due to the x64 host JIT using different encodings.
I traced this back to a 32-bit displacement value not being sign extended to a 64-bit value. This caused the JIT to think the displacement was a large positive number and used a larger encoding.
Fixed by treating the displacement as a signed value.