updated header
[libfirm] / ir / be / mips / mips_gen_decls.c
index a077145..0957fb3 100644 (file)
@@ -1,3 +1,22 @@
+/*
+ * 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.
+ */
+
 /**
  * Dumps global variables and constants as mips assembler.
  * @date 14.02.2006
@@ -519,32 +538,6 @@ void mips_dump_globals(struct obstack *rdata_obstack, struct obstack *data_obsta
     dump_global(rdata_obstack, data_obstack, comm_obstack, get_class_member(gt, i));
 }
 
-
-static void mips_emit_stdlib_call(FILE *F, const char* name, int num) {
-       fprintf(F, "%s:\n", name);
-       fprintf(F, "\tori $v0, $zero, %d\n", num);
-       fprintf(F, "\tsyscall\n");
-       fprintf(F, "\tj $ra\n");
-       fprintf(F, "\n");
-}
-
-/**
- * Emits a default library for spim... Hack for now...
- */
-static void mips_emit_standard_lib(FILE* F) {
-       static int output = 0;
-       if(output)
-               return;
-       output = 1;
-
-       mips_emit_stdlib_call(F, "print_int", 1);
-       mips_emit_stdlib_call(F, "print_string", 4);
-       mips_emit_stdlib_call(F, "read_int", 5);
-       mips_emit_stdlib_call(F, "read_string", 8);
-       mips_emit_stdlib_call(F, "sbrk", 9);
-       mips_emit_stdlib_call(F, "exit", 10);
-}
-
 /************************************************************************/
 
 void mips_gen_decls(FILE *out) {
@@ -582,8 +575,4 @@ void mips_gen_decls(FILE *out) {
   obstack_free(&rodata, NULL);
   obstack_free(&data, NULL);
   obstack_free(&comm, NULL);
-
-  fprintf(out, "\t.text\n");
-
-  mips_emit_standard_lib(out);
 }