HLT instruction in ARM64 is also a trap

This commit is contained in:
pancake 2017-12-03 16:55:26 +01:00
parent 37626f13a5
commit 18a61de043

View File

@ -1,4 +1,4 @@
/* radare2 - LGPL - Copyright 2013-2016 - pancake */
/* radare2 - LGPL - Copyright 2013-2017 - pancake */
#include <r_anal.h>
#include <r_lib.h>
@ -2140,6 +2140,10 @@ static void anop64 (csh handle, RAnalOp *op, cs_insn *insn) {
case ARM64_INS_BRK:
op->type = R_ANAL_OP_TYPE_TRAP;
break;
case ARM64_INS_HLT:
op->type = R_ANAL_OP_TYPE_TRAP;
// hlt stops the process, not skips some cycles like in x86
break;
case ARM64_INS_CCMP:
case ARM64_INS_CCMN:
case ARM64_INS_CMP: