Barebit / x86reference

X86 Opcode and Instruction Reference
http://ref.x86asm.net
GNU Lesser General Public License v3.0
238 stars 54 forks source link

MOVSLDUP use wrong operand types #24

Closed Kashio closed 5 months ago

Kashio commented 1 year ago

Right now MOVSLDUP encoded with opcode F3 0F 12 use operand type q for both its operands which is defined as:

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

According to the intel docs:

Duplicates even-indexed single-precision floating-point values from the source operand (the second operand). See Figure 4-4. The source operand is an XMM, YMM or ZMM register or 128, 256 or 512-bit memory location and the destination operand is an XMM, YMM or ZMM register.

Putting aside VEX/EVEX, the instruction is dealing with 128 bit single precision fp values for both its operands, the operand type should be of type ps which is defined as:

128-bit packed single-precision floating-point data.

BarebitOpenSource commented 10 months ago

Good point. I need to figure out why Intel uses this operand type in the manual.

BarebitOpenSource commented 5 months ago

Won't fix, see #27.