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

FISTP Fixes + CPU Exception Handling #575

Merged
merged 6 commits into from
Jul 18, 2023
Merged

FISTP Fixes + CPU Exception Handling #575

merged 6 commits into from
Jul 18, 2023

Conversation

enusbaum
Copy link
Member

@enusbaum enusbaum commented May 3, 2023

  • Wrapped tick() in Try/Catch to dump CPU state in the event of an exception to help with debugging
  • Added support for both SS & DS as destination segments for FISTP
  • Additional FISTP Unit Tests

- Wrapped `tick()` in Try/Catch to dump CPU state in the event of an exception to help with debugging
- Added support for both SS & DS as destination segments for `FISTP`
- Additional `FISTP` Unit Tests
@enusbaum enusbaum requested a review from paladine May 3, 2023 12:36
}

[Theory]
//[InlineData((double)(long.MaxValue), long.MaxValue, 0)] //Overflows -- need to figure out why
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dude!

- `FISTP` on i386/i486 only supports 32-bit Integers, updated code when decompiler incorrectly identifies a 64-bit operation
- Added Casting & Conversion Checks setting proper FPU flags on failure
@paladine
Copy link
Collaborator

paladine commented May 7, 2023

Looks like the checks are failing?

- Handle Logger in Unit Tests (null)
- Set CPU ControlWord properly if value from the FPU is larger than a signed 32-bit Integer
@enusbaum
Copy link
Member Author

@paladine This clears all checks now <3

@paladine paladine merged commit 2d2c6f6 into master Jul 18, 2023
1 check passed
@paladine paladine deleted the fistp-fixes branch July 18, 2023 16:36
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

Successfully merging this pull request may close these issues.

2 participants