summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Molenda <jsm@bugshack.cygnus.com>2000-01-25 02:40:50 +0000
committerJason Molenda <jsm@bugshack.cygnus.com>2000-01-25 02:40:50 +0000
commit4ecebc39d879fbf0fa7bb311c84c6eb6a5cbcfb4 (patch)
tree3bf88948ab8fd7a5a54b5d4210fbeea2c77f7f88
parent12fd3ce9985173a1add66f80ff510616ef942832 (diff)
downloadgdb-4ecebc39d879fbf0fa7bb311c84c6eb6a5cbcfb4.tar.gz
import gdb-2000-01-24 snapshot
-rw-r--r--gdb/ChangeLog65
-rw-r--r--gdb/Makefile.in12
-rw-r--r--gdb/config/sparc/sun4sol2.mh2
-rw-r--r--gdb/configure.tgt1
-rw-r--r--gdb/defs.h1
-rw-r--r--gdb/linux-thread.c2
-rw-r--r--gdb/procfs.c53
-rw-r--r--gdb/rdi-share/devsw.c16
-rw-r--r--gdb/utils.c70
-rw-r--r--sim/common/cgen-ops.h60
-rwxr-xr-xsim/configure81
-rw-r--r--sim/mcore/interp.c2
-rw-r--r--sim/mcore/sysdep.h2
13 files changed, 278 insertions, 89 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dd46c8280f4..2d45b2a5d87 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,63 @@
+2000-01-24 Kevin Buettner <kevinb@redhat.com>
+
+ * utils.c (get_field, put_field): Fix buffer underruns and
+ overruns. Also, handle case where total_len is not evenly
+ divisible by 8.
+ (getfield): Make sure zeroing of unwanted bits occurs even
+ when bit field to extract does not straddle two or more
+ bytes.
+
+2000-01-23 Christopher Faylor <cgf@cygnus.com>
+
+ * defs.h: Add gdb_thread_select declaration.
+
+2000-01-23 Kevin Buettner <kevinb@redhat.com>
+
+ * linux-thread.c (_initialize_linuxthreads): Make sure that
+ linuxthreads_block_mask does not block SIGCHLD.
+
+2000-01-20 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * rdi-share/devsw.c (openLogFile): On cygwin, set the log mode to
+ text so that new lines work properly.
+
+2000-01-18 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * proc-utils.h: New file. Export functions from proc-*.c.
+
+ * proc_api.c: Rename to:
+ * proc-api.c: New file. Add include of proc-utils.h.
+
+ * proc_events.c: Rename to:
+ * proc-events.c: New file.
+
+ * proc_flags.c: Rename to:
+ * proc-flags.c: New file.
+
+ * proc_why.c: Rename to:
+ * proc-why.c: New file. Add include of proc-utils.h.
+
+ * procfs.c: Add includes of gdbthread.h, sys/wait.h, signal.h,
+ ctype.h, proc-utils.h.
+ (find_procinfo_or_die): Add braces to avoid ambiguous else clause.
+ (open_procinfo_files): Conditionalize local variable tmp, to avoid
+ compiler warnings.
+ (proc_iterate_over_mappings): Conditionalize local vars mapfd and
+ pathname.
+ (procfs_wait): Adjust format in some printf_filetered calls to
+ avoid compiler warnings.
+ (make_signal_thread_runnable): Ifdef 0. The calls to this function
+ are also ifdef'd 0 .
+ (procfs_resume): Add parentheses around '&&' operation.
+ (procfs_set_exec_trap): Remove unused variable.
+ (info_proc_cmd): Add braces to avoid ambiguous else clause.
+
+ * Makefile.in (procfs.o, proc-api.o, proc-events.o, proc-flags.o,
+ proc-why.o): Update dependencies.
+
+ * config/sparc/sun4sol2.mh (NATDEPFILES): Change proc_*.o files to
+ proc-*.o.
+
2000-01-17 Jason Molenda (jsm@bugshack.cygnus.com)
* configure.in (NEW_PROC_API): Fix Unixware-matching regexp.
@@ -32,6 +92,11 @@ Sun Jan 16 17:58:00 2000 David Taylor <taylor@texas.cygnus.com>
* v850-tdep.c (v850_target_architecture_hook): Setup correct
machine id for disassembly.
+2000-01-13 Jim Blandy <jimb@cygnus.com>
+
+ * i386-linux-nat.c (fill_gregset): Pass the correct arguments to
+ convert_to_regset, when regno indicates a specific register.
+
Thu Jan 13 23:34:17 EST 2000 Nicholas Duffek <nsd@cygnus.com>
* uw-thread.c: Document libthread.so debugging interface. Minor
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 8ce6044fd75..68292d53e27 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -229,7 +229,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
-VERSION = 20000117
+VERSION = 20000124
DIST=gdb
LINT=/usr/5bin/lint
@@ -1412,16 +1412,16 @@ printcmd.o: printcmd.c $(breakpoint_h) $(defs_h) $(expression_h) \
# FIXME: Procfs.o gets -Wformat errors because things like pid_t don't
# match output format strings.
procfs.o: procfs.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \
- target.h gdb_string.h
+ target.h gdb_string.h gdbthread.h proc-utils.h
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
-proc_api.o: proc_api.c $(defs_h) $(gdbcmd_h)
+proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) proc-utils.h
-proc_events.o: proc_events.c $(defs_h)
+proc-events.o: proc-events.c $(defs_h)
-proc_flags.o: proc_flags.c $(defs_h)
+proc-flags.o: proc-flags.c $(defs_h)
-proc_why.o: proc_why.c $(defs_h)
+proc-why.o: proc-why.c $(defs_h) proc-utils.h
sol-thread.o: sol-thread.c $(defs_h) gdbthread.h target.h $(inferior_h) \
$(gdbcmd_h)
diff --git a/gdb/config/sparc/sun4sol2.mh b/gdb/config/sparc/sun4sol2.mh
index 1659c7a3c91..b9ab28e8273 100644
--- a/gdb/config/sparc/sun4sol2.mh
+++ b/gdb/config/sparc/sun4sol2.mh
@@ -6,7 +6,7 @@ XM_CLIBS= -lsocket -lnsl
NAT_FILE= nm-sun4sol2.h
NATDEPFILES= corelow.o core-sol2.o solib.o fork-child.o procfs.o \
- proc_api.o proc_events.o proc_flags.o proc_why.o
+ proc-api.o proc-events.o proc-flags.o proc-why.o
# If you are compiling with Sun's compiler, add the -xs option to CC
# (e.g. `make CC="cc -xs"').
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index 6eac3a442e2..95dee85b212 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -65,6 +65,7 @@ d30v-*-*) gdb_target=d30v ;;
h8300-*-*) gdb_target=h8300 ;;
h8500-*-*) gdb_target=h8500 ;;
+
fr30-*-elf*) gdb_target=fr30 ;;
diff --git a/gdb/defs.h b/gdb/defs.h
index 3ae2b2d69fa..ef4049d8c00 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -1345,5 +1345,6 @@ enum gdb_rc gdb_breakpoint_query (/* struct {ui,gdb}_out *output, */ int bnum);
enum gdb_rc gdb_breakpoint (char *address, char *condition,
int hardwareflag, int tempflag,
int thread, int ignore_count);
+enum gdb_rc gdb_thread_select (/* output object */ char *tidstr);
#endif /* #ifndef DEFS_H */
diff --git a/gdb/linux-thread.c b/gdb/linux-thread.c
index df982a6f777..3e72ab402f1 100644
--- a/gdb/linux-thread.c
+++ b/gdb/linux-thread.c
@@ -1800,4 +1800,6 @@ _initialize_linuxthreads ()
sigprocmask(SIG_BLOCK,
&linuxthreads_wait_mask,
&linuxthreads_block_mask);
+ /* Make sure that linuxthreads_block_mask is not blocking SIGCHLD */
+ sigdelset (&linuxthreads_block_mask, SIGCHLD);
}
diff --git a/gdb/procfs.c b/gdb/procfs.c
index d1763869eff..920019fae17 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -24,6 +24,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "target.h"
#include "gdbcore.h"
#include "gdbcmd.h"
+#include "gdbthread.h"
#if defined (NEW_PROC_API)
#define _STRUCTURED_PROC 1 /* Should be done by configure script. */
@@ -33,6 +34,11 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <sys/fault.h>
#include <sys/syscall.h>
#include <sys/errno.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include <ctype.h>
+
+#include "proc-utils.h"
/*
* PROCFS.C
@@ -403,11 +409,13 @@ find_procinfo_or_die (pid, tid)
procinfo *pi = find_procinfo (pid, tid);
if (pi == NULL)
- if (tid)
- error ("procfs: couldn't find pid %d (kernel thread %d) in procinfo list.",
- pid, tid);
- else
- error ("procfs: couldn't find pid %d in procinfo list.", pid);
+ {
+ if (tid)
+ error ("procfs: couldn't find pid %d (kernel thread %d) in procinfo list.",
+ pid, tid);
+ else
+ error ("procfs: couldn't find pid %d in procinfo list.", pid);
+ }
return pi;
}
@@ -431,7 +439,9 @@ open_procinfo_files (pi, which)
procinfo *pi;
int which;
{
+#ifdef NEW_PROC_API
char tmp[MAX_PROC_NAME_SIZE];
+#endif
int fd;
/*
@@ -2627,11 +2637,14 @@ proc_iterate_over_mappings (func)
struct prmap *map;
procinfo *pi;
#ifndef NEW_PROC_API /* avoid compiler warning */
- int nmaps = 0, i;
+ int nmaps = 0;
+ int i;
+#else
+ int map_fd;
+ char pathname[MAX_PROC_NAME_SIZE];
#endif
int funcstat = 0;
- int fd, map_fd;
- char pathname[MAX_PROC_NAME_SIZE];
+ int fd;
pi = find_procinfo_or_die (PIDGET (inferior_pid), 0);
@@ -3762,9 +3775,9 @@ wait_again:
if ((nsysargs = proc_nsysarg (pi)) > 0 &&
(sysargs = proc_sysargs (pi)) != NULL)
{
- printf_filtered ("%d syscall arguments:\n", nsysargs);
+ printf_filtered ("%ld syscall arguments:\n", nsysargs);
for (i = 0; i < nsysargs; i++)
- printf_filtered ("#%d: 0x%08x\n",
+ printf_filtered ("#%ld: 0x%08x\n",
i, sysargs[i]);
}
@@ -3876,9 +3889,9 @@ wait_again:
if ((nsysargs = proc_nsysarg (pi)) > 0 &&
(sysargs = proc_sysargs (pi)) != NULL)
{
- printf_filtered ("%d syscall arguments:\n", nsysargs);
+ printf_filtered ("%ld syscall arguments:\n", nsysargs);
for (i = 0; i < nsysargs; i++)
- printf_filtered ("#%d: 0x%08x\n",
+ printf_filtered ("#%ld: 0x%08x\n",
i, sysargs[i]);
}
}
@@ -4141,6 +4154,7 @@ invalidate_cache (parent, pi, ptr)
return 0;
}
+#if 0
/*
* Function: make_signal_thread_runnable
*
@@ -4165,6 +4179,7 @@ make_signal_thread_runnable (process, pi, ptr)
#endif
return 0;
}
+#endif
/*
* Function: target_resume
@@ -4216,7 +4231,7 @@ procfs_resume (pid, step, signo)
/* Convert signal to host numbering. */
if (signo == 0 ||
- signo == TARGET_SIGNAL_STOP && pi->ignore_next_sigstop)
+ (signo == TARGET_SIGNAL_STOP && pi->ignore_next_sigstop))
native_signo = 0;
else
native_signo = target_signal_to_host (signo);
@@ -4603,7 +4618,6 @@ procfs_set_exec_trap ()
procinfo *pi;
sysset_t exitset;
- sysset_t entryset;
if ((pi = create_procinfo (getpid (), 0)) == NULL)
perror_with_name ("procfs: create_procinfo failed in child.");
@@ -5027,11 +5041,12 @@ info_proc_cmd (args, from_tty)
old_chain = make_cleanup (null_cleanup, 0);
if (args)
- if ((argv = buildargv (args)) == NULL)
- nomem (0);
- else
- make_cleanup ((make_cleanup_func) freeargv, argv);
-
+ {
+ if ((argv = buildargv (args)) == NULL)
+ nomem (0);
+ else
+ make_cleanup ((make_cleanup_func) freeargv, argv);
+ }
while (argv != NULL && *argv != NULL)
{
if (isdigit (argv[0][0]))
diff --git a/gdb/rdi-share/devsw.c b/gdb/rdi-share/devsw.c
index 2cb377d75be..bad327153e3 100644
--- a/gdb/rdi-share/devsw.c
+++ b/gdb/rdi-share/devsw.c
@@ -8,13 +8,14 @@
/* -*-C-*-
*
- * $Revision: 1.7 $
- * $Date: 2000/01/04 14:56:32 $
+ * $Revision: 1.8 $
+ * $Date: 2000/01/20 16:08:00 $
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <fcntl.h>
#include "adp.h"
#include "sys.h"
@@ -48,9 +49,14 @@ static void openLogFile ()
perror ("fopen");
}
else
- /* The following line is equivalent to: */
- /* setlinebuf (angelDebugLogFile); */
- setvbuf(angelDebugLogFile, (char *)NULL, _IOLBF, 0);
+ {
+ /* The following line is equivalent to: */
+ /* setlinebuf (angelDebugLogFile); */
+ setvbuf(angelDebugLogFile, (char *)NULL, _IOLBF, 0);
+#if defined(__CYGWIN32__) || defined(__CYGWIN__)
+ setmode(fileno(angelDebugLogFile), O_TEXT);
+#endif
+ }
time (&t);
fprintf (angelDebugLogFile,"ADP log file opened at %s\n",asctime(localtime(&t)));
diff --git a/gdb/utils.c b/gdb/utils.c
index 596c0aee3b9..ab790d9548b 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -3203,12 +3203,31 @@ get_field (data, order, total_len, start, len)
int cur_bitshift;
/* Start at the least significant part of the field. */
- cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;
if (order == floatformat_little || order == floatformat_littlebyte_bigword)
- cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1;
- cur_bitshift =
- ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;
- result = *(data + cur_byte) >> (-cur_bitshift);
+ {
+ /* We start counting from the other end (i.e, from the high bytes
+ rather than the low bytes). As such, we need to be concerned
+ with what happens if bit 0 doesn't start on a byte boundary.
+ I.e, we need to properly handle the case where total_len is
+ not evenly divisible by 8. So we compute ``excess'' which
+ represents the number of bits from the end of our starting
+ byte needed to get to bit 0. */
+ int excess = FLOATFORMAT_CHAR_BIT - (total_len % FLOATFORMAT_CHAR_BIT);
+ cur_byte = (total_len / FLOATFORMAT_CHAR_BIT)
+ - ((start + len + excess) / FLOATFORMAT_CHAR_BIT);
+ cur_bitshift = ((start + len + excess) % FLOATFORMAT_CHAR_BIT)
+ - FLOATFORMAT_CHAR_BIT;
+ }
+ else
+ {
+ cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;
+ cur_bitshift =
+ ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;
+ }
+ if (cur_bitshift > -FLOATFORMAT_CHAR_BIT)
+ result = *(data + cur_byte) >> (-cur_bitshift);
+ else
+ result = 0;
cur_bitshift += FLOATFORMAT_CHAR_BIT;
if (order == floatformat_little || order == floatformat_littlebyte_bigword)
++cur_byte;
@@ -3218,20 +3237,16 @@ get_field (data, order, total_len, start, len)
/* Move towards the most significant part of the field. */
while (cur_bitshift < len)
{
- if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT)
- /* This is the last byte; zero out the bits which are not part of
- this field. */
- result |=
- (*(data + cur_byte) & ((1 << (len - cur_bitshift)) - 1))
- << cur_bitshift;
- else
- result |= *(data + cur_byte) << cur_bitshift;
+ result |= (unsigned long)*(data + cur_byte) << cur_bitshift;
cur_bitshift += FLOATFORMAT_CHAR_BIT;
if (order == floatformat_little || order == floatformat_littlebyte_bigword)
++cur_byte;
else
--cur_byte;
}
+ if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)
+ /* Mask out bits which are not part of the field */
+ result &= ((1UL << len) - 1);
return result;
}
@@ -3368,15 +3383,28 @@ put_field (data, order, total_len, start, len, stuff_to_put)
int cur_bitshift;
/* Start at the least significant part of the field. */
- cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;
if (order == floatformat_little || order == floatformat_littlebyte_bigword)
- cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1;
- cur_bitshift =
- ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;
- *(data + cur_byte) &=
- ~(((1 << ((start + len) % FLOATFORMAT_CHAR_BIT)) - 1) << (-cur_bitshift));
- *(data + cur_byte) |=
- (stuff_to_put & ((1 << FLOATFORMAT_CHAR_BIT) - 1)) << (-cur_bitshift);
+ {
+ int excess = FLOATFORMAT_CHAR_BIT - (total_len % FLOATFORMAT_CHAR_BIT);
+ cur_byte = (total_len / FLOATFORMAT_CHAR_BIT)
+ - ((start + len + excess) / FLOATFORMAT_CHAR_BIT);
+ cur_bitshift = ((start + len + excess) % FLOATFORMAT_CHAR_BIT)
+ - FLOATFORMAT_CHAR_BIT;
+ }
+ else
+ {
+ cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;
+ cur_bitshift =
+ ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;
+ }
+ if (cur_bitshift > -FLOATFORMAT_CHAR_BIT)
+ {
+ *(data + cur_byte) &=
+ ~(((1 << ((start + len) % FLOATFORMAT_CHAR_BIT)) - 1)
+ << (-cur_bitshift));
+ *(data + cur_byte) |=
+ (stuff_to_put & ((1 << FLOATFORMAT_CHAR_BIT) - 1)) << (-cur_bitshift);
+ }
cur_bitshift += FLOATFORMAT_CHAR_BIT;
if (order == floatformat_little || order == floatformat_littlebyte_bigword)
++cur_byte;
diff --git a/sim/common/cgen-ops.h b/sim/common/cgen-ops.h
index de3717b1b24..12fab70248c 100644
--- a/sim/common/cgen-ops.h
+++ b/sim/common/cgen-ops.h
@@ -74,6 +74,7 @@ extern QI ROLQI (QI, int);
#define NEGQI(x) (- (x))
#define NOTQI(x) (! (QI) (x))
#define INVQI(x) (~ (x))
+#define ABSQI(x) ((x) < 0 ? -(x) : (x))
#define EQQI(x, y) ((QI) (x) == (QI) (y))
#define NEQI(x, y) ((QI) (x) != (QI) (y))
#define LTQI(x, y) ((QI) (x) < (QI) (y))
@@ -103,6 +104,7 @@ extern HI ROLHI (HI, int);
#define NEGHI(x) (- (x))
#define NOTHI(x) (! (HI) (x))
#define INVHI(x) (~ (x))
+#define ABSHI(x) ((x) < 0 ? -(x) : (x))
#define EQHI(x, y) ((HI) (x) == (HI) (y))
#define NEHI(x, y) ((HI) (x) != (HI) (y))
#define LTHI(x, y) ((HI) (x) < (HI) (y))
@@ -132,6 +134,7 @@ extern SI ROLSI (SI, int);
#define NEGSI(x) (- (x))
#define NOTSI(x) (! (SI) (x))
#define INVSI(x) (~ (x))
+#define ABSSI(x) ((x) < 0 ? -(x) : (x))
#define EQSI(x, y) ((SI) (x) == (SI) (y))
#define NESI(x, y) ((SI) (x) != (SI) (y))
#define LTSI(x, y) ((SI) (x) < (SI) (y))
@@ -191,6 +194,7 @@ extern DI ROLDI (DI, int);
#define NEGDI(x) (- (x))
#define NOTDI(x) (! (DI) (x))
#define INVDI(x) (~ (x))
+#define ABSDI(x) ((x) < 0 ? -(x) : (x))
#define EQDI(x, y) ((DI) (x) == (DI) (y))
#define NEDI(x, y) ((DI) (x) != (DI) (y))
#define LTDI(x, y) ((DI) (x) < (DI) (y))
@@ -219,6 +223,7 @@ extern DI EXTQIDI (QI);
#define EXTQIDI(x) ((DI) (QI) (x))
#endif
#define EXTHISI(x) ((SI) (HI) (x))
+#define EXTSISI(x) ((SI) (SI) (x))
#if defined (DI_FN_SUPPORT)
extern DI EXTHIDI (HI);
#else
@@ -246,6 +251,8 @@ extern DI ZEXTQIDI (QI);
#define ZEXTQIDI(x) ((DI) (UQI) (x))
#endif
#define ZEXTHISI(x) ((SI) (UHI) (x))
+#define ZEXTHIHI(x) ((HI) (UHI) (x))
+#define ZEXTSISI(x) ((SI) (USI) (x))
#if defined (DI_FN_SUPPORT)
extern DI ZEXTHIDI (HI);
#else
@@ -453,6 +460,53 @@ SUBOFSI (SI a, SI b, BI c)
return res;
}
+SEMOPS_INLINE HI
+ADDCHI (HI a, HI b, BI c)
+{
+ HI res = ADDHI (a, ADDHI (b, c));
+ return res;
+}
+
+SEMOPS_INLINE BI
+ADDCFHI (HI a, HI b, BI c)
+{
+ HI tmp = ADDHI (a, ADDHI (b, c));
+ BI res = ((UHI) tmp < (UHI) a) || (c && tmp == a);
+ return res;
+}
+
+SEMOPS_INLINE BI
+ADDOFHI (HI a, HI b, BI c)
+{
+ HI tmp = ADDHI (a, ADDHI (b, c));
+ BI res = (((a < 0) == (b < 0))
+ && ((a < 0) != (tmp < 0)));
+ return res;
+}
+
+SEMOPS_INLINE HI
+SUBCHI (HI a, HI b, BI c)
+{
+ HI res = SUBHI (a, ADDHI (b, c));
+ return res;
+}
+
+SEMOPS_INLINE BI
+SUBCFHI (HI a, HI b, BI c)
+{
+ BI res = ((UHI) a < (UHI) b) || (c && a == b);
+ return res;
+}
+
+SEMOPS_INLINE BI
+SUBOFHI (HI a, HI b, BI c)
+{
+ HI tmp = SUBHI (a, ADDHI (b, c));
+ BI res = (((a < 0) != (b < 0))
+ && ((a < 0) != (tmp < 0)));
+ return res;
+}
+
#else
SI ADDCSI (SI, SI, BI);
@@ -461,6 +515,12 @@ UBI ADDOFSI (SI, SI, BI);
SI SUBCSI (SI, SI, BI);
UBI SUBCFSI (SI, SI, BI);
UBI SUBOFSI (SI, SI, BI);
+HI ADDCHI (HI, HI, BI);
+UBI ADDCFHI (HI, HI, BI);
+UBI ADDOFHI (HI, HI, BI);
+HI SUBCHI (HI, HI, BI);
+UBI SUBCFHI (HI, HI, BI);
+UBI SUBOFHI (HI, HI, BI);
#endif
diff --git a/sim/configure b/sim/configure
index 38aab98c5c5..57d3bd8335b 100755
--- a/sim/configure
+++ b/sim/configure
@@ -30,6 +30,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -144,6 +145,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -314,6 +316,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -479,12 +486,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -527,7 +538,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:531: checking for $ac_word" >&5
+echo "configure:542: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -557,7 +568,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:561: checking for $ac_word" >&5
+echo "configure:572: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -608,7 +619,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:612: checking for $ac_word" >&5
+echo "configure:623: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -640,7 +651,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:644: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:655: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -651,12 +662,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 655 "configure"
+#line 666 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -682,12 +693,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:697: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:691: checking whether we are using GNU C" >&5
+echo "configure:702: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -696,7 +707,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -715,7 +726,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:719: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:730: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -777,7 +788,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:781: checking for a BSD compatible install" >&5
+echo "configure:792: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -836,7 +847,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:840: checking host system type" >&5
+echo "configure:851: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -857,7 +868,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:861: checking build system type" >&5
+echo "configure:872: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -883,7 +894,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:887: checking for $ac_word" >&5
+echo "configure:898: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -915,7 +926,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:919: checking for $ac_word" >&5
+echo "configure:930: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -947,7 +958,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:951: checking for $ac_word" >&5
+echo "configure:962: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1027,7 +1038,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1031: checking host system type" >&5
+echo "configure:1042: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1048,7 +1059,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1052: checking target system type" >&5
+echo "configure:1063: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1066,7 +1077,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1070: checking build system type" >&5
+echo "configure:1081: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1110,7 +1121,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1114: checking for $ac_word" >&5
+echo "configure:1125: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1140,7 +1151,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1144: checking for $ac_word" >&5
+echo "configure:1155: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1191,7 +1202,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1195: checking for $ac_word" >&5
+echo "configure:1206: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1223,7 +1234,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1227: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1234,12 +1245,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1238 "configure"
+#line 1249 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1265,12 +1276,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1269: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1280: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1274: checking whether we are using GNU C" >&5
+echo "configure:1285: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1279,7 +1290,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1298,7 +1309,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1302: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1313: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1336,7 +1347,7 @@ AR=${AR-ar}
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1340: checking for $ac_word" >&5
+echo "configure:1351: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c
index 899b3718a5a..e8d0c63bc85 100644
--- a/sim/mcore/interp.c
+++ b/sim/mcore/interp.c
@@ -1,4 +1,4 @@
-/* Simulator for Motorolla's MCore processor
+/* Simulator for Motorola's MCore processor
Copyright (C) 1999 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
diff --git a/sim/mcore/sysdep.h b/sim/mcore/sysdep.h
index e2e92e140f1..336740adc7f 100644
--- a/sim/mcore/sysdep.h
+++ b/sim/mcore/sysdep.h
@@ -1,4 +1,4 @@
-/* System includes and definitions used by the Motorolla MCore simulator.
+/* System includes and definitions used by the Motorola MCore simulator.
Copyright (C) 1999 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.