* config.in (HAVE_FCNTL_H): Add.
authorDoug Evans <dje@google.com>
Sun, 15 Mar 1998 05:15:18 +0000 (05:15 +0000)
committerDoug Evans <dje@google.com>
Sun, 15 Mar 1998 05:15:18 +0000 (05:15 +0000)
* configure: Regenerate.
* Makefile.in (SIM_OBJS): Add devices.o.
* m32r-sim.h (m32r_devices): Renamed from m32r_mspr_device.
(UART_*): Define m32r serial port parameters.
(M32R_DEVICE_ADDR,M32R_DEVICE_LEN): Define.
* m32r.c (device_io_{read,write}_buffer,device_error): Move from here,
* devices.c: To here.
* sim-if.c: Don't include signal.h,sim-core.h.
(sim_open): Use M32R_DEVICE_{ADDR,LEN} in sim_core_attach call.
(sim_resume): Call sim_module_{resume,suspend}.
* m32r.c (m32r_h_cr_{get,set}): Use register number enums.

* tconfig.in (SIM_HANDLES_LMA): Define.

* sim-if.c (do_trap): Result is new pc.
Handle --environment=operating.
* sem-switch.c,sem.c: Regenerate.
start-sanitize-m32rx
* semx.c: Regenerate.
end-sanitize-m32rx

sim/m32r/.Sanitize
sim/m32r/ChangeLog
sim/m32r/configure
sim/m32r/semx.c

index 52355f4..d79982e 100644 (file)
@@ -45,6 +45,7 @@ cpu.h
 cpuall.h
 decode.c
 decode.h
+devices.c
 extract.c
 m32r-sim.h
 m32r.c
index f5baf54..9ddcc64 100644 (file)
@@ -1,3 +1,32 @@
+Sat Mar 14 20:53:36 1998  Doug Evans  <devans@seba.cygnus.com>
+
+       * config.in (HAVE_FCNTL_H): Add.
+       * configure: Regenerate.
+       * Makefile.in (SIM_OBJS): Add devices.o.
+       * m32r-sim.h (m32r_devices): Renamed from m32r_mspr_device.
+       (UART_*): Define m32r serial port parameters.
+       (M32R_DEVICE_ADDR,M32R_DEVICE_LEN): Define.
+       * m32r.c (device_io_{read,write}_buffer,device_error): Move from here,
+       * devices.c: To here.
+       * sim-if.c: Don't include signal.h,sim-core.h.
+       (sim_open): Use M32R_DEVICE_{ADDR,LEN} in sim_core_attach call.
+       (sim_resume): Call sim_module_{resume,suspend}.
+       * m32r.c (m32r_h_cr_{get,set}): Use register number enums.
+
+       * tconfig.in (SIM_HANDLES_LMA): Define.
+
+       * sim-if.c (do_trap): Result is new pc.
+       Handle --environment=operating.
+       * sem-switch.c,sem.c: Regenerate.
+start-sanitize-m32rx
+       * semx.c: Regenerate.
+end-sanitize-m32rx
+
+Wed Mar 11 14:07:39 1998  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-if.c (syscall_read_mem, syscall_write_mem): Replace
+       sim_core_*_map with read_map, write_map, exec_map resp.
+
 Wed Mar  4 11:36:51 1998  Doug Evans  <devans@seba.cygnus.com>
 
        * Makefile.in (SIM_EXTRA_DEPS): Add cpu-opc.h.
index 73a2041..95e289f 100755 (executable)
@@ -1091,7 +1091,7 @@ fi
 # Check for common headers.
 # FIXME: Seems to me this can cause problems for i386-windows hosts.
 # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_hdr in stdlib.h string.h strings.h unistd.h time.h sys/time.h sys/resource.h
+for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -1131,15 +1131,95 @@ else
 fi
 done
 
+for ac_hdr in sys/time.h sys/resource.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1139: 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
+#line 1144 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in fcntl.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1179: 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
+#line 1184 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
 for ac_func in getrusage time sigaction
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1138: checking for $ac_func" >&5
+echo "configure:1218: 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 <<EOF
-#line 1143 "configure"
+#line 1223 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1162,7 +1242,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1191,11 +1271,12 @@ done
 
 
 
+USE_MAINTAINER_MODE=no
 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then
   enableval="$enable_maintainer_mode"
   case "${enableval}" in
-  yes) MAINT="" ;;
+  yes) MAINT="" USE_MAINTAINER_MODE=yes ;;
   no)  MAINT="#" ;;
   *)   { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
 esac
@@ -1334,12 +1415,12 @@ fi
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1338: checking return type of signal handlers" >&5
+echo "configure:1419: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1343 "configure"
+#line 1424 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -1356,7 +1437,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:1360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -1509,14 +1590,14 @@ else
   
 if test "x$cross_compiling" = "xno"; then
   echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:1513: checking whether byte ordering is bigendian" >&5
+echo "configure:1594: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 1520 "configure"
+#line 1601 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1527,11 +1608,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 1535 "configure"
+#line 1616 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -1542,7 +1623,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -1562,7 +1643,7 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 1566 "configure"
+#line 1647 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -1575,7 +1656,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:1579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -1665,6 +1746,38 @@ else
 fi
 
 
+if test ${USE_MAINTAINER_MODE} = yes ; then
+    # Extract the first word of "guile", so it can be a program name with args.
+set dummy guile; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1754: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_SCHEME'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$SCHEME"; then
+  ac_cv_prog_SCHEME="$SCHEME" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_SCHEME="guile"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_SCHEME" && ac_cv_prog_SCHEME="guile"
+fi
+fi
+SCHEME="$ac_cv_prog_SCHEME"
+if test -n "$SCHEME"; then
+  echo "$ac_t""$SCHEME" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
 
 
 trap '' 1 2 15
@@ -1847,6 +1960,7 @@ s%@sim_debug@%$sim_debug%g
 s%@sim_stdio@%$sim_stdio%g
 s%@sim_trace@%$sim_trace%g
 s%@sim_profile@%$sim_profile%g
+s%@SCHEME@%$SCHEME%g
 
 CEOF
 EOF
index 8bd7927..2803419 100644 (file)
@@ -2405,7 +2405,7 @@ do {
   TRACE_RESULT (current_cpu, "h-ie-0", 'x', CPU (h_ie));
   CPU (h_cond) = OPRND (h_bcond_0);
   TRACE_RESULT (current_cpu, "condbit", 'x', CPU (h_cond));
-  BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, OPRND (h_bpc_0)));
+  BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, ANDSI (OPRND (h_bpc_0), -4)));
   TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc));
 } while (0);
 
@@ -3021,10 +3021,10 @@ SEM_FN_NAME (m32rx,trap) (SIM_CPU *current_cpu, SEM_ARG sem_arg, PAREXEC *par_ex
 do {
 m32rx_h_cr_set (current_cpu, 6, ADDSI (OPRND (pc), 4));
   TRACE_RESULT (current_cpu, "h-cr-6", 'x', m32rx_h_cr_get (current_cpu, 6));
-m32rx_h_cr_set (current_cpu, 0, ANDSI (SRLSI (OPRND (h_cr_0), 8), 33488896));
+m32rx_h_cr_set (current_cpu, 0, ANDSI (SLLSI (OPRND (h_cr_0), 8), 65408));
   TRACE_RESULT (current_cpu, "h-cr-0", 'x', m32rx_h_cr_get (current_cpu, 0));
-do_trap (current_cpu, OPRND (uimm4));
-; /*clobber*/
+  BRANCH_NEW_PC (new_pc, SEM_BRANCH_VIA_ADDR (sem_arg, do_trap (current_cpu, OPRND (uimm4))));
+  TRACE_RESULT (current_cpu, "pc", 'x', CPU (h_pc));
 } while (0);
 
 #if WITH_PROFILE_MODEL_P