diff options
author | Andrew Cagney <cagney@redhat.com> | 1998-01-31 06:23:41 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1998-01-31 06:23:41 +0000 |
commit | 9ec6741b177fbd4d872a13002d540b60b11e4b78 (patch) | |
tree | 882348d86144658f9148f517f17c39dabe54df1e /sim/igen/gen-support.c | |
parent | 5266a484f4aa49a9ea52adbca949f6224ec2fcee (diff) | |
download | fsf-binutils-gdb-9ec6741b177fbd4d872a13002d540b60b11e4b78.zip fsf-binutils-gdb-9ec6741b177fbd4d872a13002d540b60b11e4b78.tar.gz fsf-binutils-gdb-9ec6741b177fbd4d872a13002d540b60b11e4b78.tar.bz2 |
igen: Fix SMP simulator generator support.
Use the bfd-processor name in the sim-engine switch.
Add nr_cpus argument to sim_engine_run.
tic80, v850, d30v, mips, common:
Update
mips: Fill in bfd-processor field of model records so that
they match ../bfd/archures.
Diffstat (limited to 'sim/igen/gen-support.c')
-rw-r--r-- | sim/igen/gen-support.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sim/igen/gen-support.c b/sim/igen/gen-support.c index bd8f34b..77f8eb4 100644 --- a/sim/igen/gen-support.c +++ b/sim/igen/gen-support.c @@ -110,19 +110,31 @@ extern void gen_support_h (lf *file, insn_table *table) { - /* output the definition of `_SD'*/ + /* output the definition of `SD_'*/ if (options.gen.smp) { - lf_printf(file, "#define _SD cpu, cia, MY_INDEX\n"); + lf_printf(file, "#define _SD cpu, cia, MY_INDEX /* depreciated */\n"); + lf_printf(file, "#define SD_ cpu, cia, MY_INDEX\n"); lf_printf(file, "#define SD CPU_STATE (cpu)\n"); lf_printf(file, "#define CPU cpu\n"); } else { - lf_printf(file, "#define _SD sd, cia, MY_INDEX\n"); + lf_printf(file, "#define _SD sd, cia, MY_INDEX /* depreciated */\n"); + lf_printf(file, "#define SD_ sd, cia, MY_INDEX\n"); lf_printf(file, "#define SD sd\n"); lf_printf(file, "#define CPU (STATE_CPU (sd, 0))\n"); } + if (options.gen.delayed_branch) + { + lf_printf(file, "#define CIA cia.ip\n"); + lf_printf(file, "/* #define NIA nia.dp -- do not define, ambigious */\n"); + } + else + { + lf_printf(file, "#define CIA cia\n"); + lf_printf(file, "#define NIA nia\n"); + } lf_printf(file, "\n"); /* output a declaration for all functions */ function_entry_traverse (file, table->functions, @@ -155,7 +167,7 @@ support_c_function (lf *file, table_print_code (file, function->code); if (function->is_internal) { - lf_printf (file, "sim_io_error (sd, \"Internal function must longjump\\n\");\n"); + lf_printf (file, "sim_engine_abort (SD, CPU, cia, \"Internal function must longjump\\n\");\n"); lf_printf (file, "return cia;\n"); } lf_indent (file, -2); |