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

MOVSD use wrong operand types #22

Closed
Kashio opened this issue Dec 24, 2022 · 2 comments
Closed

MOVSD use wrong operand types #22

Kashio opened this issue Dec 24, 2022 · 2 comments

Comments

@Kashio
Copy link

Kashio commented Dec 24, 2022

Right now MOVSD encoded with opcode F2 0F 10 or F2 0F 11 use operand type sd for its operand of addressing W which is defined as:

Scalar element of a 128-bit packed double-precision floating data.

According to the intel docs:

Moves a scalar double-precision floating-point value from the source operand (second operand) to the destination operand (first operand). The source and destination operands can be XMM registers or 64-bit memory locations. This instruction can be used to move a double-precision floating-point value to and from the low quadword of an XMM register and a 64-bit memory location, or to move a double-precision floating-point value between the low quadwords of two XMM registers. The instruction cannot be used to transfer data between memory locations.

Since it's only copying the lower 64 bits of the register and the memory variant is also referencing 64 bit memory the operand type should be of type q which is defined as:

Quadword, regardless of operand-size attribute (for example, CALL (FF /2)).

Kashio added a commit to Kashio/x86reference that referenced this issue Dec 24, 2022
Kashio added a commit to Kashio/x86reference that referenced this issue Dec 24, 2022
Kashio added a commit to Kashio/x86reference that referenced this issue Dec 24, 2022
@BarebitOpenSource
Copy link
Contributor

Thanks for your review, however, the type q means 64-bit integer while MOVSD operates on scalar (64-bit) element of a 128-bit packed double-precision floating data. In both cases the size is always 64 bits but the data type differs. Also the Intel manual indicates sd all the time.

Let me know if I'm missing something.

@BarebitOpenSource
Copy link
Contributor

Feel free to reopen this issue if you still think the operand type is wrong.

@BarebitOpenSource BarebitOpenSource closed this as not planned Won't fix, can't repro, duplicate, stale Jan 31, 2024
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

2 participants