* configure.in (mips_fpu_bitsize) : Set this correctly for 32-bit mips
[binutils-gdb.git] / sim / mips / configure.in
index c2fc4ba2302da757411acdfa228895f032a1b09a..702a7e633398a8b4a72947d5501b90b43a58bdd0 100644 (file)
@@ -11,7 +11,6 @@ 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
@@ -32,10 +31,16 @@ 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)
@@ -92,7 +97,7 @@ case "${target}" in
 # start-sanitize-tx19
   mipstx19*-*-*)        mips_fpu=SOFT_FLOATING_POINT ;;
 # end-sanitize-tx19
-  mipstx39*-*-*)       mips_fpu=HARD_FLOATING_POINT
+  mips*tx39*)          mips_fpu=HARD_FLOATING_POINT
                        mips_fpu_bitsize=32
                        ;;
 # start-sanitize-r5900
@@ -100,7 +105,7 @@ case "${target}" in
 # end-sanitize-r5900
   mips64*-*-*)          mips_fpu=HARD_FLOATING_POINT ;;
   mips16*-*-*)          mips_fpu=HARD_FLOATING_POINT ;;
-  mips*-*-*)            mips_fpu=HARD_FLOATING_POINT ;;
+  mips*-*-*)            mips_fpu=HARD_FLOATING_POINT ; mips_fpu_bitsize=32 ;;
   *)                    mips_fpu=HARD_FLOATING_POINT ;;
 esac
 SIM_AC_OPTION_FLOAT($mips_fpu,$mips_fpu_bitsize)
@@ -131,15 +136,14 @@ sim_m16_filter="16"
 case "${target}" in
 # start-sanitize-tx19
   mipstx19*-*-*)       sim_default_gen=M16
-                       #sim_use_gen=M16
-                       sim_use_gen=NO
+                       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
-  mipstx39*-*-*)       sim_default_gen=IGEN
+  mips*tx39*)          sim_default_gen=IGEN
                        sim_use_gen=IGEN
                        sim_igen_filter="32,f"
                        sim_igen_machine="-M r3900"
@@ -234,6 +238,20 @@ esac
 AC_SUBST(mips_extra_objs)
 
 
+
+# start-sanitize-tx3904
+#
+# Add simulated hardware devices
+#
+hw_enabled=no
+case "${target}" in
+  mips*tx39*) hw_enabled=yes ; hw_extra_devices="tx3904cpu tx3904irc tx3904tmr" ;;
+  *) ;;
+esac
+SIM_AC_OPTION_HARDWARE($hw_enabled,$hw_devices,$hw_extra_devices)
+# end-sanitize-tx3904
+
+
 AC_PATH_X
 mips_extra_libs=""
 # start-sanitize-sky
@@ -247,6 +265,16 @@ then
 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)