Merge remote-tracking branch 'upstream/master'

This commit is contained in:
tandasat
2016-04-23 11:26:36 -07:00
2 changed files with 10 additions and 6 deletions

View File

@ -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; \
} \
} \
}
/*

View File

@ -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