From 0b8a1f37dc61771158a95b5c492c2a18327999f6 Mon Sep 17 00:00:00 2001 From: Smaug123 <3138005+Smaug123@users.noreply.github.com> Date: Sun, 18 May 2025 23:22:49 +0100 Subject: [PATCH 1/2] Fix description of pointer in ldloca.s --- xml/System.Reflection.Emit/OpCodes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Reflection.Emit/OpCodes.xml b/xml/System.Reflection.Emit/OpCodes.xml index f56be8851d1..2dd93961a05 100644 --- a/xml/System.Reflection.Emit/OpCodes.xml +++ b/xml/System.Reflection.Emit/OpCodes.xml @@ -10423,7 +10423,7 @@ The following method overloads 1. The address stored in the local variable at the specified index is pushed onto the stack. - The `ldloca.s` instruction pushes the address of the local variable number at the passed index onto the stack, where local variables are numbered 0 onwards. The value pushed on the stack is already aligned correctly for use with instructions like and . The result is a transient pointer (type `*`). + The `ldloca.s` instruction pushes the address of the local variable number at the passed index onto the stack, where local variables are numbered 0 onwards. The value pushed on the stack is already aligned correctly for use with instructions like and . The result is a managed pointer (type `&`). The `ldloca.s` instruction provides an efficient encoding for use with the local variables 0 through 255. From 2a4cacf4a563dd0b6d8b48d73b276577fd87f9c8 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Fri, 4 Jul 2025 20:34:17 -0700 Subject: [PATCH 2/2] Update xml/System.Reflection.Emit/OpCodes.xml --- xml/System.Reflection.Emit/OpCodes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Reflection.Emit/OpCodes.xml b/xml/System.Reflection.Emit/OpCodes.xml index 735b062cd4e..154ba0158c1 100644 --- a/xml/System.Reflection.Emit/OpCodes.xml +++ b/xml/System.Reflection.Emit/OpCodes.xml @@ -10422,7 +10422,7 @@ The following method overloads 1. The address of the local variable at the specified index is pushed onto the stack. - The `ldloca.s` instruction pushes the address of the local variable number at the passed index onto the stack, where local variables are numbered 0 onwards. The value pushed on the stack is already aligned correctly for use with instructions like and . The result is a managed pointer (type `&`). + The `ldloca.s` instruction pushes the address of the local variable number at the passed index onto the stack, where local variables are numbered 0 onwards. The value pushed on the stack is already aligned correctly for use with instructions like and . The result is a managed pointer (type `&`). The local variable is stored in unmanaged memory, so the return value can be converted to an unmanaged pointer without pinning. The `ldloca.s` instruction provides an efficient encoding for use with the local variables 0 through 255.