aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/gen-support.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1999-04-16 01:34:07 +0000
committerStan Shebs <shebs@codesourcery.com>1999-04-16 01:34:07 +0000
commit071ea11e85eb9d529cc5eb3d35f6247466a21b99 (patch)
tree5deda65b8d7b04d1f4cbc534c3206d328e1267ec /sim/ppc/gen-support.c
parent1730ec6b1848f0f32154277f788fb29f88d8475b (diff)
downloadgdb-071ea11e85eb9d529cc5eb3d35f6247466a21b99.zip
gdb-071ea11e85eb9d529cc5eb3d35f6247466a21b99.tar.gz
gdb-071ea11e85eb9d529cc5eb3d35f6247466a21b99.tar.bz2
Initial creation of sourceware repository
Diffstat (limited to 'sim/ppc/gen-support.c')
-rw-r--r--sim/ppc/gen-support.c128
1 files changed, 0 insertions, 128 deletions
diff --git a/sim/ppc/gen-support.c b/sim/ppc/gen-support.c
deleted file mode 100644
index 0f76fe4..0000000
--- a/sim/ppc/gen-support.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/* This file is part of the program psim.
-
- Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- */
-
-#include "misc.h"
-#include "lf.h"
-#include "table.h"
-#include "filter.h"
-
-#include "ld-decode.h"
-#include "ld-cache.h"
-#include "ld-insn.h"
-
-#include "igen.h"
-
-#include "gen-semantics.h"
-#include "gen-support.h"
-
-static void
-print_support_function_name(lf *file,
- table_entry *function,
- int is_function_definition)
-{
- if (it_is("internal", function->fields[insn_flags])) {
- lf_print_function_type(file, SEMANTIC_FUNCTION_TYPE, "INLINE_SUPPORT",
- (is_function_definition ? "\n" : " "));
- print_function_name(file,
- function->fields[function_name],
- NULL,
- function_name_prefix_semantics);
- lf_printf(file, "\n(%s)", SEMANTIC_FUNCTION_FORMAL);
- if (!is_function_definition)
- lf_printf(file, ";");
- lf_printf(file, "\n");
- }
- else {
- lf_print_function_type(file,
- function->fields[function_type],
- "INLINE_SUPPORT",
- (is_function_definition ? "\n" : " "));
- lf_printf(file, "%s\n(%s)%s",
- function->fields[function_name],
- function->fields[function_param],
- (is_function_definition ? "\n" : ";\n"));
- }
-}
-
-
-static void
-support_h_function(insn_table *entry,
- lf *file,
- void *data,
- table_entry *function)
-{
- ASSERT(function->fields[function_type] != NULL);
- ASSERT(function->fields[function_param] != NULL);
- print_support_function_name(file,
- function,
- 0/*!is_definition*/);
- lf_printf(file, "\n");
-}
-
-
-extern void
-gen_support_h(insn_table *table,
- lf *file)
-{
- /* output a declaration for all functions */
- insn_table_traverse_function(table,
- file, NULL,
- support_h_function);
-}
-
-static void
-support_c_function(insn_table *table,
- lf *file,
- void *data,
- table_entry *function)
-{
- ASSERT(function->fields[function_type] != NULL);
- print_support_function_name(file,
- function,
- 1/*!is_definition*/);
- table_entry_print_cpp_line_nr(file, function);
- lf_printf(file, "{\n");
- lf_indent(file, +2);
- lf_print__c_code(file, function->annex);
- if (it_is("internal", function->fields[insn_flags])) {
- lf_printf(file, "error(\"Internal function must longjump\\n\");\n");
- lf_printf(file, "return 0;\n");
- }
- lf_indent(file, -2);
- lf_printf(file, "}\n");
- lf_print__internal_reference(file);
- lf_printf(file, "\n");
-}
-
-
-void
-gen_support_c(insn_table *table,
- lf *file)
-{
- lf_printf(file, "#include \"cpu.h\"\n");
- lf_printf(file, "#include \"idecode.h\"\n");
- lf_printf(file, "#include \"support.h\"\n");
- lf_printf(file, "\n");
-
- /* output a definition (c-code) for all functions */
- insn_table_traverse_function(table,
- file, NULL,
- support_c_function);
-}