arch_register_req_type_should_be_different = 8, /**< The register must be unequal
to some other at the node. */
+ arch_register_req_type_should_be_different_from_all = 16, /**< The register must be different from
+ all in's at the node */
} arch_register_req_type_t;
/**
*/
extern arch_irn_flags_t arch_irn_get_flags(const arch_env_t *env, const ir_node *irn);
-#define arch_irn_is_ignore(env, irn) ((arch_irn_get_flags(env, irn) & arch_irn_flags_ignore) != 0)
+#define arch_irn_is(env, irn, flag) ((arch_irn_get_flags(env, irn) & arch_irn_flags_ ## flag) != 0)
#define arch_irn_has_reg_class(env, irn, pos, cls) \
((cls) == arch_get_irn_reg_class(env, irn, pos))
#define arch_irn_consider_in_reg_alloc(env, cls, irn) \
- (arch_irn_has_reg_class(env, irn, -1, cls) && !arch_irn_is_ignore(env, irn))
+ (arch_irn_has_reg_class(env, irn, -1, cls) && !arch_irn_is(env, irn, ignore))
/**
- * Somebody who can be asked about nodes.
+ * Somebody who can be asked about IR nodes.
*/
struct _arch_irn_handler_t {
*/
const void *(*get_irn_ops)(const arch_irn_handler_t *handler,
const ir_node *irn);
-
};
/**
- * The code generator.
+ * The code generator interface.
*/
struct _arch_code_generator_if_t {
-
-
/**
* Initialize the code generator.
* @param file The file to dump to.
* The code generator must also be de-allocated here.
*/
void (*done)(void *self);
-
};
+/**
+ * helper macro: call function func from the code generator
+ * if it's implemented.
+ */
#define _arch_cg_call(cg, func) \
do { \
if((cg)->impl->func) \