JIT: Use faster unchecked write-barrier for boxed statics #98166
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
And a small clean up.
Example:
Codegen diff for
Test:; Method Prog:Test(System.String,System.String) (FullOpts) G_M57713_IG01: push rdi push rsi push rbx sub rsp, 32 mov rbx, rcx mov rsi, rdx G_M57713_IG02: test byte ptr [(reloc 0x7ff8e243b942)], 1 ; global ptr je SHORT G_M57713_IG05 G_M57713_IG03: mov rcx, 0x21A0D401E10 ; box for Prog:boxedStatic mov rdi, gword ptr [rcx] add rdi, 8 mov rcx, rdi mov rdx, rbx - call CORINFO_HELP_CHECKED_ASSIGN_REF + call CORINFO_HELP_ASSIGN_REF mov rcx, rdi mov rdx, rsi - call CORINFO_HELP_CHECKED_ASSIGN_REF + call CORINFO_HELP_ASSIGN_REF nop G_M57713_IG04: add rsp, 32 pop rbx pop rsi pop rdi ret G_M57713_IG05: mov rcx, 0x7FF8E243B910 mov edx, 2 call CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE jmp SHORT G_M57713_IG03 ; Total bytes of code: 92