Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 873 Bytes

vi.c.4.3-instructions-that-refer-to-parameters-or-local-variables.md

File metadata and controls

30 lines (25 loc) · 873 Bytes

VI.C.4.3 Instructions that refer to parameters or local variables

These instructions take one operand, which references a parameter or local variable of the current method. The variable can be referenced by its number (starting with variable 0) or by name (if the names are supplied as part of a signature using the form that supplies both a type and a name).

<instr> ::=
<instr_var> <int32>
| <instr_var> <localname>
<instr_var> ::= Derived from opcode.def
| ldarg
| ldarg.s
| ldarga
| ldarga.s
| ldloc
| ldloc.s
| ldloca
| ldloca.s
| starg
| starg.s
| stloc
| stloc.s

Examples:

stloc 0     // store into 0th local
ldarg X3    // load from argument named X3