Skip to content

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Mar 18, 2025

The fix replaces the native implementation of the native format decoder with the clone of the managed implementation.

Fixes #113609

The fix replaces the native implementation of the native format decoder with the clone of the managed implementation.

Fixes dotnet#113609
Copilot AI review requested due to automatic review settings March 18, 2025 02:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.

@jkotas
Copy link
Member Author

jkotas commented Mar 18, 2025

cc @dotnet/ilc-contrib

uintptr_t lengthBits = *pbEncoding & 0x0F;
size_t negLength = s_negLengthTab[lengthBits];
uintptr_t shift = s_shiftTab[lengthBits];
uint32_t result = *(PTR_uint32_t)(pbEncoding - negLength - 4);
Copy link
Member Author

Choose a reason for hiding this comment

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

This was tricky branch-free implementation to squeeze a few extra cycles. Exception handling is the only place where it was used.

I have replaced it with clone of much more straightforward managed implementation. We can afford to spend a few cycles on decoding EH clauses...

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

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

Nice cleanup too, thank you!

@MichalStrehovsky MichalStrehovsky merged commit e3ffa2c into dotnet:main Mar 18, 2025
93 checks passed
@jkotas jkotas deleted the issue-113609 branch March 19, 2025 07:51
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native AOT ARM32 lanes failing after docker update

3 participants