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

FCLASS.S (.D) instruction is not working correctly #20

Open
zeeshanrafique23 opened this issue Apr 24, 2021 · 0 comments
Open

FCLASS.S (.D) instruction is not working correctly #20

zeeshanrafique23 opened this issue Apr 24, 2021 · 0 comments

Comments

@zeeshanrafique23
Copy link

zeeshanrafique23 commented Apr 24, 2021

FCLASS.S or FCLASS.D instruction looks at a floating point value and determines what sort of a number it is. For example, does the value represents +0.0, -0.0, NaN, +infin, - infin etc..
According to the spec it should return the following values based on a floating point number and store it to a integer register.
FCLASS
But actually it is giving the following results

For +0.0, it gives value = 0x00000008 
But it should be value = 0x00000010
For -0.0, it gives `IllegalArgumentException: Count 'n' must be non-negative, but was -1. 
But it should be value = 0x00000008
For +infinity, it gives value = 0x00000040 
But it should be value = 0x00000080
For -infinity, it gives `NumberFormatException: Invalid number format: '00000000-8000000' 
But it should be value = 0x00000001

.
.
and I didn't checked other cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant