- (arch_irn_has_reg_class(env, irn, -1, cls) && !arch_irn_is_ignore(env, irn))
-
-/**
- * Somebody who can be asked about nodes.
- */
-struct _arch_irn_handler_t {
-
- /**
- * Get the operations of an irn.
- * @param self The handler from which the method is invoked.
- * @param irn Some node.
- * @return Operations for that irn.
- */
- const void *(*get_irn_ops)(const arch_irn_handler_t *handler,
- const ir_node *irn);
-
-};
-
-/**
- * The code generator.
- */
-struct _arch_code_generator_if_t {
-
-
- /**
- * Initialize the code generator.
- * @param file The file to dump to.
- * @param birg A backend IRG session.
- * @return A newly created code generator.
- */
- void *(*init)(FILE *file, const be_irg_t *birg);
-
- /**
- * Called, when the graph is being normalized.
- */
- void (*prepare_graph)(void *self);
-
- /**
- * Called before scheduling.
- */
- void (*before_sched)(void *self);
-
- /**
- * Called before register allocation.
- */
- void (*before_ra)(void *self);
-
- /**
- * Called after register allocation to lower Spills to Stores
- * @param self The code generator
- * @param spill The spill node to lower
- * @return The new backend node which substitutes the spill
- */
- ir_node *(*lower_spill)(void *self, ir_node *spill);
-
- /**
- * Called after register allocation to lower Reloads to Loads
- * @param self The code generator
- * @param reload The reload node to lower
- * @return The new backend node which substitutes the reload
- */
- ir_node *(*lower_reload)(void *self, ir_node *reload);
-
- /**
- * Called after everything happened.
- * The code generator must also be de-allocated here.
- */
- void (*done)(void *self);
-
-};
-
-#define _arch_cg_call(cg, func) \
-do { \
- if((cg)->impl->func) \
- (cg)->impl->func(cg); \
-} while(0)
-
-#define arch_code_generator_prepare_graph(cg) _arch_cg_call(cg, prepare_graph)
-#define arch_code_generator_before_sched(cg) _arch_cg_call(cg, before_sched)
-#define arch_code_generator_before_ra(cg) _arch_cg_call(cg, before_ra)
-#define arch_code_generator_done(cg) _arch_cg_call(cg, done)
-
-/**
- * Code generator base class.
- */
-struct _arch_code_generator_t {
- const arch_code_generator_if_t *impl;
-};
-
-/**
- * ISA base class.
- */
-struct _arch_isa_t {
- const arch_isa_if_t *impl;
- const arch_register_t *sp; /** The stack pointer register. */
- const arch_register_t *bp; /** The base pointer register. */
- const int stack_dir; /** -1 for decreasing, 1 for increasing. */
-};
-
-#define arch_isa_stack_dir(isa) ((isa)->stack_dir)
-#define arch_isa_sp(isa) ((isa)->sp)
-#define arch_isa_bp(isa) ((isa)->bp)