Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed disassembly of Conv_R_Un opcode. #1310

Open
wants to merge 1 commit into
base: branch/v1.5.x
Choose a base branch
from

Conversation

MoFtZ
Copy link
Collaborator

@MoFtZ MoFtZ commented Dec 9, 2024

Fixes #1309.

Looking at the documentation, it should be a float operation rather than double.

However @m4rs-mt, I do not understand the last section of the implementation notes. Do we need to do anything special to handle the float64 case?

If overflow occurs converting a floating-point type to an integer the result returned is unspecified. The conv.r.un operation takes an integer off the stack, interprets it as unsigned, and replaces it with a floating-point number to represent the integer: either a float32, if this is wide enough to represent the integer without loss of precision, or else a float64.

Source: https://learn.microsoft.com/en-us/dotnet/api/system.reflection.emit.opcodes.conv_r_un?view=net-8.0

@MoFtZ MoFtZ added the bug label Dec 9, 2024
@MoFtZ MoFtZ added this to the v1.5.2 milestone Dec 9, 2024
@MoFtZ MoFtZ requested a review from m4rs-mt December 9, 2024 01:33
@MoFtZ MoFtZ force-pushed the bug/opcode-conv-r-un branch from 0103d21 to 68b0f1c Compare December 9, 2024 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant