Skip to content

Commit be6be78

Browse files
authored
x86: update read/write registers for transfer instructions (capstone-engine#2578)
1 parent 812e654 commit be6be78

File tree

5 files changed

+137
-156
lines changed

5 files changed

+137
-156
lines changed

arch/X86/X86Mapping.c

-19
Original file line numberDiff line numberDiff line change
@@ -1153,25 +1153,6 @@ void X86_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id)
11531153
break;
11541154
}
11551155
break;
1156-
1157-
case X86_INS_RET:
1158-
switch(h->mode) {
1159-
case CS_MODE_16:
1160-
insn->detail->regs_write[0] = X86_REG_SP;
1161-
insn->detail->regs_read[0] = X86_REG_SP;
1162-
break;
1163-
case CS_MODE_32:
1164-
insn->detail->regs_write[0] = X86_REG_ESP;
1165-
insn->detail->regs_read[0] = X86_REG_ESP;
1166-
break;
1167-
default: // 64-bit
1168-
insn->detail->regs_write[0] = X86_REG_RSP;
1169-
insn->detail->regs_read[0] = X86_REG_RSP;
1170-
break;
1171-
}
1172-
insn->detail->regs_write_count = 1;
1173-
insn->detail->regs_read_count = 1;
1174-
break;
11751156
}
11761157

11771158
memcpy(insn->detail->groups, insns[i].groups, sizeof(insns[i].groups));

0 commit comments

Comments
 (0)