darling-gdb/sim/mips/configure.in
Frank Ch. Eigler 3fa454e95f * Monster patch - may destablize MIPS sims for a little while.
* Followup patch for SCEI PR 15853
* First check-in of TX3904 interrupt controller devices for ECC. [sanitized]
* First implementation of MIPS hardware interrupt emulation.
Mon May 18 18:22:42 1998  Frank Ch. Eigler  <fche@cygnus.com>
	* configure.in (SIM_AC_OPTION_HARDWARE): Added common hardware
 	modules.  Recognize TX39 target with "mips*tx39" pattern.
	* configure: Rebuilt.
	* sim-main.h (*): Added many macros defining bits in
 	TX39 control registers.
	(SignalInterrupt): Send actual PC instead of NULL.
	(SignalNMIReset): New exception type.
	* interp.c (board): New variable for future use to identify
	a particular board being simulated.
	(mips_option_handler,mips_options): Added "--board" option.
	(interrupt_event): Send actual PC.
	(sim_open): Make memory layout conditional on board setting.
	(signal_exception): Initial implementation of hardware interrupt
 	handling.  Accept another break instruction variant for simulator
 	exit.
	(decode_coproc): Implement RFE instruction for TX39.
	(mips.igen): Decode RFE instruction as such.
start-sanitize-tx3904
	* configure.in (tx3904cpu,tx3904irc): Added devices for tx3904.
	* interp.c: Define "jmr3904" and "jmr3904debug" board types and
	bbegin to implement memory map.
	* dv-tx3904cpu.c: New file.
	* dv-tx3904irc.c: New file.
end-sanitize-tx3904
1998-05-18 15:55:05 +00:00

284 lines
7.4 KiB
Plaintext

