Barebit / x86reference

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

PMADDWD use wrong operand types #46

Closed Kashio closed 4 months ago

Kashio commented 1 year ago

Right now PMADDWD encoded with opcode 0F F5 use operand type d for its operand of addressing Q which is defined as:

Doubleword, regardless of operand-size attribute.

According to the intel docs:

Multiply the packed words in mm by the packed words in mm/m64, add adjacent doubleword results, and store in mm.

Since it's dealing with mmx registers the operand type should be of type q which is defined as:

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

BarebitOpenSource commented 9 months ago

Good catch.

BarebitOpenSource commented 4 months ago

Fixed.