x86reference icon indicating copy to clipboard operation
x86reference copied to clipboard

UD use wrong operand types and wrong instruction name

Open Kashio opened this issue 2 years ago • 1 comments

Right now UD encoded with opcode 0F B9 doesn't have any operand types. According to the intel docs:

0F B9 /r UD1 r32, r/m32 RM Valid Valid Raise invalid opcode exception.

The instruction should use the v operand type according to my testing against objdump which is defined as:

Word or doubleword, depending on operand-size attribute (for example, INC (40), PUSH (50)).

Also the instruction mnemonic is defined as UD1 instead of UD

Kashio avatar Apr 25 '23 12:04 Kashio

Yes, it was undocumented in older manuals, it should be corrected now. However, the operands are:

UD1 r32, r/m32

So it should use d operand type (Doubleword, regardless of operand-size attribute). Actually the real operand size doesn't matter here because the operands are not used anyway: "Other than raising the invalid opcode exception, this instruction has no effect on processor state or memory".

BarebitOpenSource avatar Dec 21 '23 16:12 BarebitOpenSource