+/*
+ * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
/**
- * ISA implementation for Firm IR nodes.
+ * @file
+ * @brief ISA implementation for Firm IR nodes.
+ * @author Daniel Grund
+ * @version $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#ifdef WITH_LIBCORE
-#include <libcore/lc_opts.h>
-#endif
-
#include "bitset.h"
#include "obst.h"
#include "irtools.h"
#include "../be_t.h"
-#include "../bearch.h"
+#include "../bearch_t.h"
#include "../besched.h"
#include "../beutil.h"
#include "../beabi.h"
static const arch_register_req_t firm_std_reg_req = {
arch_register_req_type_normal,
®_classes[CLS_DATAB],
- NULL,
- NULL
+ 0,
+ 0
};
static const arch_register_req_t *
-firm_get_irn_reg_req(const void *self,
- arch_register_req_t *req, const ir_node *irn, int pos)
+firm_get_irn_reg_req(const void *self, const ir_node *irn, int pos)
{
if(is_firm_be_mode(get_irn_mode(irn)))
- memcpy(req, &firm_std_reg_req, sizeof(*req));
- else
- req = NULL;
+ return &firm_std_reg_req;
- return req;
+ return NULL;
}
struct irn_reg_assoc {
return NULL;
}
-static void firm_set_frame_entity(const void *self, const ir_node *irn, ir_entity *ent)
+static void firm_set_frame_entity(const void *self, ir_node *irn, ir_entity *ent)
{
}
static void prepare_walker(ir_node *irn, void *data)
{
- opcode opc = get_irn_opcode(irn);
+ ir_opcode opc = get_irn_opcode(irn);
/* A replacement for this node has already been computed. */
if(get_irn_link(irn))
ir_node *bl = get_nodes_block(irn);
for(i = 0, n = get_irn_arity(irn); i < n; ++i) {
- ir_node *op = get_irn_n(irn, i);
- opcode opc = get_irn_opcode(op);
+ ir_node *op = get_irn_n(irn, i);
+ ir_opcode opc = get_irn_opcode(op);
if(opc == iro_Const
|| opc == iro_Unknown
free(self);
}
-static void *firm_cg_init(const be_irg_t *birg);
+static void *firm_cg_init(be_irg_t *birg);
static const arch_code_generator_if_t firm_code_gen_if = {
firm_cg_init,
firm_codegen_done
};
-static void *firm_cg_init(const be_irg_t *birg)
+static void *firm_cg_init(be_irg_t *birg)
{
firm_code_gen_t *cg = xmalloc(sizeof(*cg));
cg->impl = &firm_code_gen_if;
- cg->irg = birg->irg;
+ cg->irg = be_get_birg_irg(birg);
return cg;
}
return NULL;
}
+/**
+ * Return irp irgs in the desired order.
+ */
+static ir_graph **firm_get_irg_list(const void *self, ir_graph ***irg_list) {
+ return NULL;
+}
+
/**
* Returns the libFirm configuration parameter for this backend.
*/
firm_get_libfirm_params,
firm_get_allowed_execution_units,
firm_get_machine,
+ firm_get_irg_list,
};