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

x86: Add missing float-to-integer cast operation to CVTSD2SI/CVTSD2SI #6513

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sleigh-InSPECtor
Copy link
Contributor

CVTSS2SI/CVTSD2SI are instructions for converting scalar floating point values to integers.

In the SLEIGH spec, the float-to-integer cast operation (trunc) is missing in the constructors for handling the case where the size destination operand matches the floating point source operand size. (My guess is that the original author assumed that the round operation performed the cast not the trunc op).

e.g.:

f30f2dc0 "CVTSS2SI EAX, XMM0" with XMM0=0x41200000 (10.0)

  • Hardware Reference (AMD CPU): { RAX = 0xa }
  • x86:LE:64:default (Existing): { RAX = 0x41200000 }
  • x86:LE:64:default (This patch): { RAX = 0xa }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Processor/x86 Status: Triage Information is being gathered
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants