diff options
author | comex | 2015-01-19 19:08:48 -0500 |
---|---|---|
committer | comex | 2015-01-19 19:08:48 -0500 |
commit | 066a1fa86407c80c3b7ef2c3e8c86f1ffbd2929d (patch) | |
tree | 6f5a4abebbcb4cf034ab009a49c167ac95da418e /lib/arm/dis-arm-multi.inc.h | |
parent | add the required copy of the GPL; clarify license text (diff) | |
download | substitute-066a1fa86407c80c3b7ef2c3e8c86f1ffbd2929d.tar.gz |
some reorganization
Diffstat (limited to 'lib/arm/dis-arm-multi.inc.h')
-rw-r--r-- | lib/arm/dis-arm-multi.inc.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/arm/dis-arm-multi.inc.h b/lib/arm/dis-arm-multi.inc.h new file mode 100644 index 0000000..56cde35 --- /dev/null +++ b/lib/arm/dis-arm-multi.inc.h @@ -0,0 +1,16 @@ +#include "dis-thumb.inc.h" +#include "dis-thumb2.inc.h" +#include "dis-arm.inc.h" + +static INLINE void P(dis)(tdis_ctx ctx) { + if (ctx->pc_low_bit) { + uint16_t op = *(uint16_t *) ctx->ptr; + bool is_32 = (op >> 13 & 7) == 7 && (op >> 11 & 3) != 0; + if (is_32) + return P(dis_thumb2)(ctx); + else + return P(dis_thumb)(ctx); + } else { + return P(dis_arm)(ctx); + } +} |