Skip to content

Wrong operand typre returned by xed_decoded_inst_operand_element_type() #229

@jeffli678

Description

@jeffli678

For instruction pminub xmm0, xmm (hex 660fdac1), the two operands should both be XED_OPERAND_ELEMENT_TYPE_UINT. However, XED_OPERAND_ELEMENT_TYPE_INT is returned by xed_decoded_inst_operand_element_type().

This can be confirmed by running the xed example 1 (see column ELEMTYPE):

$ ./xed-ex1 660fdac1
Attempting to decode: 66 0f da c1 
iclass PMINUB	category SSE	ISA-extension SSE2	ISA-set SSE2
instruction-length 4
operand-width 32
effective-operand-width 32
effective-address-width 32
stack-address-width 32
iform-enum-name PMINUB_XMMdq_XMMdq
iform-enum-name-dispatch (zero based) 3
iclass-max-iform-dispatch 4
Operands
#   TYPE               DETAILS        VIS  RW       OC2 BITS BYTES NELEM ELEMSZ   ELEMTYPE   REGCLASS
#   ====               =======        ===  ==       === ==== ===== ===== ======   ========   ========
0   REG0             REG0=XMM0   EXPLICIT  RW        DQ  128    16     4     32        INT        XMM
1   REG1             REG1=XMM1   EXPLICIT   R        DQ  128    16     4     32        INT        XMM
Memory Operands
  MemopBytes = 0
ATTRIBUTES: REQUIRES_ALIGNMENT 
ANY 66 PREFIX
EXCEPTION TYPE: SSE_TYPE_4
SSE
Vector length: 128 
Number of legacy prefixes: 1 
ISA SET: [SSE2]
0	CPUID BIT NAME: [SSE2]
	Leaf 0x00000001, subleaf 0x00000000, EDX[26]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions