Separate r5900 specifoc and mips16 instructions.
Add support for this to configure (vr5400 target only)
This commit is contained in:
parent
90ad43b2de
commit
16bd5d6e52
9 changed files with 2770 additions and 5179 deletions
|
@ -17,6 +17,20 @@
|
||||||
|
|
||||||
Do-first:
|
Do-first:
|
||||||
|
|
||||||
|
r5900_files="r5900.igen"
|
||||||
|
if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
|
||||||
|
keep_these_too="${r5900_files} ${keep_these_too}"
|
||||||
|
else
|
||||||
|
lose_these_too="${r5900_files} ${lose_these_too}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
vr5400_files="vr5400.igen"
|
||||||
|
if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
|
||||||
|
keep_these_too="${vr5400_files} ${keep_these_too}"
|
||||||
|
else
|
||||||
|
lose_these_too="${vr5400_files} ${lose_these_too}"
|
||||||
|
fi
|
||||||
|
|
||||||
# All files listed between the "Things-to-keep:" line and the
|
# All files listed between the "Things-to-keep:" line and the
|
||||||
# "Files-to-sed:" line will be kept. All other files will be removed.
|
# "Files-to-sed:" line will be kept. All other files will be removed.
|
||||||
# Directories listed in this section will have their own Sanitize
|
# Directories listed in this section will have their own Sanitize
|
||||||
|
@ -37,6 +51,7 @@ sim-main.h
|
||||||
support.h
|
support.h
|
||||||
tconfig.in
|
tconfig.in
|
||||||
mips.igen
|
mips.igen
|
||||||
|
m16.igen
|
||||||
mips.dc
|
mips.dc
|
||||||
|
|
||||||
Things-to-lose:
|
Things-to-lose:
|
||||||
|
@ -44,7 +59,7 @@ Things-to-lose:
|
||||||
|
|
||||||
Do-last:
|
Do-last:
|
||||||
|
|
||||||
r5900_files="ChangeLog configure configure.in interp.c gencode.c mips.igen mips.dc"
|
r5900_files="ChangeLog configure configure.in interp.c gencode.c mips.igen mips.dc m16.igen r5900.igen"
|
||||||
|
|
||||||
if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
|
if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
|
||||||
for i in $r5900_files ; do
|
for i in $r5900_files ; do
|
||||||
|
@ -74,7 +89,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
tx19_files="ChangeLog configure configure.in interp.c gencode.c mips.igen mips.dc"
|
tx19_files="ChangeLog configure configure.in interp.c gencode.c mips.igen mips.dc m16.igen"
|
||||||
|
|
||||||
if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
|
if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
|
||||||
for i in $tx19_files ; do
|
for i in $tx19_files ; do
|
||||||
|
@ -104,7 +119,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
vr5400_files="ChangeLog configure configure.in interp.c gencode.c mips.igen mips.dc"
|
vr5400_files="ChangeLog configure configure.in interp.c gencode.c mips.igen mips.dc m16.igen vr5400.igen"
|
||||||
|
|
||||||
if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
|
if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
|
||||||
for i in $vr5400_files ; do
|
for i in $vr5400_files ; do
|
||||||
|
|
|
@ -1,3 +1,26 @@
|
||||||
|
Mon Oct 27 17:53:59 1997 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
|
* Makefile.in (SIM_NO_CFLAGS): Define. Define WITH_IGEN=0.
|
||||||
|
|
||||||
|
interp.c (sim_engine_run): Do not compile function sim_engine_run
|
||||||
|
when WITH_IGEN == 1.
|
||||||
|
|
||||||
|
* configure.in (sim_igen_flags, sim_m16_flags): Set according to
|
||||||
|
target architecture.
|
||||||
|
|
||||||
|
Makefile.in (tmp-igen, tmp-m16): Drop -F and -M options to
|
||||||
|
igen. Replace with configuration variables sim_igen_flags /
|
||||||
|
sim_m16_flags.
|
||||||
|
|
||||||
|
end-sanitize-v5900
|
||||||
|
* r5900.igen: New file. Copy v5900 insns here.
|
||||||
|
start-sanitize-r5900
|
||||||
|
end-sanitize-v5400
|
||||||
|
* vr5400.igen: New file.
|
||||||
|
start-sanitize-vr5400
|
||||||
|
* m16.igen: New file. Copy mips16 insns here.
|
||||||
|
* mips.igen: From here.
|
||||||
|
|
||||||
Mon Oct 27 13:53:59 1997 Andrew Cagney <cagney@b1.cygnus.com>
|
Mon Oct 27 13:53:59 1997 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
start-sanitize-vr5400
|
start-sanitize-vr5400
|
||||||
|
|
|
@ -54,6 +54,10 @@ SIM_OBJS = \
|
||||||
# List of flags to always pass to $(CC).
|
# List of flags to always pass to $(CC).
|
||||||
SIM_SUBTARGET=@SIM_SUBTARGET@
|
SIM_SUBTARGET=@SIM_SUBTARGET@
|
||||||
|
|
||||||
|
SIM_NO_CFLAGS = -DWITH_IGEN=0
|
||||||
|
SIM_IGEN_CFLAGS = -DWITH_IGEN=1
|
||||||
|
SIM_M16_CFLAGS = -DWITH_IGEN=1
|
||||||
|
|
||||||
# FIXME: Hack to find syscall.h? Better support for syscall.h
|
# FIXME: Hack to find syscall.h? Better support for syscall.h
|
||||||
# is in progress.
|
# is in progress.
|
||||||
SIM_EXTRA_CFLAGS = \
|
SIM_EXTRA_CFLAGS = \
|
||||||
|
@ -98,7 +102,6 @@ IGEN_INSN=$(srcdir)/mips.igen
|
||||||
IGEN_DC=$(srcdir)/mips.dc
|
IGEN_DC=$(srcdir)/mips.dc
|
||||||
|
|
||||||
|
|
||||||
SIM_IGEN_CFLAGS = -DWITH_IGEN
|
|
||||||
SIM_IGEN_ALL = tmp-igen
|
SIM_IGEN_ALL = tmp-igen
|
||||||
|
|
||||||
BUILT_SRC_FROM_IGEN = \
|
BUILT_SRC_FROM_IGEN = \
|
||||||
|
@ -132,8 +135,7 @@ tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
|
||||||
-I $(srcdir) \
|
-I $(srcdir) \
|
||||||
-Werror \
|
-Werror \
|
||||||
-Wnodiscard \
|
-Wnodiscard \
|
||||||
-F 32,64,f \
|
@sim_igen_flags@ \
|
||||||
-M mipsIV \
|
|
||||||
-G gen-direct-access \
|
-G gen-direct-access \
|
||||||
-i $(IGEN_INSN) \
|
-i $(IGEN_INSN) \
|
||||||
-o $(IGEN_DC) \
|
-o $(IGEN_DC) \
|
||||||
|
@ -172,7 +174,6 @@ tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SIM_M16_CFLAGS = -DWITH_IGEN
|
|
||||||
SIM_M16_ALL = tmp-igen $(SIM_M16_ALL)
|
SIM_M16_ALL = tmp-igen $(SIM_M16_ALL)
|
||||||
|
|
||||||
BUILT_SRC_FROM_M16 = \
|
BUILT_SRC_FROM_M16 = \
|
||||||
|
|
38
sim/mips/configure
vendored
38
sim/mips/configure
vendored
|
@ -1772,15 +1772,25 @@ fi
|
||||||
# Select the sim generator & architecture
|
# Select the sim generator & architecture
|
||||||
#
|
#
|
||||||
sim_gen=NO
|
sim_gen=NO
|
||||||
|
sim_igen_flags="-F 32,64,f -M mipsIV"
|
||||||
|
sim_m16_flags="-F 16 -M mips16"
|
||||||
|
|
||||||
case "${target}" in
|
case "${target}" in
|
||||||
# start-sanitize-tx19
|
# start-sanitize-tx19
|
||||||
mipstx19*-*-*) sim_gen=M16 ;;
|
# mipstx19*-*-*) sim_gen=M16
|
||||||
|
# sim_igen_flags="-F 32,64,f -M tx19"
|
||||||
|
# sim_m16_flags="-F 16 -M tx19"
|
||||||
|
# ;;
|
||||||
# end-sanitize-tx19
|
# end-sanitize-tx19
|
||||||
# start-sanitize-r5900
|
# start-sanitize-r5900
|
||||||
# mips64r59*-*-*) sim_gen=IGEN ;;
|
# mips64r59*-*-*) sim_gen=IGEN
|
||||||
|
# sim_igen_flags="-F 32,64,f -M r5900"
|
||||||
|
# ;;
|
||||||
# end-sanitize-r5900
|
# end-sanitize-r5900
|
||||||
# start-sanitize-vr5400
|
# start-sanitize-vr5400
|
||||||
mips64vr54*-*-*) sim_gen=IGEN ;;
|
mips64vr54*-*-*) sim_gen=IGEN
|
||||||
|
sim_igen_flags="-F 32,64,f -M vr5400"
|
||||||
|
;;
|
||||||
# end-sanitize-vr5400
|
# end-sanitize-vr5400
|
||||||
# mips16*-*-*) sim_gen=M16 ;;
|
# mips16*-*-*) sim_gen=M16 ;;
|
||||||
*) sim_gen=NO ;;
|
*) sim_gen=NO ;;
|
||||||
|
@ -1788,21 +1798,23 @@ esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for ac_hdr in string.h strings.h stdlib.h stdlib.h
|
for ac_hdr in string.h strings.h stdlib.h stdlib.h
|
||||||
do
|
do
|
||||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||||
echo "configure:1796: checking for $ac_hdr" >&5
|
echo "configure:1808: checking for $ac_hdr" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1801 "configure"
|
#line 1813 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <$ac_hdr>
|
#include <$ac_hdr>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:1806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:1818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out`
|
ac_err=`grep -v '^ *+' conftest.out`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
|
@ -1829,7 +1841,7 @@ fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6
|
echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6
|
||||||
echo "configure:1833: checking for fabs in -lm" >&5
|
echo "configure:1845: checking for fabs in -lm" >&5
|
||||||
ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
@ -1837,7 +1849,7 @@ else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lm $LIBS"
|
LIBS="-lm $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1841 "configure"
|
#line 1853 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
@ -1848,7 +1860,7 @@ int main() {
|
||||||
fabs()
|
fabs()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:1864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -1878,12 +1890,12 @@ fi
|
||||||
for ac_func in aint anint sqrt
|
for ac_func in aint anint sqrt
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:1882: checking for $ac_func" >&5
|
echo "configure:1894: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1887 "configure"
|
#line 1899 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
|
@ -1906,7 +1918,7 @@ $ac_func();
|
||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:1922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
|
@ -2113,6 +2125,8 @@ s%@sim_profile@%$sim_profile%g
|
||||||
s%@SIMCONF@%$SIMCONF%g
|
s%@SIMCONF@%$SIMCONF%g
|
||||||
s%@SIM_SUBTARGET@%$SIM_SUBTARGET%g
|
s%@SIM_SUBTARGET@%$SIM_SUBTARGET%g
|
||||||
s%@sim_gen@%$sim_gen%g
|
s%@sim_gen@%$sim_gen%g
|
||||||
|
s%@sim_igen_flags@%$sim_igen_flags%g
|
||||||
|
s%@sim_m16_flags@%$sim_m16_flags%g
|
||||||
|
|
||||||
CEOF
|
CEOF
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -95,20 +95,32 @@ SIM_AC_OPTION_FLOAT($mips_fpu)
|
||||||
# Select the sim generator & architecture
|
# Select the sim generator & architecture
|
||||||
#
|
#
|
||||||
sim_gen=NO
|
sim_gen=NO
|
||||||
|
sim_igen_flags="-F 32,64,f -M mipsIV"
|
||||||
|
sim_m16_flags="-F 16 -M mips16"
|
||||||
|
|
||||||
case "${target}" in
|
case "${target}" in
|
||||||
# start-sanitize-tx19
|
# start-sanitize-tx19
|
||||||
mipstx19*-*-*) sim_gen=M16 ;;
|
# mipstx19*-*-*) sim_gen=M16
|
||||||
|
# sim_igen_flags="-F 32,64,f -M tx19"
|
||||||
|
# sim_m16_flags="-F 16 -M tx19"
|
||||||
|
# ;;
|
||||||
# end-sanitize-tx19
|
# end-sanitize-tx19
|
||||||
# start-sanitize-r5900
|
# start-sanitize-r5900
|
||||||
# mips64r59*-*-*) sim_gen=IGEN ;;
|
# mips64r59*-*-*) sim_gen=IGEN
|
||||||
|
# sim_igen_flags="-F 32,64,f -M r5900"
|
||||||
|
# ;;
|
||||||
# end-sanitize-r5900
|
# end-sanitize-r5900
|
||||||
# start-sanitize-vr5400
|
# start-sanitize-vr5400
|
||||||
mips64vr54*-*-*) sim_gen=IGEN ;;
|
mips64vr54*-*-*) sim_gen=IGEN
|
||||||
|
sim_igen_flags="-F 32,64,f -M vr5400"
|
||||||
|
;;
|
||||||
# end-sanitize-vr5400
|
# end-sanitize-vr5400
|
||||||
# mips16*-*-*) sim_gen=M16 ;;
|
# mips16*-*-*) sim_gen=M16 ;;
|
||||||
*) sim_gen=NO ;;
|
*) sim_gen=NO ;;
|
||||||
esac
|
esac
|
||||||
AC_SUBST(sim_gen)
|
AC_SUBST(sim_gen)
|
||||||
|
AC_SUBST(sim_igen_flags)
|
||||||
|
AC_SUBST(sim_m16_flags)
|
||||||
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS(string.h strings.h stdlib.h stdlib.h)
|
AC_CHECK_HEADERS(string.h strings.h stdlib.h stdlib.h)
|
||||||
|
|
|
@ -3557,7 +3557,13 @@ decode_coproc(sd,instruction)
|
||||||
|
|
||||||
/*-- instruction simulation -------------------------------------------------*/
|
/*-- instruction simulation -------------------------------------------------*/
|
||||||
|
|
||||||
#if defined (WITH_IGEN)
|
/* When the IGEN simulator is being built, the function below is be
|
||||||
|
replaced by a generated version. However, WITH_IGEN == 2 indicates
|
||||||
|
that the fubction below should be compiled but under a different
|
||||||
|
name (to allow backward compatibility) */
|
||||||
|
|
||||||
|
#if (WITH_IGEN != 1)
|
||||||
|
#if (WITH_IGEN > 1)
|
||||||
void old_engine_run PARAMS ((SIM_DESC sd, int next_cpu_nr, int siggnal));
|
void old_engine_run PARAMS ((SIM_DESC sd, int next_cpu_nr, int siggnal));
|
||||||
void
|
void
|
||||||
old_engine_run (sd, next_cpu_nr, siggnal)
|
old_engine_run (sd, next_cpu_nr, siggnal)
|
||||||
|
@ -3838,6 +3844,8 @@ sim_engine_run (sd, next_cpu_nr, siggnal)
|
||||||
#endif /* FASTSIM */
|
#endif /* FASTSIM */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* This code copied from gdb's utils.c. Would like to share this code,
|
/* This code copied from gdb's utils.c. Would like to share this code,
|
||||||
but don't know of a common place where both could get to it. */
|
but don't know of a common place where both could get to it. */
|
||||||
|
|
2668
sim/mips/m16.igen
Normal file
2668
sim/mips/m16.igen
Normal file
File diff suppressed because it is too large
Load diff
5161
sim/mips/mips.igen
5161
sim/mips/mips.igen
File diff suppressed because it is too large
Load diff
1
sim/mips/vr5400.igen
Normal file
1
sim/mips/vr5400.igen
Normal file
|
@ -0,0 +1 @@
|
||||||
|
// Empty
|
Loading…
Reference in a new issue