From c4db5b04f888efa8b06871eafab17ef5d720a9c7 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 31 Jan 1998 06:56:13 +0000 Subject: [PATCH] mips - for r5900 generate igen simulator. igen - stop crash when simulator isn't multi-sim'ed --- sim/igen/ChangeLog | 7 ++++++- sim/igen/gen-engine.c | 8 ++++++-- sim/mips/ChangeLog | 5 +++++ sim/mips/configure | 19 ++++++++++--------- sim/mips/configure.in | 1 + 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/sim/igen/ChangeLog b/sim/igen/ChangeLog index 7db04dfae2c..d665bdf7ba8 100644 --- a/sim/igen/ChangeLog +++ b/sim/igen/ChangeLog @@ -1,8 +1,13 @@ Sat Jan 31 14:50:27 1998 Andrew Cagney + * gen-engine.c (gen_engine_h): Don't assume a model is present. + (gen_engine_c): Ditto. + + * igen.c (gen_run_c): Ditto. + * gen-engine.c (print_run_body): Use CIA_GET & CIA_SET instead of CPU_CIA. Parameterize with CPU argument. - + Fri Jan 30 09:09:39 1998 Andrew Cagney * gen.h (struct _gen_list): Replace processor with model. diff --git a/sim/igen/gen-engine.c b/sim/igen/gen-engine.c index 5290e739a97..3b83c3fb78b 100644 --- a/sim/igen/gen-engine.c +++ b/sim/igen/gen-engine.c @@ -727,7 +727,9 @@ gen_engine_h (lf *file, for (entry = gen->tables; entry != NULL; entry = entry->next) { print_engine_run_function_header (file, - entry->model->name, + (options.gen.multi_sim + ? entry->model->name + : NULL), is_function_declaration); } } @@ -765,7 +767,9 @@ gen_engine_c(lf *file, /* output the main engine routine */ print_engine_run_function_header (file, - entry->model->name, + (options.gen.multi_sim + ? entry->model->name + : NULL), is_function_definition); print_run_body (file, entry->table); break; diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 3ea98ddb0cf..587a6fb5d48 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,5 +1,10 @@ Sat Jan 31 14:49:24 1998 Andrew Cagney +start-sanitize-r5900 + * configure.in (sim_igen_filter): For r5900, use igen. + * configure: Re-generate. + +end-sanitize-r5900 * interp.c (sim_engine_run): Add `nr_cpus' argument. * mips.igen (model): Map processor names onto BFD name. diff --git a/sim/mips/configure b/sim/mips/configure index 34242e45f83..bbf3d20ac5c 100755 --- a/sim/mips/configure +++ b/sim/mips/configure @@ -1817,6 +1817,7 @@ case "${target}" in # end-sanitize-tx19 # start-sanitize-r5900 mips64r59*-*-*) sim_default_gen=IGEN + sim_use_gen=IGEN sim_igen_machine="-M r5900" ;; # end-sanitize-r5900 @@ -1872,17 +1873,17 @@ for ac_hdr in string.h strings.h stdlib.h stdlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1876: checking for $ac_hdr" >&5 +echo "configure:1877: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1909,7 +1910,7 @@ fi done echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6 -echo "configure:1913: checking for fabs in -lm" >&5 +echo "configure:1914: checking for fabs in -lm" >&5 ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1917,7 +1918,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1958,12 +1959,12 @@ fi for ac_func in aint anint sqrt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1962: checking for $ac_func" >&5 +echo "configure:1963: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff --git a/sim/mips/configure.in b/sim/mips/configure.in index cf6dccc7e09..710dbe72011 100644 --- a/sim/mips/configure.in +++ b/sim/mips/configure.in @@ -116,6 +116,7 @@ case "${target}" in # end-sanitize-tx19 # start-sanitize-r5900 mips64r59*-*-*) sim_default_gen=IGEN + sim_use_gen=IGEN sim_igen_machine="-M r5900" ;; # end-sanitize-r5900 -- 2.30.2