aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/igen.c
diff options
context:
space:
mode:
authorMatthew Green <mrg@redhat.com>2001-12-14 00:22:13 +0000
committerMatthew Green <mrg@redhat.com>2001-12-14 00:22:13 +0000
commitd29d5195ca872bb2de549abd7fe2493764580054 (patch)
tree2616cc709764e96352653e039a5e53665e33511a /sim/ppc/igen.c
parent99339d660eebfbb4d37b1ca11e348fbcc2e41aaf (diff)
downloadfsf-binutils-gdb-d29d5195ca872bb2de549abd7fe2493764580054.zip
fsf-binutils-gdb-d29d5195ca872bb2de549abd7fe2493764580054.tar.gz
fsf-binutils-gdb-d29d5195ca872bb2de549abd7fe2493764580054.tar.bz2
* support sim-fpu.c for correct FP emulation.
* Makefile.in (LIB_OBJ): Add @sim_fpu@. (ICACHE_CFLAGS, SEMANTICS_CFLAGS): New variables. (icache.o, semantics.o): Add new ICACHE_FLAGS & SEMANTICS_FLAGS. (sim-fpu.o, sim-bits.o, tconfig.h): New targets. * configure.in: Rename INLINE_LOCALS to PSIM_INLINE_LOCALS. Add a check for sim/common/sim-fpu.c. Output sim_fpu and sim_fpu_cflags. * configure: Regenerate. * device.h (device_find_integer_array_property): Match function definition. * gen-icache.c (print_icache_internal_function_declaration): Rename INLINE_ICACHE to PSIM_INLINE_ICACHE. * gen-idecode.c (print_idecode_run_function_header): Rename INLINE_IDECODE to PSIM_INLINE_IDECODE. * gen-semantics.c (print_semantic_function_header): Rename EXTERN_SEMANTICS to PSIM_EXTERN_SEMANTICS. * gen-support.c (print_support_function_name): Rename INLINE_SUPPORT to PSIM_INLINE_SUPPORT. * igen.c (print_function_name): Also escape `(' and `)'. (gen_semantics_h): Rename EXTERN_SEMANTICS to PSIM_EXTERN_SEMANTICS. (gen_semantics_c): Likewise. Also output includes for "sim-fpu.h" * inline.h (INLINE_SIM_ENDIAN): Renamed INLINE_PSIM_ENDIAN. (EXTERN_SIM_ENDIAN): Renamed EXTERN_PSIM_ENDIAN. (STATIC_INLINE_SIM_ENDIAN): Renamed STATIC_INLINE_PSIM_ENDIAN. (INLINE_LOCALS): Renamed PSIM_INLINE_LOCALS. (EXTERN_SUPPORT): Renamed PSIM_EXTERN_SUPPORT. (INLINE_SUPPORT): Renamed PSIM_INLINE_SUPPORT. (EXTERN_SEMANTICS): Renamed PSIM_EXTERN_SEMANTICS. (INLINE_SEMANTICS): Renamed PSIM_INLINE_SEMANTICS. (EXTERN_IDECODE): Renamed PSIM_EXTERN_IDECODE. (INLINE_IDECODE): Renamed PSIM_INLINE_IDECODE. (EXTERN_ICACHE): Renamed PSIM_EXTERN_ICACHE. (INLINE_ICACHE): Renamed PSIM_INLINE_ICACHE. * options.c (options_inline): Fix names. * sim-endian-n.h: Change INLINE_SIM_ENDIAN to INLINE_PSIM_ENDIAN. * sim-endian.h: Likewise. * sim-main.h: New file. * std-config.h: Rename INLINE_LOCALS to PSIM_INLINE_LOCALS.
Diffstat (limited to 'sim/ppc/igen.c')
-rw-r--r--sim/ppc/igen.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sim/ppc/igen.c b/sim/ppc/igen.c
index 94dcf51..ae81142 100644
--- a/sim/ppc/igen.c
+++ b/sim/ppc/igen.c
@@ -107,6 +107,8 @@ print_function_name(lf *file,
switch (*pos) {
case '/':
case '-':
+ case '(':
+ case ')':
break;
case ' ':
nr += lf_putchr(file, '_');
@@ -184,7 +186,7 @@ gen_semantics_h(insn_table *table,
lf_printf(file, "extern int option_mpc860c0;\n");
lf_printf(file, "#define PAGE_SIZE 0x1000\n");
lf_printf(file, "\n");
- lf_printf(file, "EXTERN_SEMANTICS(void)\n");
+ lf_printf(file, "PSIM_EXTERN_SEMANTICS(void)\n");
lf_printf(file, "semantic_init(device* root);\n");
lf_printf(file, "\n");
if (generate_expanded_instructions)
@@ -219,10 +221,12 @@ gen_semantics_c(insn_table *table,
lf_printf(file, "#include \"idecode.h\"\n");
lf_printf(file, "#include \"semantics.h\"\n");
lf_printf(file, "#include \"support.h\"\n");
+ lf_printf(file, "#include \"sim-inline.h\"\n");
+ lf_printf(file, "#include \"sim-fpu.h\"\n");
lf_printf(file, "\n");
lf_printf(file, "int option_mpc860c0 = 0;\n");
lf_printf(file, "\n");
- lf_printf(file, "EXTERN_SEMANTICS(void)\n");
+ lf_printf(file, "PSIM_EXTERN_SEMANTICS(void)\n");
lf_printf(file, "semantic_init(device* root)\n");
lf_printf(file, "{\n");
lf_printf(file, " option_mpc860c0 = 0;\n");
@@ -303,6 +307,8 @@ gen_icache_c(insn_table *table,
lf_printf(file, "#include \"semantics.h\"\n");
lf_printf(file, "#include \"icache.h\"\n");
lf_printf(file, "#include \"support.h\"\n");
+ lf_printf(file, "#include \"sim-inline.h\"\n");
+ lf_printf(file, "#include \"sim-fpu.h\"\n");
lf_printf(file, "\n");
insn_table_traverse_function(table,
file, NULL,