summaryrefslogtreecommitdiff
path: root/src/arch/arm/v456/instruction-def.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/v456/instruction-def.h')
-rw-r--r--src/arch/arm/v456/instruction-def.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/src/arch/arm/v456/instruction-def.h b/src/arch/arm/v456/instruction-def.h
new file mode 100644
index 0000000..521f939
--- /dev/null
+++ b/src/arch/arm/v456/instruction-def.h
@@ -0,0 +1,91 @@
+
+/* OpenIDA - Outil d'analyse de fichiers binaires
+ * instruction-def.h - définition interne des identifiants d'instructions ARM v4/5/6
+ *
+ * Copyright (C) 2013 Cyrille Bagard
+ *
+ * This file is part of OpenIDA.
+ *
+ * OpenIDA is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * OpenIDA is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Foobar. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef _ARCH_ARM_V456_INSTRUCTION_DEF_H
+#define _ARCH_ARM_V456_INSTRUCTION_DEF_H
+
+
+
+
+
+/**
+ * ARM Architecture Reference Manual.
+ * A4.2 ARM instructions and architecture versions.
+ */
+
+#define ARM_VERSION_4 (1 << 1)
+#define ARM_VERSION_V4T (1 << 2)
+#define ARM_VERSION_V5T (1 << 3)
+#define ARM_VERSION_V5TE (1 << 4)
+#define ARM_VERSION_V5TEJ (1 << 5)
+#define ARM_VERSION_V6 (1 << 6)
+#define ARM_VERSION_V5TEXP (1 << 7)
+
+#define ARM_VERSION_ALL_456 (ARM_VERSION_4 \
+ | ARM_VERSION_V4T \
+ | ARM_VERSION_V5T \
+ | ARM_VERSION_V5TE \
+ | ARM_VERSION_V5TEJ \
+ | ARM_VERSION_V6 \
+ | ARM_VERSION_V5TEXP)
+
+
+
+
+/* Enumération de tous les opcodes */
+typedef enum _ArmV456Opcodes
+{
+ /**
+ * ARM Architecture Reference Manual.
+ * § A3.4 Data-processing instructions.
+ */
+
+ AOP_AND, /* and (0x00) */
+ AOP_EOR, /* eor (0x01) */
+ AOP_SUB, /* sub (0x02) */
+ AOP_RSB, /* rsb (0x03) */
+ AOP_ADD, /* add (0x04) */
+ AOP_ADC, /* adc (0x05) */
+ AOP_SBC, /* sbc (0x06) */
+ AOP_RSC, /* rsc (0x07) */
+ AOP_TST, /* tst (0x08) */
+ AOP_TEQ, /* teq (0x09) */
+ AOP_CMP, /* cmp (0x0a) */
+ AOP_CMN, /* cmn (0x0b) */
+ AOP_ORR, /* orr (0x0c) */
+ AOP_MOV, /* mov (0x0d) */
+ AOP_BIC, /* bic (0x0e) */
+ AOP_MVN, /* mvn (0x0f) */
+
+
+ AOP_LDR,
+ AOP_STR,
+
+
+ AOP_COUNT
+
+} ArmV456Opcodes;
+
+
+
+#endif /* _ARCH_ARM_V456_INSTRUCTION_DEF_H */