-/* -*- c -*- */
-
-
/*
- * Project: libFIRM
- * File name: ir/external/read.c
- * Purpose: Read descriptions of external effects
- * Author: Florian
- * Modified by: Boris Boesler
- * Created: 11.10.2004
- * CVS-ID: $Id$
- * Copyright: (c) 1999-2004 Universität Karlsruhe
- * Licence: This file is protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ * Copyright (C) 1995-2008 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 Read descriptions of external effects
+ * @author Florian, Boris Boesler
+ * @date 11.10.2004
+ * @version $Id$
+ */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
-/* get prototype for alloca somehow */
-#ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-#endif
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
-
+#include <stdlib.h>
+#include <string.h>
#include <assert.h>
#include <libxml/xmlmemory.h>
#include "irmode.h"
#include "irdump.h"
#include "irvrfy.h"
-#include "type.h"
+#include "typerep.h"
#include "tv.h"
#include "xmalloc.h"
int num;
char *num_str;
eff_t *arg;
+ (void) doc;
CHECK_NAME (argelm, arg);
VERBOSE_PRINT ((stdout, "arg node \t0x%08x\n", (int) argelm));
{
const char *ref_id;
eff_t *valref;
+ (void) doc;
CHECK_NAME (valelm, valref);
VERBOSE_PRINT ((stdout, "valref node \t0x%08x\n", (int) valelm));
ident *type_id;
eff_t *alloc = NEW (eff_t); /* ...! */
alloc->kind = eff_alloc;
+ (void) doc;
CHECK_NAME (allocelm, alloc);
VERBOSE_PRINT ((stdout, "alloc node \t0x%08x\n", (int) allocelm));
ident *id;
eff_t *unknown = NEW (eff_t);
unknown->kind = eff_unknown;
+ (void) doc;
CHECK_NAME (unknownelm, unknown);
VERBOSE_PRINT ((stdout, "unknown node \t0x%08x\n", (int) unknownelm));
const char *tp_id = getNodeId (typeelm);
VERBOSE_PRINT ((stdout, "type node \t0x%08x (%s)\n", (int) typeelm, tp_id));
VERBOSE_PRINT ((stdout, "type = \"%s\"\n", getNodeTypeStr (typeelm)));
+ (void) doc;
type = (type_t*) xmalloc (sizeof (type_t));
type -> type_ident = new_id_from_str(getNodeTypeStr (typeelm));
parseEntity (xmlDocPtr doc, xmlNodePtr entelm)
{
entity_t *ent = NEW (entity_t);
+ (void) doc;
/* parse it */
const char *ent_id = getNodeId (entelm);
{
VERBOSE_PRINT ((stdout, "free arg node \t0x%08x\n", (int) arg));
free(arg);
- return;
}
static
{
VERBOSE_PRINT ((stdout, "free valref node \t0x%08x\n", (int) valref));
free(valref);
- return;
}
static
{
VERBOSE_PRINT ((stdout, "free select node \t0x%08x\n", (int) sel));
free(sel);
- return;
}
static
{
VERBOSE_PRINT ((stdout, "free load node \t0x%08x\n", (int) load));
free (load);
- return;
}
static
{
VERBOSE_PRINT ((stdout, "free store node \t0x%08x\n", (int) store));
free (store);
- return;
}
static
{
VERBOSE_PRINT ((stdout, "free alloc node \t0x%08x\n", (int) alloc));
free(alloc);
- return;
}
static
VERBOSE_PRINT ((stdout, "free call node \t0x%08x\n", (int) call));
free(call -> effect.call.args);
free(call);
- return;
}
static
VERBOSE_PRINT ((stdout, "free join node \t0x%08x\n", (int) join));
free(join -> effect.join.ins);
free(join);
- return;
}
static
{
VERBOSE_PRINT ((stdout, "free unknown node \t0x%08x\n", (int) unknown));
free(unknown);
- return;
}
static
{
VERBOSE_PRINT ((stdout, "free ret node \t0x%08x\n", (int) ret));
free(ret);
- return;
}
static
{
VERBOSE_PRINT ((stdout, "free raise node \t0x%08x\n", (int) raise));
free (raise);
- return;
}
ir_entity *ent;
ir_mode *mode;
eff_t *addr;
+ (void) irg;
VERBOSE_PRINT((stdout, "create load in %s\n",
get_id_str(proc -> proc_ident)));
ir_node *sel, *store;
ir_entity *ent;
eff_t *addr, *val;
+ (void) irg;
VERBOSE_PRINT((stdout, "create store in %s\n",
get_id_str(proc -> proc_ident)));
ir_node *alloc;
type_t *xtype;
symconst_symbol sym;
+ (void) irg;
VERBOSE_PRINT((stdout, "create alloc in %s\n",
get_id_str(proc -> proc_ident)));
ftype = xtype -> f_tp;
sym.type_p = ftype;
- alloc = new_Alloc(get_store(), new_SymConst(sym, symconst_type_size), ftype,
+ alloc = new_Alloc(get_store(), new_SymConst(mode_Is, sym, symconst_type_size), ftype,
heap_alloc);
set_store(new_Proj(alloc, mode_M, 0));
eff -> firmnode = new_Proj(alloc, mode_P, 2);
static void create_abstract_unknown(ir_graph *irg, proc_t *proc, eff_t *eff)
{
ir_node *unknown;
+ (void) irg;
VERBOSE_PRINT((stdout, "create unknown in %s\n",
get_id_str(proc -> proc_ident)));
int i, num;
ir_type *mtype;
int mik; /* is method somehow known? */
+ (void) irg;
VERBOSE_PRINT((stdout, "create call in %s\n",
get_id_str(proc -> proc_ident)));
ir_mode *join_md = mode_ANY;
int n_ins = -1;
int i;
+ (void) irg;
VERBOSE_PRINT((stdout, "create join in %s\n",
get_id_str(proc -> proc_ident)));
eff_t *eff;
ir_graph *irg;
int i, num;
+ (void) module;
/* test ir_entity */
assert(visibility_external_allocated == get_entity_visibility(fent)