fix mips immediate dumper
[libfirm] / ir / tr / entity.c
index 6115228..4e8ef8b 100644 (file)
@@ -1,34 +1,40 @@
 /*
- * Project:     libFIRM
- * File name:   ir/tr/entity.c
- * Purpose:     Representation of all program known entities.
- * Author:      Martin Trapp, Christian Schaefer
- * Modified by: Goetz Lindenmaier, Michael Beck
- * Created:
- * CVS-ID:      $Id$
- * Copyright:   (c) 1998-2007 Universität Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ * 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.
+ */
+
+/**
+ * @file
+ * @brief   Representation of all program known entities.
+ * @author  Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck
+ * @version $Id$
  */
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
 
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#ifdef HAVE_STDDEF_H
-# include <stddef.h>
-#endif
+#include <string.h>
+#include <stdlib.h>
+#include <stddef.h>
 
 #include "firm_common_t.h"
 
 #include "xmalloc.h"
 #include "entity_t.h"
-#include "mangle.h"
-#include "typegmod.h"
 #include "array.h"
 #include "irtools.h"
 #include "irhooks.h"
@@ -113,6 +119,7 @@ new_rd_entity(dbg_info *db, ir_type *owner, ident *name, ir_type *type)
        res->address_taken        = ir_address_taken_unknown;
        res->final                = 0;
        res->compiler_gen         = 0;
+       res->backend_marked       = 0;
        res->offset               = -1;
        res->offset_bit_remainder = 0;
        res->link                 = NULL;
@@ -487,6 +494,16 @@ void (set_entity_compiler_generated)(ir_entity *ent, int flag) {
        _set_entity_compiler_generated(ent, flag);
 }  /* set_entity_compiler_generated */
 
+/* Checks if an entity is marked by the backend */
+int (is_entity_backend_marked)(const ir_entity *ent) {
+       return _is_entity_backend_marked(ent);
+}  /* is_entity_backend_marked */
+
+/* Sets/resets the compiler generated flag */
+void (set_entity_backend_marked)(ir_entity *ent, int flag) {
+       _set_entity_backend_marked(ent, flag);
+}  /* set_entity_backend_marked */
+
 /* Checks if the address of an entity was taken. */
 ir_address_taken_state (get_entity_address_taken)(const ir_entity *ent) {
        return _get_entity_address_taken(ent);
@@ -609,7 +626,6 @@ ir_node *copy_const_value(dbg_info *dbg, ir_node *n) {
        case iro_Unknown:
                nn = new_d_Unknown(m); break;
        default:
-               DDMN(n);
                assert(0 && "opcode invalid or not implemented");
                nn = NULL;
                break;
@@ -1172,6 +1188,8 @@ int is_method_entity(ir_entity *ent) {
 /**
  * @todo not implemented!!! */
 int equal_entity(ir_entity *ent1, ir_entity *ent2) {
+       (void) ent1;
+       (void) ent2;
        fprintf(stderr, " calling unimplemented equal entity!!! \n");
        return 1;
 }  /* equal_entity */