aboutsummaryrefslogtreecommitdiff
path: root/lib/arm/dis-arm-multi.inc.h
diff options
context:
space:
mode:
authorcomex2015-01-19 19:08:48 -0500
committercomex2015-01-19 19:08:48 -0500
commit066a1fa86407c80c3b7ef2c3e8c86f1ffbd2929d (patch)
tree6f5a4abebbcb4cf034ab009a49c167ac95da418e /lib/arm/dis-arm-multi.inc.h
parentadd the required copy of the GPL; clarify license text (diff)
downloadsubstitute-066a1fa86407c80c3b7ef2c3e8c86f1ffbd2929d.tar.gz
some reorganization
Diffstat (limited to 'lib/arm/dis-arm-multi.inc.h')
-rw-r--r--lib/arm/dis-arm-multi.inc.h16
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);
+ }
+}