dotnet / dotnet-api-docs

.NET API reference documentation (.NET 5+, .NET Core, .NET Framework)
https://docs.microsoft.com/dotnet/api/
Other
702 stars 1.55k forks source link

Question about OpCodes.Ldind_I8 with integer values of less than 8 bytes #8682

Open gurustron opened 1 year ago

gurustron commented 1 year ago

Sorry for stupid question, but...

The docs mention have the following description for instruction:

Loads the int64 value at address addr onto the stack as an int64.

And mention next:

Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

But what will happen with values less than 8 bytes? Isn't int64 8 bytes? Am I missing something or should this be mentioned/fixed in the docs?

dotnet-issue-labeler[bot] commented 1 year ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

gfoidl commented 1 year ago

The same statement (cite from "And mention next") is on the other Ldind_-opcodes too. They all should be viewed.

steveharter commented 1 year ago

This section:

Note that integer values of less than 4 bytes are extended to int32 (not native int) when they are loaded onto the evaluation stack. Floating-point values are converted to F type when loaded onto the evaluation stack.

Should be removed from any 64-bit doc opcdoes.