+/*
+ * 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.
+ */
+
/**
- * This file implements the creation of the achitecture specific firm opcodes
- * and the coresponding node constructors for the mips assembler irg.
- * $Id$
+ * @file
+ * @brief This file implements the creation of the achitecture specific firm
+ * opcodes and the coresponding node constructors for the mips
+ * assembler irg.
+ * @author Matthias Braun, Mehdi
+ * @version $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#ifdef _WIN32
-#include <malloc.h>
-#else
-#include <alloca.h>
-#endif
-
#include <stdlib.h>
#include "irprog_t.h"
#include "firm_common_t.h"
#include "irvrfy_t.h"
#include "irprintf.h"
+#include "xmalloc.h"
-#include "../bearch.h"
+#include "../bearch_t.h"
#include "mips_nodes_attr.h"
#include "mips_new_nodes.h"
}
fprintf(F, " (%d)\n", attr->flags);
- if(attr->modes.load_store_mode != NULL) {
- fprintf(F, " load_store_mode %s\n", get_mode_name(attr->modes.load_store_mode));
- }
if(attr->stack_entity != NULL) {
fprintf(F, " stack entity %s\n", get_entity_name(attr->stack_entity));
}
tarval_snprintf(buf, sizeof(buf), attr->tv);
fprintf(F, " tarval %s\n", buf);
}
- if(attr->symconst_id != NULL) {
- fprintf(F, " symconst '%s'\n", get_id_str(attr->symconst_id));
+ if(attr->symconst != NULL) {
+ fprintf(F, " symconst '%s'\n", get_entity_name(attr->symconst));
}
fprintf(F, "=== mips attr end ===\n");
memset((void *)attr->slots, 0, n_res * sizeof(attr->slots[0]));
}
+static
+int mips_compare_attr(mips_attr_t *a, mips_attr_t *b)
+{
+ if(a->tv != b->tv)
+ return 1;
+ if(a->symconst != b->symconst)
+ return 1;
+ if(a->stack_entity != b->stack_entity)
+ return 1;
+ if(a->flags != b->flags)
+ return 1;
+ if(a->n_res != b->n_res)
+ return 1;
+ if(a->switch_default_pn != b->switch_default_pn)
+ return 1;
+
+ return 0;
+}
+
/************************************************************************
* ___ _____ _ _ _
* |_ _| ___|__ | | __| (_)_ __ __ _
* |___/
************************************************************************/
+#if 0
// test if a tarval can be expressed in a 16bit immediate value
static int is_tarval_16(ir_node* node)
{
op_mips_sr->ops.transform_node = mips_transform_sr;
op_mips_slt->ops.transform_node = mips_transform_slt;
}
+#endif
/***************************************************************************************
* _ _ _