mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-10-07 02:43:23 +00:00
Fix invalid comparison with HPPA_OP_INVALID (#2300)
This commit is contained in:
parent
9daa1ffbac
commit
cda40c6537
@ -609,7 +609,7 @@ static void print_operand(MCInst *MI, SStream *O, const cs_hppa_op *op)
|
||||
break;
|
||||
case HPPA_OP_MEM:
|
||||
SStream_concat(O, "(");
|
||||
if (op->mem.space != HPPA_OP_INVALID &&
|
||||
if (op->mem.space != HPPA_REG_INVALID &&
|
||||
op->mem.space != HPPA_REG_SR0) {
|
||||
SStream_concat(O, HPPA_reg_name((csh)MI->csh,
|
||||
op->mem.space));
|
||||
|
@ -419,7 +419,7 @@ void HPPA_reg_access(const cs_insn *insn, cs_regs regs_read,
|
||||
}
|
||||
break;
|
||||
case HPPA_OP_MEM:
|
||||
if (op->mem.space != HPPA_OP_INVALID)
|
||||
if (op->mem.space != HPPA_REG_INVALID)
|
||||
regs_read[read_count++] = op->mem.space;
|
||||
if (op->mem.base_access & CS_AC_READ) {
|
||||
regs_read[read_count++] = op->mem.base;
|
||||
|
@ -42,7 +42,7 @@ def print_insn_detail(insn):
|
||||
print("\t\toperands[%u].type: DISP = 0x%s" % (c, to_x(i.imm)))
|
||||
if i.type == HPPA_OP_MEM:
|
||||
print("\t\toperands[%u].type: MEM" % c)
|
||||
if i.mem.space != HPPA_OP_INVALID:
|
||||
if i.mem.space != HPPA_REG_INVALID:
|
||||
print("\t\t\toperands[%u].mem.space: REG = %s" % (c, insn.reg_name(i.mem.space)))
|
||||
print("\t\t\toperands[%u].mem.base: REG = %s" % (c, insn.reg_name(i.mem.base)))
|
||||
if i.type == HPPA_OP_TARGET:
|
||||
|
@ -51,7 +51,7 @@ void print_insn_detail_hppa(csh handle, cs_insn *ins)
|
||||
break;
|
||||
case HPPA_OP_MEM:
|
||||
printf("\t\toperands[%u].type: MEM\n", i);
|
||||
if (op->mem.space != HPPA_OP_INVALID) {
|
||||
if (op->mem.space != HPPA_REG_INVALID) {
|
||||
printf("\t\t\toperands[%u].mem.space: REG = %s\n",
|
||||
i, cs_reg_name(handle, op->mem.space));
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ char *get_detail_hppa(csh *p_handle, cs_mode mode, cs_insn *ins)
|
||||
break;
|
||||
case HPPA_OP_MEM:
|
||||
add_str(&result, "\t\toperands[%u].type: MEM\n", i);
|
||||
if (op->mem.space != HPPA_OP_INVALID) {
|
||||
if (op->mem.space != HPPA_REG_INVALID) {
|
||||
add_str(&result,
|
||||
"\t\t\toperands[%u].mem.space: REG = %s\n",
|
||||
i, cs_reg_name(handle, op->mem.space));
|
||||
|
@ -64,7 +64,7 @@ static void print_insn_detail(cs_insn *ins)
|
||||
break;
|
||||
case HPPA_OP_MEM:
|
||||
printf("\t\toperands[%u].type: MEM\n", i);
|
||||
if (op->mem.space != HPPA_OP_INVALID) {
|
||||
if (op->mem.space != HPPA_REG_INVALID) {
|
||||
printf("\t\t\toperands[%u].mem.space: REG = %s\n",
|
||||
i, cs_reg_name(handle, op->mem.space));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user