-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
Description
unsafe void Test()
{
ReadOnlySpan<byte> utfStr = "hello"u8;
fixed (byte* ptr = utfStr)
{
Console.WriteLine((nint)ptr);
}
}Actual codegen (in an non-unloadable assembly):
; Method Test_DevDiv_255294:Test():this (FullOpts)
sub rsp, 40
mov rcx, 0x16992A529E8 ; static handle
mov bword ptr [rsp+0x20], rcx
mov rcx, 0x16992A529E8
call [System.Console:WriteLine(long)]
xor eax, eax
mov bword ptr [rsp+0x20], rax
add rsp, 40
ret
; Total bytes of code: 47Expected codegen:
; Method Test_DevDiv_255294:Test():this (FullOpts)
sub rsp, 40
mov rcx, 0x29658B929E8
call [System.Console:WriteLine(long)]
nop
add rsp, 40
ret Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI