mirror of
https://gitlab.com/qemu-project/capstone.git
synced 2025-09-17 02:01:15 +08:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@ -1708,8 +1708,8 @@ static int readModRM(struct InternalInstruction *insn)
|
||||
} \
|
||||
switch (type) { \
|
||||
default: \
|
||||
*valid = 0; \
|
||||
return 0; \
|
||||
*valid = 0; \
|
||||
return 0; \
|
||||
case TYPE_Rv: \
|
||||
return (uint8_t)(base + index); \
|
||||
case TYPE_R8: \
|
||||
@ -1737,20 +1737,24 @@ static int readModRM(struct InternalInstruction *insn)
|
||||
case TYPE_VK1: \
|
||||
case TYPE_VK8: \
|
||||
case TYPE_VK16: \
|
||||
if (index > 7) \
|
||||
*valid = 0; \
|
||||
return prefix##_K0 + index; \
|
||||
case TYPE_MM64: \
|
||||
case TYPE_MM32: \
|
||||
case TYPE_MM: \
|
||||
return prefix##_MM0 + (index & 7); \
|
||||
case TYPE_SEGMENTREG: \
|
||||
return prefix##_ES + (index & 7); \
|
||||
if (index > 5) \
|
||||
*valid = 0; \
|
||||
return prefix##_ES + index; \
|
||||
case TYPE_DEBUGREG: \
|
||||
if (index > 7) \
|
||||
*valid = 0; \
|
||||
return prefix##_DR0 + index; \
|
||||
case TYPE_CONTROLREG: \
|
||||
return prefix##_CR0 + index; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -567,12 +567,12 @@ class CsInsn(object):
|
||||
|
||||
attr = object.__getattribute__
|
||||
if not attr(self, '_cs')._detail:
|
||||
return None
|
||||
raise AttributeError(name)
|
||||
_dict = attr(self, '__dict__')
|
||||
if 'operands' not in _dict:
|
||||
self.__gen_detail()
|
||||
if name not in _dict:
|
||||
return None
|
||||
raise AttributeError(name)
|
||||
return _dict[name]
|
||||
|
||||
# get the last error code
|
||||
|
Reference in New Issue
Block a user