dnl Process this file with autoconf to produce a configure script.
sinclude(../common/aclocal.m4)
AC_PREREQ(2.5)dnl
AC_INIT(Makefile.in)
SIM_AC_COMMON
dnl Options available in this module
SIM_AC_OPTION_INLINE()
SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
SIM_AC_OPTION_HOSTENDIAN
SIM_AC_OPTION_WARNINGS
# Ensure a reasonable default simulator is constructed: (DEPRECATED)
case "${target}" in
# start-sanitize-tx19
mipstx19*-*-*) SIMCONF="-mips1 -mcpu=r1900 -mno-fp --warnings";;
# end-sanitize-tx19
# start-sanitize-tx49
mips64tx49*-*-*) SIMCONF="-mips3 --warnings -mcpu=r4900";;
# end-sanitize-tx49
# start-sanitize-r5900
mips64r59*-*-*) SIMCONF="-mips3 --warnings -mcpu=r5900";;
# end-sanitize-r5900
mips64vr4100-*-*) 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
#
# Instead of defining a `subtarget' macro, code should be checking
# the value of {STATE,CPU}_ARCHITECTURE to identify the architecture
# in question.
#
case "${target}" in
# start-sanitize-tx19
mipstx19*-*-*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";;
# end-sanitize-tx19
mips*tx39*) SIM_SUBTARGET="-DSUBTARGET_R3900=1";;
*) SIM_SUBTARGET="";;
esac
AC_SUBST(SIM_SUBTARGET)
#
# Select the byte order of the target
#
mips_endian=
default_endian=
case "${target}" in
# start-sanitize-tx19
mipstx19*-*-*) default_endian=BIG_ENDIAN ;;
# end-sanitize-tx19
# start-sanitize-r5900
mips64r59*-*-*) mips_endian=LITTLE_ENDIAN ;;
# end-sanitize-r5900
mips64*-*-*) default_endian=BIG_ENDIAN ;;
mips16*-*-*) default_endian=BIG_ENDIAN ;;
mips*-*-*) default_endian=BIG_ENDIAN ;;
*) default_endian=BIG_ENDIAN ;;
esac
SIM_AC_OPTION_ENDIAN($mips_endian,$default_endian)
#
# Select the bitsize of the target
#
mips_addr_bitsize=
case "${target}" in
# start-sanitize-tx19
mipstx19*-*-*) mips_bitsize=32 ; mips_msb=31 ;;
# end-sanitize-tx19
# start-sanitize-r5900
mips64r59*-*-*) mips_bitsize=64 ; mips_msb=63 ; mips_addr_bitsize=32;;
# end-sanitize-r5900
mips64*-*-*) mips_bitsize=64 ; mips_msb=63 ;;
mips16*-*-*) mips_bitsize=64 ; mips_msb=63 ;;
mips*-*-*) mips_bitsize=32 ; mips_msb=31 ;;
*) mips_bitsize=64 ; mips_msb=63 ;;
esac
SIM_AC_OPTION_BITSIZE($mips_bitsize,$mips_msb,$mips_addr_bitsize)
#
# Select the floating hardware support of the target
#
mips_fpu=HARDWARE_FLOATING_POINT
mips_fpu_bitsize=
case "${target}" in
# start-sanitize-tx19
mipstx19*-*-*) mips_fpu=SOFT_FLOATING_POINT ;;
# end-sanitize-tx19
mips*tx39*) mips_fpu=HARD_FLOATING_POINT
mips_fpu_bitsize=32
;;
# start-sanitize-r5900
mips64r59*-*-*) mips_fpu=HARD_FLOATING_POINT ; mips_fpu_bitsize=32 ;;
# end-sanitize-r5900
mips64*-*-*) mips_fpu=HARD_FLOATING_POINT ;;
mips16*-*-*) mips_fpu=HARD_FLOATING_POINT ;;
mips*-*-*) mips_fpu=HARD_FLOATING_POINT ;;
*) mips_fpu=HARD_FLOATING_POINT ;;
esac
SIM_AC_OPTION_FLOAT($mips_fpu,$mips_fpu_bitsize)
#
# Select the level of SMP support
#
case "${target}" in
# start-sanitize-r5900
mips64r59*-*-*) mips_smp=1 ;;
# end-sanitize-r5900
*) mips_smp=0 ;;
esac
SIM_AC_OPTION_SMP($mips_smp)
#
# Select the IGEN architecture
#
sim_use_gen=IGEN
sim_igen_machine="-M mipsIV"
sim_m16_machine="-M mips16"
sim_igen_filter="32,64,f"
sim_m16_filter="16"
case "${target}" in
# start-sanitize-tx19
mipstx19*-*-*) sim_default_gen=M16
sim_use_gen=M16
sim_igen_machine="-M tx19"
sim_m16_machine="-M tx19"
sim_igen_filter="32"
sim_m16_filter="16"
;;
# end-sanitize-tx19
mipst*tx39*) sim_default_gen=IGEN
sim_use_gen=IGEN
sim_igen_filter="32,f"
sim_igen_machine="-M r3900"
;;
# start-sanitize-r5900
mips64r59*-*-*) sim_default_gen=IGEN
sim_use_gen=IGEN
sim_igen_machine="-M r5900"
;;
# end-sanitize-r5900
# start-sanitize-vr4320
mips64vr4320-*-*) sim_default_gen=IGEN
sim_use_gen=IGEN
sim_igen_machine="-M mipsIV,vr4320 -G gen-multi-sim=vr4320"
;;
# end-sanitize-vr4320
mips64vr43*-*-*) sim_default_gen=IGEN
sim_use_gen=IGEN
sim_igen_machine="-M mipsIV"
# start-sanitize-vr4320
sim_igen_machine="-M mipsIV,vr4320 -G gen-multi-sim=mipsIV"
# end-sanitize-vr4320
;;
# start-sanitize-vr5400
mips64vr54*-*-*) sim_default_gen=IGEN
sim_use_gen=IGEN
sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5400"
;;
# end-sanitize-vr5400
mips64vr5*-*-*) sim_default_gen=IGEN
sim_use_gen=IGEN
sim_igen_machine="-M vr5000"
# start-sanitize-vr5400
sim_igen_machine="-M vr5000,vr5400 -G gen-multi-sim=vr5000"
# end-sanitize-vr5400
;;
mips64vr4100-*-*) echo "NOTE: mips64vr4100 still uses gencode"
sim_default_gen=M16
sim_igen_machine="-M tx19"
sim_m16_machine="-M tx19"
sim_igen_filter = "32,64,f"
sim_m16_filter = "16"
sim_use_gen=NO
;;
mips64*-*-*) sim_default_gen=IGEN
sim_igen_filter="32,64,f"
sim_use_gen=IGEN
;;
mips16*-*-*) sim_default_gen=M16
sim_igen_filter="32,64,f"
sim_m16_filter="16"
sim_use_igen=NO
;;
mips*-*-*) sim_default_gen=IGEN
sim_igen_filter="32,f"
sim_use_gen=IGEN
;;
esac
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}"
AC_SUBST(sim_igen_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_igen = $sim_gen" 6>&1
fi],[sim_gen="${sim_use_gen}"])dnl
AC_SUBST(sim_gen)
case "${target}" in
# start-sanitize-sky
mips64r59*-sky-*) mips_extra_objs='$(SIM_SKY_OBJS)' ;
SIM_SUBTARGET="-DTARGET_SKY -DWITH_DEVICES=1 -DDEVICE_INIT=1";;
# end-sanitize-sky
*) mips_extra_objs="" ;;
esac
AC_SUBST(mips_extra_objs)
# Add simulated hardware devices
#
SIM_AC_OPTION_HARDWARE()
case "${target}" in
# start-sanitize-tx3904
mips*tx39*) SIM_AC_OPTION_HARDWARE(,tx3904cpu tx3904irc) ;;
# end-sanitize-tx3904
*) ;;
esac
AC_PATH_X
mips_extra_libs=""
# start-sanitize-sky
# Enable GPU2 library
AC_ARG_WITH(sim-gpu2,
[ --with-sim-gpu2=path Use GPU2 library under given directory],
[if test -d "${withval}"
then
SIM_SUBTARGET="${SIM_SUBTARGET} -DSKY_GPU2 -I${withval}/include"
mips_extra_libs="-L${withval}/lib -lgpu2 -L${x_libraries} -lX11"
else
AC_MSG_ERROR("Directory ${withval} does not exist.");
fi])dnl
# Enable target accurate FP library
AC_ARG_WITH(sim-funit,
[ --with-sim-funit=path Use target FP library under given directory],
[if test -d "${withval}"
then
SIM_SUBTARGET="${SIM_SUBTARGET} -DSKY_FUNIT -I${withval}/include"
mips_extra_libs="${mips_extra_libs} -L${withval}/lib -lfunit"
else
AC_MSG_ERROR("Directory ${withval} does not exist.");
fi])dnl
# end-sanitize-sky
AC_SUBST(mips_extra_libs)
AC_CHECK_HEADERS(string.h strings.h stdlib.h stdlib.h)
AC_CHECK_LIB(m, fabs)
AC_CHECK_FUNCS(aint anint sqrt)
SIM_AC_OUTPUT