Format | Assembly Format | Description |
---|---|---|
FE 0A <unsigned int16> | ldarga argNum |
Fetch the address of argument argNum. |
0F <unsigned int8> | ldarga.s argNum |
Fetch the address of argument argNum, short form. |
…, → …, address of argument number argNum
The ldarga
instruction fetches the address (of type &
, i.e., managed pointer) of the argNum'th argument, where arguments are numbered 0 onwards. The address will always be aligned to a natural boundary on the target machine (cf. cpblk
and initblk
). The short form (ldarga.s
) should be used for argument numbers 0–255. The result is a managed pointer (type &
).
For procedures that take a variable-length argument list, the ldarga
instructions can be used only for the initial fixed arguments, not those in the variable part of the signature.
[Rationale: ldarga
is used for byref parameter passing (see Partition I). In other cases, ldarg
and starg
should be used. end rationale]
None.
Correct CIL ensures that argNum is a valid argument index.
Verification (§III.1.8) tracks the type of the value loaded onto the stack as a managed pointer to the verification type (§I.8.7) of the method's declared argument type.