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

Wrong operand typre returned by xed_decoded_inst_operand_element_type() #229

Open
jeffli678 opened this issue Jun 1, 2020 · 1 comment
Assignees

Comments

@jeffli678
Copy link

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]
@markcharney
Copy link
Contributor

The element types are missing from the older stuff (before AVX); XED generally attempts to infer type information from the oc2 thing (dq, etc) when not present. I can fix this one instruction but would have to allocate some time to add types to the all the older stuff. Thanks for reminding me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants