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

MOVSS use wrong operand types #23

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

MOVSS use wrong operand types #23

Kashio opened this issue Dec 24, 2022 · 2 comments

Comments

@Kashio
Copy link

Kashio commented Dec 24, 2022

Right now MOVSS encoded with opcode F3 0F 10 or F3 0F 11 use operand type ss for its operand of addressing W which is defined as:

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

According to the intel docs:

Moves a scalar single-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 32-bit memory locations. This instruction can be used to move a single-precision floating-point value to and from the low doubleword of an XMM register and a 32-bit memory location, or to move a single-precision floating-point value between the low doublewords of two XMM registers. The instruction cannot be used to transfer data between memory locations.

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

Doubleword, regardless of operand-size attribute.

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, this is similar to #22.

The type d means 32-bit integer while MOVSS operates on scalar (32-bit) element of a 128-bit packed single-precision floating data. In both cases the size is always 32 bits but the data type differs. Also the Intel manual indicates ss in this case all the time.

@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