-typedef struct _arm_code_gen_t {
- const arch_code_generator_if_t *impl; /**< implementation */
- ir_graph *irg; /**< current irg */
- FILE *out; /**< output file */
- const arch_env_t *arch_env; /**< the arch env */
- set *reg_set; /**< set to memorize registers for FIRM nodes (e.g. phi) */
- firm_dbg_module_t *mod; /**< debugging module */
- int emit_decls; /**< flag indicating if decls were already emitted */
- const be_irg_t *birg; /**< The be-irg (contains additional information about the irg) */
- ir_type *int_tp; /**< the int type, needed for Call conversion */
-} arm_code_gen_t;
+#include "arm_nodes_attr.h"
+#include "be.h"
+
+typedef struct arm_isa_t arm_isa_t;
+
+/** The following bitmasks control CPU extensions: */
+enum arm_cpu_extensions {
+ ARM_EXT_V1 = 0x00000001, /**< All processors (core set). */
+ ARM_EXT_V2 = 0x00000002, /**< Multiply instructions. */
+ ARM_EXT_V2S = 0x00000004, /**< SWP instructions. */
+ ARM_EXT_V3 = 0x00000008, /**< MSR MRS. */
+ ARM_EXT_V3M = 0x00000010, /**< Allow long multiplies. */
+ ARM_EXT_V4 = 0x00000020, /**< Allow half word loads. */
+ ARM_EXT_V4T = 0x00000040, /**< Thumb v1. */
+ ARM_EXT_V5 = 0x00000080, /**< Allow CLZ, etc. */
+ ARM_EXT_V5T = 0x00000100, /**< Thumb v2.ยด*/
+ ARM_EXT_V5ExP = 0x00000200, /**< DSP core set. */
+ ARM_EXT_V5E = 0x00000400, /**< DSP Double transfers. */
+ ARM_EXT_V5J = 0x00000800, /**< Jazelle extension. */
+
+ /* Co-processor space extensions. */
+ ARM_CEXT_XSCALE = 0x00800000, /**< Allow MIA etc. */
+ ARM_CEXT_MAVERICK = 0x00400000, /**< Use Cirrus/DSP coprocessor. */
+ ARM_CEXT_IWMMXT = 0x00200000, /**< Intel Wireless MMX technology coprocessor. */
+};
+
+/**
+ * Architectures are the sum of the base and extensions. The ARM ARM (rev E)
+ * defines the following: ARMv3, ARMv3M, ARMv4xM, ARMv4, ARMv4TxM, ARMv4T,
+ * ARMv5xM, ARMv5, ARMv5TxM, ARMv5T, ARMv5TExP, ARMv5TE. To these we add
+ * three more to cover cores prior to ARM6. Finally, there are cores which
+ * implement further extensions in the co-processor space.
+ */
+enum arm_architectures {
+ ARM_ARCH_V1 = ARM_EXT_V1,
+ ARM_ARCH_V2 = ARM_ARCH_V1 | ARM_EXT_V2,
+ ARM_ARCH_V2S = ARM_ARCH_V2 | ARM_EXT_V2S,
+ ARM_ARCH_V3 = ARM_ARCH_V2S | ARM_EXT_V3,
+ ARM_ARCH_V3M = ARM_ARCH_V3 | ARM_EXT_V3M,
+ ARM_ARCH_V4xM = ARM_ARCH_V3 | ARM_EXT_V4,
+ ARM_ARCH_V4 = ARM_ARCH_V3M | ARM_EXT_V4,
+ ARM_ARCH_V4TxM = ARM_ARCH_V4xM | ARM_EXT_V4T,
+ ARM_ARCH_V4T = ARM_ARCH_V4 | ARM_EXT_V4T,
+ ARM_ARCH_V5xM = ARM_ARCH_V4xM| ARM_EXT_V5,
+ ARM_ARCH_V5 = ARM_ARCH_V4 | ARM_EXT_V5,
+ ARM_ARCH_V5TxM = ARM_ARCH_V5xM | ARM_EXT_V4T | ARM_EXT_V5T,
+ ARM_ARCH_V5T = ARM_ARCH_V5 | ARM_EXT_V4T | ARM_EXT_V5T,
+ ARM_ARCH_V5TExP = ARM_ARCH_V5T | ARM_EXT_V5ExP,
+ ARM_ARCH_V5TE = ARM_ARCH_V5TExP | ARM_EXT_V5E,
+ ARM_ARCH_V5TEJ = ARM_ARCH_V5TE | ARM_EXT_V5J,