mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-24 03:23:16 +00:00
gencode.c: Kill, Kill, Kill....
Remove last remenats of old gencode simulator.
This commit is contained in:
parent
57791952b6
commit
554eb429e4
@ -1,74 +0,0 @@
|
|||||||
This directory contains two very different simulators:
|
|
||||||
|
|
||||||
o gencode (old)
|
|
||||||
|
|
||||||
Gencode.c outputs a single monolithic file that is
|
|
||||||
#included by interp.c
|
|
||||||
|
|
||||||
o igen (new)
|
|
||||||
|
|
||||||
The *.igen files are used as inputs to ../igen/igen.
|
|
||||||
A number of separate, fairly modula files, are created.
|
|
||||||
|
|
||||||
The new simulator has a number of advantages:
|
|
||||||
|
|
||||||
o builtin support for multi-simming (single simulator
|
|
||||||
image supporting a number of different instruction
|
|
||||||
set architectures).
|
|
||||||
|
|
||||||
o Easier maintenance. The input files are not confused
|
|
||||||
by an intermixing with the generator code.
|
|
||||||
|
|
||||||
gencode continues to exist so that old architectures can be emulated.
|
|
||||||
*.igen should be used when adding new architectures or adding
|
|
||||||
instructions to an existing ISA.
|
|
||||||
|
|
||||||
Known bugs?
|
|
||||||
|
|
||||||
In mips.igen, the semantics for many of the instructions were created
|
|
||||||
using code generated by gencode. Those semantic segments could be
|
|
||||||
greatly simplified.
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Old README.Cygnus ...
|
|
||||||
|
|
||||||
> README.Cygnus
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
The following are the main reasons for constructing the simulator as a
|
|
||||||
generator:
|
|
||||||
|
|
||||||
1) Avoid large fixed decode source file, with lots of #ifs controlling
|
|
||||||
the compilation. i.e. keep the source cleaner, smaller and easier
|
|
||||||
to parse.
|
|
||||||
|
|
||||||
2) Allow optimum code to be created, without run-time checks on
|
|
||||||
instruction types. Ensure that the simulator engine only includes
|
|
||||||
code for the architecture being targetted. e.g. This avoids
|
|
||||||
run-time checks on ISA conformance, aswell as increasing
|
|
||||||
throughput.
|
|
||||||
|
|
||||||
3) Allow updates to the instruction sets to be added quickly. Having a
|
|
||||||
table means that the information is together, and is easier to
|
|
||||||
manipulate. Having the table generate the engine, rather than the
|
|
||||||
run-time parse the table gives higher performance at simulation
|
|
||||||
time.
|
|
||||||
|
|
||||||
4) Keep all the similar simulation code together. i.e. have a single
|
|
||||||
place where, for example, the addition code is held. This ensures that
|
|
||||||
updates to the simulation are not spread over a large flat source
|
|
||||||
file maintained by the developer.
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
To keep the simulator simple (and to avoid the slight chance of
|
|
||||||
mis-matched files) the manifests describing an engine, and the
|
|
||||||
simulator engine itself, are held in the same source file.
|
|
||||||
|
|
||||||
This means that the engine must be included twice, with the first pass
|
|
||||||
controlled by the SIM_MANIFESTS definition.
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
> EOF README.Cygnus
|
|
@ -11,25 +11,6 @@ SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
|
|||||||
SIM_AC_OPTION_HOSTENDIAN
|
SIM_AC_OPTION_HOSTENDIAN
|
||||||
SIM_AC_OPTION_WARNINGS
|
SIM_AC_OPTION_WARNINGS
|
||||||
|
|
||||||
# Ensure a reasonable default simulator is constructed: (DEPRECATED)
|
|
||||||
case "${target}" in
|
|
||||||
# start-sanitize-tx19
|
|
||||||
mips*tx19*) SIMCONF="-mips1 -mcpu=r1900 -mno-fp --warnings";;
|
|
||||||
# end-sanitize-tx19
|
|
||||||
# start-sanitize-tx49
|
|
||||||
mips*tx49*) SIMCONF="-mips3 --warnings -mcpu=r4900";;
|
|
||||||
# end-sanitize-tx49
|
|
||||||
# start-sanitize-r5900
|
|
||||||
mips64r59*-*-*) SIMCONF="-mips3 --warnings -mcpu=r5900";;
|
|
||||||
# end-sanitize-r5900
|
|
||||||
mips64vr41*) SIMCOMF="-mips0 -mcpu=r4100 -mgp64 --warnings" ;;
|
|
||||||
mips64*-*-*) SIMCONF="-mips0 --warnings";;
|
|
||||||
mips16*-*-*) SIMCONF="-mips0 --warnings";;
|
|
||||||
mips*-*-*) SIMCONF="-mips2 --warnings";;
|
|
||||||
*) SIMCONF="-mips0 --warnings";;
|
|
||||||
esac
|
|
||||||
AC_SUBST(SIMCONF)
|
|
||||||
|
|
||||||
# DEPRECATED
|
# DEPRECATED
|
||||||
#
|
#
|
||||||
# Instead of defining a `subtarget' macro, code should be checking
|
# Instead of defining a `subtarget' macro, code should be checking
|
||||||
@ -135,107 +116,78 @@ SIM_AC_OPTION_SMP($mips_smp)
|
|||||||
#
|
#
|
||||||
# Select the IGEN architecture
|
# Select the IGEN architecture
|
||||||
#
|
#
|
||||||
sim_use_gen=IGEN
|
sim_gen=IGEN
|
||||||
sim_igen_machine="-M mipsIV"
|
sim_igen_machine="-M mipsIV"
|
||||||
sim_m16_machine="-M mips16"
|
sim_m16_machine="-M mips16"
|
||||||
sim_igen_filter="32,64,f"
|
sim_igen_filter="32,64,f"
|
||||||
sim_m16_filter="16"
|
sim_m16_filter="16"
|
||||||
case "${target}" in
|
case "${target}" in
|
||||||
# start-sanitize-tx19
|
# start-sanitize-tx19
|
||||||
mips*tx19*) sim_default_gen=M16
|
mips*tx19*) sim_gen=M16
|
||||||
sim_use_gen=M16
|
|
||||||
sim_igen_machine="-M tx19"
|
sim_igen_machine="-M tx19"
|
||||||
sim_m16_machine="-M tx19"
|
sim_m16_machine="-M tx19"
|
||||||
sim_igen_filter="32"
|
sim_igen_filter="32"
|
||||||
sim_m16_filter="16"
|
sim_m16_filter="16"
|
||||||
;;
|
;;
|
||||||
# end-sanitize-tx19
|
# end-sanitize-tx19
|
||||||
mips*tx39*) sim_default_gen=IGEN
|
mips*tx39*) sim_gen=IGEN
|
||||||
sim_use_gen=IGEN
|
|
||||||
sim_igen_filter="32,f"
|
sim_igen_filter="32,f"
|
||||||
sim_igen_machine="-M r3900"
|
sim_igen_machine="-M r3900"
|
||||||
;;
|
;;
|
||||||
# start-sanitize-r5900
|
# start-sanitize-r5900
|
||||||
mips64r59*-*-*) sim_default_gen=IGEN
|
mips64r59*-*-*) sim_gen=IGEN
|
||||||
sim_use_gen=IGEN
|
|
||||||
sim_igen_machine="-M r5900"
|
sim_igen_machine="-M r5900"
|
||||||
;;
|
;;
|
||||||
# end-sanitize-r5900
|
# end-sanitize-r5900
|
||||||
# start-sanitize-vr4320
|
# start-sanitize-vr4320
|
||||||
mips64vr4320-*-*) sim_default_gen=IGEN
|
mips64vr4320-*-*) sim_gen=IGEN
|
||||||
sim_use_gen=IGEN
|
|
||||||
sim_igen_machine="-M mipsIV,vr4320 -G gen-multi-sim=vr4320"
|
sim_igen_machine="-M mipsIV,vr4320 -G gen-multi-sim=vr4320"
|
||||||
;;
|
;;
|
||||||
# end-sanitize-vr4320
|
# end-sanitize-vr4320
|
||||||
mips64vr43*-*-*) sim_default_gen=IGEN
|
mips64vr43*-*-*) sim_gen=IGEN
|
||||||
sim_use_gen=IGEN
|
|
||||||
sim_igen_machine="-M mipsIV"
|
sim_igen_machine="-M mipsIV"
|
||||||
# start-sanitize-vr4320
|
# start-sanitize-vr4320
|
||||||
sim_igen_machine="-M mipsIV,vr4320 -G gen-multi-sim=mipsIV"
|
sim_igen_machine="-M mipsIV,vr4320 -G gen-multi-sim=mipsIV"
|
||||||
# end-sanitize-vr4320
|
# end-sanitize-vr4320
|
||||||
;;
|
;;
|
||||||
# start-sanitize-cygnus
|
# start-sanitize-cygnus
|
||||||
mips64vr54*-*-*) sim_default_gen=IGEN
|
mips64vr54*-*-*) sim_gen=IGEN
|
||||||
sim_use_gen=IGEN
|
|
||||||
sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5400"
|
sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5400"
|
||||||
;;
|
;;
|
||||||
# end-sanitize-cygnus
|
# end-sanitize-cygnus
|
||||||
mips64vr5*-*-*) sim_default_gen=IGEN
|
mips64vr5*-*-*) sim_gen=IGEN
|
||||||
sim_use_gen=IGEN
|
|
||||||
sim_igen_machine="-M vr5000"
|
sim_igen_machine="-M vr5000"
|
||||||
# start-sanitize-cygnus
|
# start-sanitize-cygnus
|
||||||
sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5000"
|
sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5000"
|
||||||
;;
|
;;
|
||||||
# end-sanitize-cygnus
|
# end-sanitize-cygnus
|
||||||
mips64vr41*) sim_default_gen=M16
|
mips64vr41*) sim_gen=M16
|
||||||
sim_use_gen=M16
|
|
||||||
sim_igen_machine="-M vr4100,mips16"
|
sim_igen_machine="-M vr4100,mips16"
|
||||||
sim_m16_machine="-M vr4100,mips16"
|
sim_m16_machine="-M vr4100,mips16"
|
||||||
sim_igen_filter="32,64,f"
|
sim_igen_filter="32,64,f"
|
||||||
sim_m16_filter="16"
|
sim_m16_filter="16"
|
||||||
;;
|
;;
|
||||||
mips64*-*-*) sim_default_gen=IGEN
|
mips64*-*-*) sim_igen_filter="32,64,f"
|
||||||
sim_igen_filter="32,64,f"
|
sim_gen=IGEN
|
||||||
sim_use_gen=IGEN
|
|
||||||
;;
|
;;
|
||||||
mips16*-*-*) sim_default_gen=M16
|
mips16*-*-*) sim_gen=M16
|
||||||
sim_igen_filter="32,64,f"
|
sim_igen_filter="32,64,f"
|
||||||
sim_m16_filter="16"
|
sim_m16_filter="16"
|
||||||
sim_use_gen=NO
|
|
||||||
;;
|
;;
|
||||||
mips*lsi*) sim_default_gen=M16
|
mips*lsi*) sim_gen=M16
|
||||||
sim_use_gen=M16
|
|
||||||
sim_igen_machine="-M mipsIII,mips16"
|
sim_igen_machine="-M mipsIII,mips16"
|
||||||
sim_m16_machine="-M mips16,mipsIII"
|
sim_m16_machine="-M mips16,mipsIII"
|
||||||
sim_igen_filter="32,f"
|
sim_igen_filter="32,f"
|
||||||
sim_m16_filter="16"
|
sim_m16_filter="16"
|
||||||
;;
|
;;
|
||||||
mips*-*-*) sim_default_gen=IGEN
|
mips*-*-*) sim_gen=IGEN
|
||||||
sim_igen_filter="32,f"
|
sim_igen_filter="32,f"
|
||||||
sim_use_gen=IGEN
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
sim_igen_flags="-F ${sim_igen_filter} ${sim_igen_machine} ${sim_igen_smp}"
|
sim_igen_flags="-F ${sim_igen_filter} ${sim_igen_machine} ${sim_igen_smp}"
|
||||||
sim_m16_flags=" -F ${sim_m16_filter} ${sim_m16_machine} ${sim_igen_smp}"
|
sim_m16_flags=" -F ${sim_m16_filter} ${sim_m16_machine} ${sim_igen_smp}"
|
||||||
AC_SUBST(sim_igen_flags)
|
AC_SUBST(sim_igen_flags)
|
||||||
AC_SUBST(sim_m16_flags)
|
AC_SUBST(sim_m16_flags)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Enable igen
|
|
||||||
#
|
|
||||||
AC_ARG_ENABLE(sim-igen,
|
|
||||||
[ --enable-sim-igen=opts Enable IGEN simulator],
|
|
||||||
[case "${enableval}" in
|
|
||||||
yes) sim_gen="${sim_default_gen}";;
|
|
||||||
no) sim_gen=NO;;
|
|
||||||
16) sim_gen=M16;;
|
|
||||||
*) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-igen"); sim_gen="";;
|
|
||||||
esac
|
|
||||||
if test x"$silent" != x"yes" && test x"$sim_gen" != x""; then
|
|
||||||
echo "Setting sim_gen = $sim_gen" 6>&1
|
|
||||||
fi],[sim_gen="${sim_use_gen}"])dnl
|
|
||||||
AC_SUBST(sim_gen)
|
AC_SUBST(sim_gen)
|
||||||
|
|
||||||
|
|
||||||
|
4858
sim/mips/gencode.c
4858
sim/mips/gencode.c
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user