aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authornobody <>2006-11-15 00:00:36 +0000
committernobody <>2006-11-15 00:00:36 +0000
commit6ea925ed04e69ecd81fe4b1167d9f4570c564924 (patch)
treee8266757d03d8acce1ff252ca82cf2080f4b6578 /sim
parentc9a129a5d1574b9b27f9fc84b0f5f0f63bc6bf34 (diff)
downloadfsf-binutils-gdb-nickrob-async-20060828-mergepoint.zip
fsf-binutils-gdb-nickrob-async-20060828-mergepoint.tar.gz
fsf-binutils-gdb-nickrob-async-20060828-mergepoint.tar.bz2
This commit was manufactured by cvs2svn to create tag 'nickrob-nickrob-async-20060828-mergepoint
async-20060828-mergepoint'. Sprout from gdb_6_6-branch 2006-11-15 00:00:34 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'gdb_6_6-branch'.' Cherrypick from master 2006-08-28 00:56:25 UTC DJ Delorie <dj@redhat.com> 'merge from gcc': COPYING.LIBGLOSS COPYING.NEWLIB ChangeLog Makefile.def Makefile.in Makefile.tpl bfd/ChangeLog bfd/Makefile.am bfd/Makefile.in bfd/archive.c bfd/archive64.c bfd/archures.c bfd/bfd-in.h bfd/bfd-in2.h bfd/bfd.c bfd/coff-arm.c bfd/coff-maxq.c bfd/coff-ppc.c bfd/coff-stgo32.c bfd/coffcode.h bfd/cofflink.c bfd/config.bfd bfd/configure bfd/configure.in bfd/cpu-arm.c bfd/cpu-i960.c bfd/dwarf2.c bfd/ecoff.c bfd/elf-bfd.h bfd/elf-eh-frame.c bfd/elf-m10300.c bfd/elf.c bfd/elf32-arm.c bfd/elf32-avr.c bfd/elf32-bfin.c bfd/elf32-cr16c.c bfd/elf32-cris.c bfd/elf32-crx.c bfd/elf32-d10v.c bfd/elf32-fr30.c bfd/elf32-frv.c bfd/elf32-h8300.c bfd/elf32-hppa.c bfd/elf32-i370.c bfd/elf32-i386.c bfd/elf32-ip2k.c bfd/elf32-iq2000.c bfd/elf32-m32c.c bfd/elf32-m32r.c bfd/elf32-m68hc11.c bfd/elf32-m68hc12.c bfd/elf32-m68hc1x.c bfd/elf32-m68hc1x.h bfd/elf32-m68k.c bfd/elf32-mcore.c bfd/elf32-mips.c bfd/elf32-msp430.c bfd/elf32-mt.c bfd/elf32-openrisc.c bfd/elf32-ppc.c bfd/elf32-s390.c bfd/elf32-sh-symbian.c bfd/elf32-sh.c bfd/elf32-sh64.c bfd/elf32-sparc.c bfd/elf32-v850.c bfd/elf32-vax.c bfd/elf32-xstormy16.c bfd/elf32-xtensa.c bfd/elf64-alpha.c bfd/elf64-hppa.c bfd/elf64-mips.c bfd/elf64-mmix.c bfd/elf64-ppc.c bfd/elf64-s390.c bfd/elf64-sh64.c bfd/elf64-sparc.c bfd/elf64-x86-64.c bfd/elfcode.h bfd/elflink.c bfd/elfn32-mips.c bfd/elfxx-ia64.c bfd/elfxx-mips.c bfd/elfxx-sparc.c bfd/elfxx-target.h bfd/hpux-core.c bfd/i386linux.c bfd/ieee.c bfd/libbfd-in.h bfd/libbfd.h bfd/libpei.h bfd/linker.c bfd/m68klinux.c bfd/merge.c bfd/mmo.c bfd/nlmcode.h bfd/osf-core.c bfd/pe-arm-wince.c bfd/pe-i386.c bfd/peXXigen.c bfd/pef.c bfd/pei-arm-wince.c bfd/pei-i386.c bfd/peicode.h bfd/po/BLD-POTFILES.in bfd/po/SRC-POTFILES.in bfd/reloc.c bfd/section.c bfd/som.c bfd/sparclinux.c bfd/stabs.c bfd/targets.c bfd/version.h bfd/vms-hdr.c config.guess config.sub config/ChangeLog config/tls.m4 configure configure.in gdb/ChangeLog gdb/ChangeLog-2004 gdb/Makefile.in gdb/NEWS gdb/ada-lex.l gdb/arch-utils.c gdb/arch-utils.h gdb/arm-tdep.c gdb/blockframe.c gdb/breakpoint.c gdb/cli/cli-cmds.c gdb/cli/cli-cmds.h gdb/cli/cli-decode.c gdb/cli/cli-setshow.c gdb/command.h gdb/configure.host gdb/configure.tgt gdb/defs.h gdb/doc/ChangeLog gdb/doc/gdb.texinfo gdb/doc/gdbint.texinfo gdb/doc/stabs.texinfo gdb/dwarf2loc.c gdb/dwarf2read.c gdb/eval.c gdb/exceptions.h gdb/exec.c gdb/expprint.c gdb/expression.h gdb/fork-child.c gdb/frame.c gdb/frame.h gdb/gcore.c gdb/gdbarch.c gdb/gdbarch.h gdb/gdbarch.sh gdb/gdbcmd.h gdb/gdbserver/ChangeLog gdb/gdbserver/acinclude.m4 gdb/gdbserver/config.in gdb/gdbserver/configure gdb/gdbserver/configure.ac gdb/gdbserver/configure.srv gdb/gdbserver/inferiors.c gdb/gdbserver/linux-low.c gdb/gdbserver/linux-low.h gdb/gdbserver/linux-s390-low.c gdb/gdbserver/remote-utils.c gdb/gdbserver/server.c gdb/gdbserver/server.h gdb/gdbserver/target.h gdb/gdbserver/thread-db.c gdb/infcall.c gdb/infcmd.c gdb/inferior.h gdb/infrun.c gdb/interps.c gdb/linux-fork.c gdb/linux-nat.c gdb/linux-thread-db.c gdb/m32c-tdep.c gdb/m68k-tdep.c gdb/memattr.c gdb/memattr.h gdb/mi/mi-cmd-stack.c gdb/minsyms.c gdb/monitor.c gdb/p-valprint.c gdb/parse.c gdb/parser-defs.h gdb/ppc-linux-tdep.c gdb/printcmd.c gdb/remote-sds.c gdb/remote-sim.c gdb/remote.c gdb/ser-mingw.c gdb/serial.c gdb/solib-svr4.c gdb/solib.c gdb/somread.c gdb/sparc-tdep.c gdb/stack.c gdb/symfile.c gdb/symtab.c gdb/symtab.h gdb/target.c gdb/target.h gdb/testsuite/ChangeLog gdb/testsuite/config/abug.exp gdb/testsuite/config/cpu32bug.exp gdb/testsuite/config/est.exp gdb/testsuite/config/hmsirom.exp gdb/testsuite/config/nind.exp gdb/testsuite/gdb.ada/array_return/p.adb gdb/testsuite/gdb.ada/array_return/pck.adb gdb/testsuite/gdb.ada/array_return/pck.ads gdb/testsuite/gdb.ada/arrayidx.exp gdb/testsuite/gdb.ada/exec_changed/first.adb gdb/testsuite/gdb.ada/exec_changed/second.adb gdb/testsuite/gdb.base/annota1.exp gdb/testsuite/gdb.base/args.c gdb/testsuite/gdb.base/args.exp gdb/testsuite/gdb.base/completion.exp gdb/testsuite/gdb.base/constvars.c gdb/testsuite/gdb.base/help.exp gdb/testsuite/gdb.base/maint.exp gdb/testsuite/gdb.base/multi-forks.exp gdb/testsuite/gdb.base/sepdebug.exp gdb/testsuite/gdb.cp/maint.exp gdb/testsuite/gdb.mi/mi-basics.exp gdb/testsuite/gdb.mi/mi-file.exp gdb/testsuite/gdb.mi/mi-stack.exp gdb/testsuite/gdb.mi/mi2-basics.exp gdb/testsuite/gdb.stabs/weird.exp gdb/testsuite/gdb.threads/manythreads.c gdb/testsuite/gdb.threads/manythreads.exp gdb/testsuite/gdb.trace/tracecmd.exp gdb/testsuite/lib/gdb.exp gdb/testsuite/lib/gdbserver-support.exp gdb/tui/tui-source.c gdb/utils.c gdb/valops.c gdb/version.in include/ChangeLog include/bfdlink.h include/coff/ChangeLog include/coff/external.h include/coff/internal.h include/coff/pe.h include/dis-asm.h include/elf/ChangeLog include/elf/arm.h include/elf/common.h include/elf/mips.h include/opcode/ChangeLog include/opcode/arm.h include/opcode/i386.h include/opcode/ppc.h intl/ChangeLog intl/Makefile.in intl/dgettext.c intl/dngettext.c libiberty/ChangeLog libiberty/Makefile.in libiberty/bcopy.c libiberty/configure libiberty/configure.ac libiberty/cp-demangle.c libiberty/floatformat.c libiberty/pex-win32.c libiberty/pexecute.txh libiberty/testsuite/Makefile.in libiberty/testsuite/demangle-expected opcodes/ChangeLog opcodes/Makefile.am opcodes/Makefile.in opcodes/arm-dis.c opcodes/configure opcodes/configure.in opcodes/cris-dis.c opcodes/disassemble.c opcodes/h8300-dis.c opcodes/i386-dis.c opcodes/ia64-gen.c opcodes/mips-dis.c opcodes/po/POTFILES.in opcodes/ppc-dis.c opcodes/ppc-opc.c opcodes/sh-dis.c readline/ChangeLog.gdb readline/Makefile.in readline/callback.c readline/terminal.c sim/ChangeLog sim/MAINTAINERS sim/common/ChangeLog sim/common/gentmap.c sim/common/sim-base.h sim/common/sim-fpu.c sim/common/sim-profile.c sim/cris/config.in sim/cris/configure sim/cris/configure.ac sim/cris/cris-sim.h sim/cris/sim-if.c sim/cris/traps.c sim/mips/ChangeLog sim/mips/Makefile.in sim/mips/configure.ac sim/mips/dsp.igen sim/mips/m16e.igen sim/mips/mips.igen sim/mips/sim-main.h sim/testsuite/ChangeLog sim/testsuite/sim/cris/c/clone5.c sim/testsuite/sim/cris/c/fcntl1.c sim/testsuite/sim/cris/c/mprotect1.c sim/testsuite/sim/cris/c/pipe2.c sim/testsuite/sim/cris/c/readlink2.c sim/testsuite/sim/cris/c/rtsigprocmask1.c sim/testsuite/sim/cris/c/rtsigsuspend1.c sim/testsuite/sim/cris/c/sig7.c sim/testsuite/sim/cris/c/sigreturn1.c sim/testsuite/sim/cris/c/sigreturn2.c sim/testsuite/sim/cris/c/syscall1.c sim/testsuite/sim/cris/c/syscall2.c sim/testsuite/sim/cris/c/sysctl2.c sim/testsuite/sim/mips/ChangeLog sim/testsuite/sim/mips/basic.exp sim/testsuite/sim/mips/testutils.inc Delete: bfd/coff-x86_64.c bfd/cpu-score.c bfd/cpu-spu.c bfd/elf32-score.c bfd/elf32-spu.c bfd/elf32-spu.h bfd/pe-x86_64.c bfd/pei-x86_64.c config/multi.m4 gdb/config/xtensa/xtensa.mt gdb/gdb_expat.h gdb/memory-map.c gdb/memory-map.h gdb/target-memory.c gdb/testsuite/gdb.ada/watch_arg.exp gdb/testsuite/gdb.ada/watch_arg/watch.adb gdb/testsuite/gdb.base/sepsymtab.c gdb/testsuite/gdb.base/sepsymtab.exp gdb/testsuite/gdb.base/subst.exp gdb/testsuite/gdb.cp/call-c-1.c gdb/testsuite/gdb.cp/call-c.cc gdb/testsuite/gdb.cp/call-c.exp gdb/testsuite/gdb.threads/tls-nodebug.c gdb/testsuite/gdb.threads/tls-nodebug.exp gdb/vec.c gdb/vec.h gdb/xml-support.c gdb/xml-support.h gdb/xtensa-config.c gdb/xtensa-tdep.c gdb/xtensa-tdep.h include/coff/x86_64.h include/elf/score.h include/elf/spu.h include/opcode/score-datadep.h include/opcode/score-inst.h include/opcode/spu-insns.h include/opcode/spu.h opcodes/score-dis.c opcodes/score-opc.h opcodes/spu-dis.c opcodes/spu-opc.c sim/mips/smartmips.igen sim/testsuite/sim/cris/asm/option3.ms sim/testsuite/sim/cris/asm/option4.ms sim/testsuite/sim/cris/c/clone6.c sim/testsuite/sim/cris/c/fcntl2.c sim/testsuite/sim/cris/c/mprotect2.c sim/testsuite/sim/cris/c/readlink11.c sim/testsuite/sim/cris/c/rtsigprocmask2.c sim/testsuite/sim/cris/c/rtsigsuspend2.c sim/testsuite/sim/cris/c/sig13.c sim/testsuite/sim/cris/c/sigreturn3.c sim/testsuite/sim/cris/c/sigreturn4.c sim/testsuite/sim/cris/c/syscall3.c sim/testsuite/sim/cris/c/syscall4.c sim/testsuite/sim/cris/c/syscall5.c sim/testsuite/sim/cris/c/syscall6.c sim/testsuite/sim/cris/c/syscall7.c sim/testsuite/sim/cris/c/syscall8.c sim/testsuite/sim/cris/c/sysctl3.c
Diffstat (limited to 'sim')
-rw-r--r--sim/ChangeLog34
-rw-r--r--sim/MAINTAINERS1
-rw-r--r--sim/common/ChangeLog22
-rw-r--r--sim/common/gentmap.c1
-rw-r--r--sim/common/sim-base.h4
-rw-r--r--sim/common/sim-fpu.c4
-rw-r--r--sim/common/sim-profile.c3
-rw-r--r--sim/cris/config.in108
-rwxr-xr-xsim/cris/configure4
-rw-r--r--sim/cris/configure.ac2
-rw-r--r--sim/cris/cris-sim.h3
-rw-r--r--sim/cris/sim-if.c30
-rw-r--r--sim/cris/traps.c331
-rw-r--r--sim/mips/ChangeLog25
-rw-r--r--sim/mips/Makefile.in11
-rw-r--r--sim/mips/configure.ac4
-rw-r--r--sim/mips/dsp.igen4
-rw-r--r--sim/mips/m16e.igen264
-rw-r--r--sim/mips/mips.igen6
-rw-r--r--sim/mips/sim-main.h1
-rw-r--r--sim/mips/smartmips.igen123
-rw-r--r--sim/testsuite/ChangeLog30
-rw-r--r--sim/testsuite/sim/cris/asm/option3.ms7
-rw-r--r--sim/testsuite/sim/cris/asm/option4.ms7
-rw-r--r--sim/testsuite/sim/cris/c/clone5.c5
-rw-r--r--sim/testsuite/sim/cris/c/clone6.c8
-rw-r--r--sim/testsuite/sim/cris/c/fcntl1.c7
-rw-r--r--sim/testsuite/sim/cris/c/fcntl2.c8
-rw-r--r--sim/testsuite/sim/cris/c/mprotect1.c5
-rw-r--r--sim/testsuite/sim/cris/c/mprotect2.c8
-rw-r--r--sim/testsuite/sim/cris/c/pipe2.c35
-rw-r--r--sim/testsuite/sim/cris/c/readlink11.c9
-rw-r--r--sim/testsuite/sim/cris/c/readlink2.c11
-rw-r--r--sim/testsuite/sim/cris/c/rtsigprocmask1.c10
-rw-r--r--sim/testsuite/sim/cris/c/rtsigprocmask2.c9
-rw-r--r--sim/testsuite/sim/cris/c/rtsigsuspend1.c5
-rw-r--r--sim/testsuite/sim/cris/c/rtsigsuspend2.c8
-rw-r--r--sim/testsuite/sim/cris/c/sig13.c8
-rw-r--r--sim/testsuite/sim/cris/c/sig7.c7
-rw-r--r--sim/testsuite/sim/cris/c/sigreturn1.c5
-rw-r--r--sim/testsuite/sim/cris/c/sigreturn2.c7
-rw-r--r--sim/testsuite/sim/cris/c/sigreturn3.c8
-rw-r--r--sim/testsuite/sim/cris/c/sigreturn4.c9
-rw-r--r--sim/testsuite/sim/cris/c/syscall1.c5
-rw-r--r--sim/testsuite/sim/cris/c/syscall2.c7
-rw-r--r--sim/testsuite/sim/cris/c/syscall3.c9
-rw-r--r--sim/testsuite/sim/cris/c/syscall4.c9
-rw-r--r--sim/testsuite/sim/cris/c/syscall5.c9
-rw-r--r--sim/testsuite/sim/cris/c/syscall6.c9
-rw-r--r--sim/testsuite/sim/cris/c/syscall7.c8
-rw-r--r--sim/testsuite/sim/cris/c/syscall8.c8
-rw-r--r--sim/testsuite/sim/cris/c/sysctl2.c5
-rw-r--r--sim/testsuite/sim/cris/c/sysctl3.c8
-rw-r--r--sim/testsuite/sim/mips/ChangeLog10
-rw-r--r--sim/testsuite/sim/mips/basic.exp26
-rw-r--r--sim/testsuite/sim/mips/testutils.inc2
56 files changed, 179 insertions, 1137 deletions
diff --git a/sim/ChangeLog b/sim/ChangeLog
index ac9d9e6..b68d793 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,37 +1,3 @@
-2006-10-02 Edgar E. Iglesias <edgar@axis.com>
- Hans-Peter Nilsson <hp@axis.com>
-
- * cris/cris-sim.h (enum cris_unknown_syscall_action_type)
- (cris_unknown_syscall_action): Declare.
- * cris/sim-if.c (cris_unknown_syscall_action): Define.
- (cris_options): Add cris-unknown-syscall option.
- (cris_option_handler): Correct comment about and error message for
- invalid --cris-cycles argument. Handle --cris-unknown-syscall.
- * cris/traps.c: Include stdarg.h
- (cris_unknown_syscall): New function.
- (cris_break_13_handler): Instead of sim_io_eprintf and
- sim_engine_halt, call cris_unknown_syscall to handle more or less
- unknown syscalls. Adjust code as necessary to handle return
- value.
-
-2006-09-30 Daniel Jacobowitz <dan@codesourcery.com>
-
- * MAINTAINERS: Add Dave Brolley for sh64.
-
-2006-09-30 Hans-Peter Nilsson <hp@axis.com>
-
- * cris/traps.c (TARGET_PIPE_BUF): New macro.
- (cris_pipe_empty): Correct initialization of "remaining". Only
- adjust the "write" return value if more than TARGET_PIPE_BUF bytes
- are written.
-
-2006-09-29 Hans-Peter Nilsson <hp@axis.com>
-
- * cris/configure.ac: Check for limits.h and sys/param.h.
- * cris/configure, cris/config.in: Rebuild.
- * cris/traps.c (SIM_PATHMAX): New macro.
- (cris_break_13_handler): Use SIM_PATHMAX, not MAXPATHLEN.
-
2006-08-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac (sparc-*-rtems*|sparc-*-elf*): Enable erc32 simulator.
diff --git a/sim/MAINTAINERS b/sim/MAINTAINERS
index d109e5c..a7e9f73 100644
--- a/sim/MAINTAINERS
+++ b/sim/MAINTAINERS
@@ -16,7 +16,6 @@ ppc Andrew Cagney <ac131313@redhat.com>
m68hc11 Stephane Carrez <stcarrez@nerim.fr>
mips Thiemo Seufer <ths@networkno.de>
sh (global maintainers)
-sh64 Dave Brolley <brolley@redhat.com>
m32c DJ Delorie <dj@redhat.com>
common Ben Elliston <bje@gnu.org>
common Frank Ch. Eigler <fche@redhat.com>
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 9d0b8d8..1768b40 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,25 +1,3 @@
-2006-11-07 Thiemo Seufer <ths@mips.com>
-
- * gentmap.c: Fix compile time warning.
-
-2006-11-07 Thiemo Seufer <ths@mips.com>
-
- * sim-base.h (text_start, text_end, start_addr): Use bfd_vma type
- for bfd text addresses.
-
-2006-08-29 Thiemo Seufer <ths@mips.com>
- Nigel Stephens <nigel@mips.com>
-
- * sim-fpu.c (pack_fpu): Handle QUIET_NAN correctly for
- SIM_QUIET_NAN_NEGATED.
-
-2006-08-29 Nigel Stephens <nigel@mips.com>
-
- * sim-profile.c (profile_pc_init): Initialise default profiling
- frequency to a prime number.
- (profile_print_pc): Convert gmon.out sample data into target
- byte order.
-
2006-06-13 Richard Earnshaw <rearnsha@arm.com>
* aclocal.m4: Pass ../../intl to ZW_GNU_GETTEXT_SISTER_DIR.
diff --git a/sim/common/gentmap.c b/sim/common/gentmap.c
index a4d3713..897a6f7 100644
--- a/sim/common/gentmap.c
+++ b/sim/common/gentmap.c
@@ -1,7 +1,6 @@
/* Generate targ-vals.h and targ-map.c. */
#include <stdio.h>
-#include <stdlib.h>
struct tdefs {
char *symbol;
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index 831768b..fde9847 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -181,13 +181,13 @@ typedef struct {
/* The program's text section. */
struct bfd_section *text_section;
/* Starting and ending text section addresses from the bfd. */
- bfd_vma text_start, text_end;
+ SIM_ADDR text_start, text_end;
#define STATE_TEXT_SECTION(sd) ((sd)->base.text_section)
#define STATE_TEXT_START(sd) ((sd)->base.text_start)
#define STATE_TEXT_END(sd) ((sd)->base.text_end)
/* Start address, set when the program is loaded from the bfd. */
- bfd_vma start_addr;
+ SIM_ADDR start_addr;
#define STATE_START_ADDR(sd) ((sd)->base.start_addr)
/* Size of the simulator's cache, if any.
diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c
index 4f7fbc9..d7d8600 100644
--- a/sim/common/sim-fpu.c
+++ b/sim/common/sim-fpu.c
@@ -213,11 +213,7 @@ pack_fpu (const sim_fpu *src,
/* force fraction to correct class */
fraction = src->fraction;
fraction >>= NR_GUARDS;
-#ifdef SIM_QUIET_NAN_NEGATED
- fraction |= QUIET_NAN;
-#else
fraction &= ~QUIET_NAN;
-#endif
break;
case sim_fpu_class_infinity:
sign = src->sign;
diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c
index 787b0e9..20d7a54 100644
--- a/sim/common/sim-profile.c
+++ b/sim/common/sim-profile.c
@@ -519,7 +519,7 @@ profile_pc_init (SIM_DESC sd)
int bucket_size;
/* fill in the frequency if not specified */
if (PROFILE_PC_FREQ (data) == 0)
- PROFILE_PC_FREQ (data) = 257;
+ PROFILE_PC_FREQ (data) = 256;
/* fill in the start/end if not specified */
if (PROFILE_PC_END (data) == 0)
{
@@ -700,7 +700,6 @@ profile_print_pc (sim_cpu *cpu, int verbose)
sample = 0xffff;
else
sample = PROFILE_PC_COUNT (profile) [loop];
- H2T (sample);
ok = fwrite (&sample, sizeof (sample), 1, pf);
}
if (ok == 0)
diff --git a/sim/cris/config.in b/sim/cris/config.in
index 41eb086..e69de29 100644
--- a/sim/cris/config.in
+++ b/sim/cris/config.in
@@ -1,108 +0,0 @@
-/* config.in. Generated from configure.ac by autoheader. */
-
-/* Define to 1 if translation of program messages to the user's native
- language is requested. */
-#undef ENABLE_NLS
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the <fpu_control.h> header file. */
-#undef HAVE_FPU_CONTROL_H
-
-/* Define to 1 if you have the `getrusage' function. */
-#undef HAVE_GETRUSAGE
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `nsl' library (-lnsl). */
-#undef HAVE_LIBNSL
-
-/* Define to 1 if you have the `socket' library (-lsocket). */
-#undef HAVE_LIBSOCKET
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `sigaction' function. */
-#undef HAVE_SIGACTION
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the `time' function. */
-#undef HAVE_TIME
-
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `__setfpucw' function. */
-#undef HAVE___SETFPUCW
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
diff --git a/sim/cris/configure b/sim/cris/configure
index 96bb0cc..4706527 100755
--- a/sim/cris/configure
+++ b/sim/cris/configure
@@ -4355,9 +4355,7 @@ sim_link_links="${sim_link_links} targ-vals.def"
# For dv-rv and rvdummy.
-
-
-for ac_header in sys/socket.h sys/select.h limits.h sys/param.h
+for ac_header in sys/socket.h sys/select.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac
index 6ff1c0e..a349d8d 100644
--- a/sim/cris/configure.ac
+++ b/sim/cris/configure.ac
@@ -10,7 +10,7 @@ sinclude(../common/aclocal.m4)
sinclude(../common/common.m4)
# For dv-rv and rvdummy.
-AC_CHECK_HEADERS(sys/socket.h sys/select.h limits.h sys/param.h)
+AC_CHECK_HEADERS(sys/socket.h sys/select.h)
SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
SIM_AC_OPTION_HOSTENDIAN
diff --git a/sim/cris/cris-sim.h b/sim/cris/cris-sim.h
index b2dc5b6..49a6f61 100644
--- a/sim/cris/cris-sim.h
+++ b/sim/cris/cris-sim.h
@@ -87,9 +87,6 @@ extern USI crisv32f_break_handler (SIM_CPU *, USI, USI);
extern USI cris_break_13_handler (SIM_CPU *, USI, USI, USI, USI, USI, USI,
USI, USI);
extern char cris_have_900000xxif;
-enum cris_unknown_syscall_action_type
- { CRIS_USYSC_MSG_STOP, CRIS_USYSC_MSG_ENOSYS, CRIS_USYSC_QUIET_ENOSYS };
-extern enum cris_unknown_syscall_action_type cris_unknown_syscall_action;
enum cris_interrupt_type { CRIS_INT_NMI, CRIS_INT_RESET, CRIS_INT_INT };
extern int crisv10deliver_interrupt (SIM_CPU *,
enum cris_interrupt_type,
diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c
index bfa360c..86d19b2 100644
--- a/sim/cris/sim-if.c
+++ b/sim/cris/sim-if.c
@@ -80,10 +80,6 @@ static char cris_bare_iron = 0;
/* Whether 0x9000000xx have simulator-specific meanings. */
char cris_have_900000xxif = 0;
-/* What to do when we face a more or less unknown syscall. */
-enum cris_unknown_syscall_action_type cris_unknown_syscall_action
- = CRIS_USYSC_MSG_STOP;
-
/* Records simulator descriptor so utilities like cris_dump_regs can be
called from gdb. */
SIM_DESC current_state;
@@ -94,7 +90,6 @@ typedef enum {
OPTION_CRIS_TRACE,
OPTION_CRIS_NAKED,
OPTION_CRIS_900000XXIF,
- OPTION_CRIS_UNKNOWN_SYSCALL
} CRIS_OPTIONS;
static const OPTION cris_options[] =
@@ -113,10 +108,6 @@ static const OPTION cris_options[] =
{ {"cris-900000xx", no_argument, NULL, OPTION_CRIS_900000XXIF},
'\0', NULL, "Define addresses at 0x900000xx with simulator semantics",
cris_option_handler, NULL },
- { {"cris-unknown-syscall", required_argument, NULL,
- OPTION_CRIS_UNKNOWN_SYSCALL},
- '\0', "stop|enosys|enosys-quiet", "Action at an unknown system call",
- cris_option_handler, NULL },
{ {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL, NULL }
};
@@ -161,9 +152,9 @@ cris_option_handler (SIM_DESC sd, sim_cpu *cpu ATTRIBUTE_UNUSED, int opt,
*tracefp = FLAG_CRIS_MISC_PROFILE_ALL;
else
{
- /* Beware; the framework does not handle the error case;
- we have to do it ourselves. */
- sim_io_eprintf (sd, "Unknown option `--cris-cycles=%s'\n", arg);
+ /* We'll actually never get here; the caller handles the
+ error case. */
+ sim_io_eprintf (sd, "Unknown option `--cris-stats=%s'\n", arg);
return SIM_RC_FAIL;
}
break;
@@ -186,21 +177,6 @@ cris_option_handler (SIM_DESC sd, sim_cpu *cpu ATTRIBUTE_UNUSED, int opt,
cris_have_900000xxif = 1;
break;
- case OPTION_CRIS_UNKNOWN_SYSCALL:
- if (strcmp (arg, "enosys") == 0)
- cris_unknown_syscall_action = CRIS_USYSC_MSG_ENOSYS;
- else if (strcmp (arg, "enosys-quiet") == 0)
- cris_unknown_syscall_action = CRIS_USYSC_QUIET_ENOSYS;
- else if (strcmp (arg, "stop") == 0)
- cris_unknown_syscall_action = CRIS_USYSC_MSG_STOP;
- else
- {
- sim_io_eprintf (sd, "Unknown option `--cris-unknown-syscall=%s'\n",
- arg);
- return SIM_RC_FAIL;
- }
- break;
-
default:
/* We'll actually never get here; the caller handles the error
case. */
diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index 3d80911..2eb0a1b 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "bfd.h"
/* FIXME: get rid of targ-vals.h usage everywhere else. */
-#include <stdarg.h>
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
@@ -39,21 +38,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-/* For PATH_MAX, originally. */
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
-/* From ld/sysdep.h. */
-#ifdef PATH_MAX
-# define SIM_PATHMAX PATH_MAX
-#else
-# ifdef MAXPATHLEN
-# define SIM_PATHMAX MAXPATHLEN
-# else
-# define SIM_PATHMAX 1024
-# endif
-#endif
/* The verbatim values are from asm-cris/unistd.h. */
@@ -241,9 +225,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define TARGET___WALL 0x40000000
#define TARGET___WCLONE 0x80000000
-/* From linux/limits.h. */
-#define TARGET_PIPE_BUF 4096
-
static const char stat_map[] =
"st_dev,2:space,10:space,4:st_mode,4:st_nlink,4:st_uid,4"
":st_gid,4:st_rdev,2:space,10:st_size,8:st_blksize,4:st_blocks,4"
@@ -1350,31 +1331,6 @@ make_first_thread (SIM_CPU *current_cpu)
abort ();
}
-/* Handle unknown system calls. Returns (if it does) the syscall
- return value. */
-
-static USI
-cris_unknown_syscall (SIM_CPU *current_cpu, USI pc, char *s, ...)
-{
- SIM_DESC sd = CPU_STATE (current_cpu);
- host_callback *cb = STATE_CALLBACK (sd);
-
- if (cris_unknown_syscall_action == CRIS_USYSC_MSG_STOP
- || cris_unknown_syscall_action == CRIS_USYSC_MSG_ENOSYS)
- {
- va_list ap;
-
- va_start (ap, s);
- sim_io_evprintf (sd, s, ap);
- va_end (ap);
-
- if (cris_unknown_syscall_action == CRIS_USYSC_MSG_STOP)
- sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped, SIM_SIGILL);
- }
-
- return -cb_host_to_target_errno (cb, ENOSYS);
-}
-
/* Main function: the handler of the "break 13" syscall insn. */
USI
@@ -1493,17 +1449,16 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
}
/* FALLTHROUGH */
default:
- /* Nothing else is implemented. */
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented %s syscall "
- "(fd: 0x%lx: cmd: 0x%lx arg: "
- "0x%lx)\n",
- callnum == TARGET_SYS_fcntl
- ? "fcntl" : "fcntl64",
- (unsigned long) (USI) arg1,
- (unsigned long) (USI) arg2,
- (unsigned long) (USI) arg3);
+ /* Abort for all other cases. */
+ sim_io_eprintf (sd, "Unimplemented %s syscall "
+ "(fd: 0x%lx: cmd: 0x%lx arg: 0x%lx)\n",
+ callnum == TARGET_SYS_fcntl
+ ? "fcntl" : "fcntl64",
+ (unsigned long) (USI) arg1,
+ (unsigned long) (USI) arg2,
+ (unsigned long) (USI) arg3);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
break;
}
break;
@@ -1625,17 +1580,16 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|| (fd != (USI) -1 && prot != TARGET_PROT_READ)
|| pgoff != 0)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented mmap2 call "
- "(0x%lx, 0x%lx, 0x%lx, "
- "0x%lx, 0x%lx, 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2,
- (unsigned long) arg3,
- (unsigned long) arg4,
- (unsigned long) arg5,
- (unsigned long) arg6);
+ sim_io_eprintf (sd, "Unimplemented mmap2 call "
+ "(0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
+ (unsigned long) arg1,
+ (unsigned long) arg2,
+ (unsigned long) arg3,
+ (unsigned long) arg4,
+ (unsigned long) arg5,
+ (unsigned long) arg6);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
break;
}
else if (fd != (USI) -1)
@@ -1729,13 +1683,13 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|| !is_mapped (sd, &current_cpu->highest_mmapped_page, addr,
len))
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented mprotect call "
- "(0x%lx, 0x%lx, 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2,
- (unsigned long) arg3);
+ sim_io_eprintf (sd, "Unimplemented mprotect call "
+ "(0x%lx, 0x%lx, 0x%lx)\n",
+ (unsigned long) arg1,
+ (unsigned long) arg2,
+ (unsigned long) arg3);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
break;
}
@@ -1794,14 +1748,14 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|| rusagep != 0
|| current_cpu->thread_data == NULL)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented wait4 call "
- "(0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2,
- (unsigned long) arg3,
- (unsigned long) arg4);
+ sim_io_eprintf (sd, "Unimplemented wait4 call "
+ "(0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
+ (unsigned long) arg1,
+ (unsigned long) arg2,
+ (unsigned long) arg3,
+ (unsigned long) arg4);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
break;
}
@@ -1907,22 +1861,19 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
&& target_sa_flags != (TARGET_SA_RESTART|TARGET_SA_SIGINFO))
|| target_sa_handler == 0)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented rt_sigaction "
- "syscall "
- "(0x%lx, 0x%lx: "
- "[0x%x, 0x%x, 0x%x, "
- "{0x%x, 0x%x}], 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2,
- target_sa_handler,
- target_sa_flags,
- target_sa_restorer,
- target_sa_mask_low,
- target_sa_mask_high,
- (unsigned long) arg3);
- break;
+ sim_io_eprintf (sd, "Unimplemented rt_sigaction "
+ "syscall (0x%lx, "
+ "0x%lx: [0x%x, 0x%x, 0x%x, "
+ "{0x%x, 0x%x}], "
+ "0x%lx)\n",
+ (unsigned long) arg1,
+ (unsigned long) arg2,
+ target_sa_handler, target_sa_flags,
+ target_sa_restorer,
+ target_sa_mask_low, target_sa_mask_high,
+ (unsigned long) arg3);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
}
current_cpu->sighandler[signum] = target_sa_handler;
@@ -2043,14 +1994,11 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|| (buf.st_mode & S_IFIFO) == 0)
|| current_cpu->thread_data == NULL)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented poll syscall "
- "(0x%lx: [0x%x, 0x%x, x], "
- "0x%lx, 0x%lx)\n",
- (unsigned long) arg1, fd, events,
- (unsigned long) arg2,
- (unsigned long) arg3);
+ sim_io_eprintf (sd, "Unimplemented poll syscall "
+ "(0x%lx: [0x%x, 0x%x, x], 0x%lx, 0x%lx)\n",
+ (unsigned long) arg1, fd, events,
+ (unsigned long) arg2, (unsigned long) arg3);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped, SIM_SIGILL);
break;
}
@@ -2142,13 +2090,12 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
if (!((offs_hi == 0 && offs_lo >= 0)
|| (offs_hi == -1 && offs_lo < 0)))
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented llseek offset,"
- " fd %d: 0x%x:0x%x\n",
- fd, (unsigned) arg2,
- (unsigned) arg3);
- break;
+ sim_io_eprintf (sd,
+ "Unimplemented llseek offset,"
+ " fd %d: 0x%x:0x%x\n",
+ fd, (unsigned) arg2, (unsigned) arg3);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
}
s.func = TARGET_SYS_lseek;
@@ -2226,11 +2173,11 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
&& how != TARGET_SIG_SETMASK
&& how != TARGET_SIG_UNBLOCK)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented rt_sigprocmask "
- "syscall (0x%x, 0x%x, 0x%x)\n",
- arg1, arg2, arg3);
+ sim_io_eprintf (sd, "Unimplemented rt_sigprocmask syscall "
+ "(0x%x, 0x%x, 0x%x)\n", arg1, arg2, arg3);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
+ retval = 0;
break;
}
@@ -2301,19 +2248,17 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|| (current_cpu->thread_data[threadno].cpu_context_atsignal
== NULL))
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Invalid sigreturn syscall: "
- "no signal handler active "
- "(0x%lx, 0x%lx, 0x%lx, 0x%lx, "
- "0x%lx, 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2,
- (unsigned long) arg3,
- (unsigned long) arg4,
- (unsigned long) arg5,
- (unsigned long) arg6);
- break;
+ sim_io_eprintf (sd, "Invalid sigreturn syscall: no signal"
+ " handler active "
+ "(0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
+ (unsigned long) arg1,
+ (unsigned long) arg2,
+ (unsigned long) arg3,
+ (unsigned long) arg4,
+ (unsigned long) arg5,
+ (unsigned long) arg6);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
}
was_sigsuspended
@@ -2379,13 +2324,11 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
if (setsize != 8)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented rt_sigsuspend syscall"
- " arguments (0x%lx, 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2);
- break;
+ sim_io_eprintf (sd, "Unimplemented rt_sigsuspend syscall"
+ " arguments (0x%lx, 0x%lx)\n",
+ (unsigned long) arg1, (unsigned long) arg2);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
}
/* Don't change the signal mask if we're already in
@@ -2470,8 +2413,8 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
USI buf = arg1;
USI size = arg2;
- char *cwd = xmalloc (SIM_PATHMAX);
- if (cwd != getcwd (cwd, SIM_PATHMAX))
+ char *cwd = xmalloc (MAXPATHLEN);
+ if (cwd != getcwd (cwd, MAXPATHLEN))
abort ();
/* FIXME: When and if we support chdir, we need something
@@ -2497,8 +2440,8 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
SI path = arg1;
SI buf = arg2;
SI bufsiz = arg3;
- char *pbuf = xmalloc (SIM_PATHMAX);
- char *lbuf = xmalloc (SIM_PATHMAX);
+ char *pbuf = xmalloc (MAXPATHLEN);
+ char *lbuf = xmalloc (MAXPATHLEN);
char *lbuf_alloc = lbuf;
int nchars = -1;
int i;
@@ -2510,7 +2453,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
o += strlen (simulator_sysroot);
}
- for (i = 0; i + o < SIM_PATHMAX; i++)
+ for (i = 0; i + o < MAXPATHLEN; i++)
{
pbuf[i + o]
= sim_core_read_unaligned_1 (current_cpu, pc, 0, path + i);
@@ -2518,7 +2461,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
break;
}
- if (i + o == SIM_PATHMAX)
+ if (i + o == MAXPATHLEN)
{
retval = -cb_host_to_target_errno (cb, ENAMETOOLONG);
break;
@@ -2535,12 +2478,12 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
if (argv0 == NULL || *argv0 == '.')
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented readlink syscall "
- "(0x%lx: [\"%s\"], 0x%lx)\n",
- (unsigned long) arg1, pbuf,
- (unsigned long) arg2);
+ sim_io_eprintf (sd, "Unimplemented readlink syscall "
+ "(0x%lx: [\"%s\"], 0x%lx)\n",
+ (unsigned long) arg1, pbuf,
+ (unsigned long) arg2);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
break;
}
else if (*argv0 == '/')
@@ -2554,8 +2497,8 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
}
else
{
- if (getcwd (lbuf, SIM_PATHMAX) != NULL
- && strlen (lbuf) + 2 + strlen (argv0) < SIM_PATHMAX)
+ if (getcwd (lbuf, MAXPATHLEN) != NULL
+ && strlen (lbuf) + 2 + strlen (argv0) < MAXPATHLEN)
{
if (strncmp (simulator_sysroot, lbuf,
strlen (simulator_sysroot)) == 0)
@@ -2570,7 +2513,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
}
}
else
- nchars = readlink (pbuf, lbuf, SIM_PATHMAX);
+ nchars = readlink (pbuf, lbuf, MAXPATHLEN);
/* We trust that the readlink result returns a *relative*
link, or one already adjusted for the file-path-prefix.
@@ -2773,19 +2716,19 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
break;
}
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented _sysctl syscall "
- "(0x%lx: [0x%lx, 0x%lx],"
- " 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
- (unsigned long) name,
- (unsigned long) name0,
- (unsigned long) name1,
- (unsigned long) nlen,
- (unsigned long) oldval,
- (unsigned long) oldlenp,
- (unsigned long) newval,
- (unsigned long) newlen);
+ sim_io_eprintf (sd, "Unimplemented _sysctl syscall "
+ "(0x%lx: [0x%lx, 0x%lx],"
+ " 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
+ (unsigned long) name,
+ (unsigned long) name0,
+ (unsigned long) name1,
+ (unsigned long) nlen,
+ (unsigned long) oldval,
+ (unsigned long) oldlenp,
+ (unsigned long) newval,
+ (unsigned long) newlen);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
break;
}
@@ -2858,13 +2801,11 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
| TARGET_CLONE_SIGHAND)
|| newsp == 0)
{
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented clone syscall "
- "(0x%lx, 0x%lx)\n",
- (unsigned long) arg1,
- (unsigned long) arg2);
- break;
+ sim_io_eprintf (sd,
+ "Unimplemented clone syscall (0x%lx, 0x%lx)\n",
+ (unsigned long) arg1, (unsigned long) arg2);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
}
if (current_cpu->thread_data == NULL)
@@ -2927,12 +2868,11 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
unimplemented_syscall:
default:
- retval
- = cris_unknown_syscall (current_cpu, pc,
- "Unimplemented syscall: %d "
- "(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x)\n",
- callnum, arg1, arg2, arg3, arg4, arg5,
- arg6);
+ sim_io_eprintf (sd, "Unimplemented syscall: %d "
+ "(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x)\n", callnum,
+ arg1, arg2, arg3, arg4, arg5, arg6);
+ sim_engine_halt (sd, current_cpu, NULL, pc, sim_stopped,
+ SIM_SIGILL);
}
}
@@ -2942,7 +2882,6 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
current_cpu->last_open_fd = retval;
current_cpu->last_open_flags = arg2;
}
-
current_cpu->last_syscall = callnum;
/* A system call is a rescheduling point. For the time being, we don't
@@ -3017,14 +2956,13 @@ cris_pipe_nonempty (host_callback *cb ATTRIBUTE_UNUSED,
static void
cris_pipe_empty (host_callback *cb,
- int reader,
+ int reader ATTRIBUTE_UNUSED,
int writer)
{
int i;
SIM_CPU *cpu = current_cpu_for_cb_callback;
bfd_byte r10_buf[4];
- int remaining
- = cb->pipe_buffer[writer].size - cb->pipe_buffer[reader].size;
+ int remaining = cb->pipe_buffer[writer].size;
/* We need to find the thread that waits for this pipe. */
for (i = 0; i < SIM_TARGET_MAX_THREADS; i++)
@@ -3032,7 +2970,6 @@ cris_pipe_empty (host_callback *cb,
&& cpu->thread_data[i].pipe_write_fd == writer)
{
int retval;
-
/* Temporarily switch to this cpu context, so we can change the
PC by ordinary calls. */
@@ -3043,25 +2980,19 @@ cris_pipe_empty (host_callback *cb,
cpu->thread_data[i].cpu_context,
cpu->thread_cpu_data_size);
- /* The return value is supposed to contain the number of
- written bytes, which is the number of bytes requested and
- returned at the write call. You might think the right
- thing is to adjust the return-value to be only the
- *consumed* number of bytes, but it isn't. We're only
- called if the pipe buffer is fully consumed or it is being
- closed, possibly with remaining bytes. For the latter
- case, the writer is still supposed to see success for
- PIPE_BUF bytes (a constant which we happen to know and is
- unlikely to change). The return value may also be a
- negative number; an error value. This case is covered
- because "remaining" is always >= 0. */
+ /* The return value is supposed to contain the number of written
+ bytes, which is the number of bytes requested and returned at
+ the write call. We subtract the remaining bytes from that,
+ but making sure we still get a positive number.
+ The return value may also be a negative number; an error
+ value. We cover this case by comparing against remaining,
+ which is always >= 0. */
(*CPU_REG_FETCH (cpu)) (cpu, H_GR_R10, r10_buf, 4);
retval = (int) bfd_getl_signed_32 (r10_buf);
- if (retval - remaining > TARGET_PIPE_BUF)
- {
- bfd_putl32 (retval - remaining, r10_buf);
- (*CPU_REG_STORE (cpu)) (cpu, H_GR_R10, r10_buf, 4);
- }
+ if (retval >= remaining)
+ bfd_putl32 (retval - remaining, r10_buf);
+ (*CPU_REG_STORE (cpu)) (cpu, H_GR_R10, r10_buf, 4);
+
sim_pc_set (cpu, sim_pc_get (cpu) + 2);
memcpy (cpu->thread_data[i].cpu_context,
&cpu->cpu_data_placeholder,
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 2f867b5..6ea29d6 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,28 +1,3 @@
-2006-11-07 Thiemo Seufer <ths@mips.com>
-
- * dsp.igen (do_w_op): Fix compiler warning.
-
-2006-08-29 Thiemo Seufer <ths@mips.com>
- David Ung <davidu@mips.com>
-
- * configure.ac (mipsisa32r2*-*-*, mipsisa32*-*-*): Add smartmips to
- sim_igen_machine.
- * configure: Regenerate.
- * mips.igen (model): Add smartmips.
- (MADDU): Increment ACX if carry.
- (do_mult): Clear ACX.
- (ROR,RORV): Add smartmips.
- (include): Include smartmips.igen.
- * sim-main.h (ACX): Set to REGISTERS[89].
- * smartmips.igen: New file.
-
-2006-08-29 Thiemo Seufer <ths@mips.com>
- David Ung <davidu@mips.com>
-
- * Makefile.in (IGEN_INCLUDE): Add missing includes for m16e.igen and
- mips3264r2.igen. Add missing dependency rules.
- * m16e.igen: Support for mips16e save/restore instructions.
-
2006-06-13 Richard Earnshaw <rearnsha@arm.com>
* configure: Regenerated.
diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in
index 817dcdf..9c3e838 100644
--- a/sim/mips/Makefile.in
+++ b/sim/mips/Makefile.in
@@ -92,14 +92,12 @@ IGEN_DC=$(srcdir)/mips.dc
M16_DC=$(srcdir)/m16.dc
IGEN_INCLUDE=\
$(srcdir)/m16.igen \
- $(srcdir)/m16e.igen \
$(srcdir)/mdmx.igen \
$(srcdir)/mips3d.igen \
$(srcdir)/sb1.igen \
$(srcdir)/tx.igen \
$(srcdir)/vr.igen \
$(srcdir)/dsp.igen \
- $(srcdir)/mips3264r2.igen \
# NB: Since these can be built by a number of generators, care
# must be taken to ensure that they are only dependant on
@@ -186,15 +184,8 @@ support.o: sim-main.h support.c $(SIM_EXTRA_DEPS)
idecode.o: sim-main.h idecode.c $(SIM_EXTRA_DEPS)
itable.o: sim-main.h itable.c $(SIM_EXTRA_DEPS)
-m16_semantics.o: sim-main.h m16_semantics.c $(SIM_EXTRA_DEPS)
-m16_support.o: sim-main.h m16_support.c $(SIM_EXTRA_DEPS)
-m16_idecode.o: sim-main.h m16_idecode.c $(SIM_EXTRA_DEPS)
-m16_icache.o: sim-main.h m16_icache.c $(SIM_EXTRA_DEPS)
-m32_semantics.o: sim-main.h m32_semantics.c $(SIM_EXTRA_DEPS)
-m32_support.o: sim-main.h m32_support.c $(SIM_EXTRA_DEPS)
-m32_idecode.o: sim-main.h m32_idecode.c $(SIM_EXTRA_DEPS)
-m32_icache.o: sim-main.h m32_icache.c $(SIM_EXTRA_DEPS)
+
BUILT_SRC_FROM_M16 = \
m16_icache.h \
diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac
index 19a9d49..f81abbb 100644
--- a/sim/mips/configure.ac
+++ b/sim/mips/configure.ac
@@ -146,13 +146,13 @@ case "${target}" in
sim_m16_filter="16"
;;
mipsisa32r2*-*-*) sim_gen=M16
- sim_igen_machine="-M mips32r2,mips16,mips16e,dsp,smartmips"
+ sim_igen_machine="-M mips32r2,mips16,mips16e,dsp"
sim_m16_machine="-M mips16,mips16e,mips32r2"
sim_igen_filter="32,f"
sim_mach_default="mipsisa32r2"
;;
mipsisa32*-*-*) sim_gen=M16
- sim_igen_machine="-M mips32,mips16,mips16e,dsp,smartmips"
+ sim_igen_machine="-M mips32,mips16,mips16e,dsp"
sim_m16_machine="-M mips16,mips16e,mips32"
sim_igen_filter="32,f"
sim_mach_default="mipsisa32"
diff --git a/sim/mips/dsp.igen b/sim/mips/dsp.igen
index 0b337cc..18aafcb 100644
--- a/sim/mips/dsp.igen
+++ b/sim/mips/dsp.igen
@@ -69,10 +69,10 @@
h0 = (signed64)h1 + (signed64)h2;
else // SUB
h0 = (signed64)h1 - (signed64)h2;
- if (((h0 & 0x100000000LL) >> 1) != (h0 & 0x80000000))
+ if (((h0 & 0x100000000) >> 1) != (h0 & 0x80000000))
{
DSPCR |= DSPCR_OUFLAG4;
- if (h0 & 0x100000000LL)
+ if (h0 & 0x100000000)
h0 = 0x80000000;
else
h0 = 0x7fffffff;
diff --git a/sim/mips/m16e.igen b/sim/mips/m16e.igen
index 8808906..2d7a073 100644
--- a/sim/mips/m16e.igen
+++ b/sim/mips/m16e.igen
@@ -103,267 +103,3 @@
RA = NIA;
NIA = GPR[TRX];
}
-
-
-// format routines for save/restore
-:%s::::RAS:int ras
-*mips16e
-{
- static char buf[10];
- buf[0] = '\0';
- if (ras & 4)
- strcat (buf,"ra,");
- if (ras & 2)
- strcat (buf,"s0,");
- if (ras & 1)
- strcat (buf,"s1,");
- return (buf);
-}
-
-:%s::::XSREGS:int xsregs
-*mips16e
-{
- if (xsregs > 6)
- return "s2,s3,s4,s5,s6,s7,s8,";
- if (xsregs > 5)
- return "s2,s3,s4,s5,s6,s7,";
- if (xsregs > 4)
- return "s2,s3,s4,s5,s6,";
- if (xsregs > 3)
- return "s2,s3,s4,s5,";
- if (xsregs > 2)
- return "s2,s3,s4,";
- if (xsregs > 1)
- return "s2,s3,";
- if (xsregs > 0)
- return "s2,";
- return "";
-}
-
-:%s::::AREGS:int aregs
-*mips16e
-{
- // Fixme: how is the arg/static distinction made by the assembler?
- static const char * const aregstr[16] = {
- "",
- "A3,",
- "A2,A3,",
- "A1,A2,A3,",
- "A0,A1,A2,A3,",
- "a0,",
- "a0,A3,",
- "a0,A2,A3,",
- "a0,A1,A2,A3,",
- "a0,a1,",
- "a0,a1,A3,",
- "a0,a1,A2,A3,",
- "a0,a1,a2,",
- "a0,a1,a2,A3,",
- "?,"
- };
- return aregstr[aregs];
-}
-
-:compute:::int:SFRAME:FS:((FS == 0) ? 128 \: (FS << 3))
-:compute:::int:BFRAME:FSHI,FSLO:(((FSHI << 4) | FSLO) << 3)
-
-:function:::void:do_save:int xsregs, int aregs, int ras0s1, int framesize
-{
- unsigned_word temp;
- int args, astatic;
-
- temp = GPR[29];
-
- /* writes are in the same order as the hardware description... */
- switch (aregs) {
- case 0: case 1: case 2: case 3: case 11:
- args = 0;
- break;
- case 4: case 5: case 6: case 7:
- args = 1;
- break;
- case 8: case 9: case 10:
- args = 2;
- break;
- case 12: case 13:
- args = 3;
- break;
- case 14:
- args = 4;
- break;
- default:
- sim_engine_abort (SD, CPU, CIA, "save: aregs=%d causes unpredictable results\n", aregs);
- }
- if (args > 0) {
- do_store (SD_, AccessLength_WORD, temp, 0, GPR[4]);
- if (args > 1) {
- do_store (SD_,AccessLength_WORD, temp, 4 , GPR[5]);
- if (args > 2) {
- do_store (SD_,AccessLength_WORD, temp, 8 , GPR[6]);
- if (args > 3) {
- do_store (SD_,AccessLength_WORD, temp, 12, GPR[7]);
- }
- }
- }
- }
-
- if (ras0s1 & 4)
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[31]);
-
- switch (xsregs) {
- case 7:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[30]);
- case 6:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[23]);
- case 5:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[22]);
- case 4:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[21]);
- case 3:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[20]);
- case 2:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[19]);
- case 1:
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[18]);
- }
-
- if (ras0s1 & 1)
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[17]);
- if (ras0s1 & 2)
- do_store (SD_,AccessLength_WORD, temp -= 4, 0, GPR[16]);
-
- switch (aregs) {
- case 0: case 4: case 8: case 12: case 14:
- astatic = 0;
- break;
- case 1: case 5: case 9: case 13:
- astatic = 1;
- break;
- case 2: case 6: case 10:
- astatic = 2;
- break;
- case 3: case 7:
- astatic = 3;
- break;
- case 11:
- astatic = 4;
- break;
- default:
- sim_engine_abort (SD, CPU, CIA, "save: aregs=%d causes unpredictable results\n", aregs);
- }
- if (astatic > 0) {
- do_store (SD_, AccessLength_WORD, temp -= 4, 0, GPR[7]);
- if (astatic > 1) {
- do_store (SD_, AccessLength_WORD, temp -= 4, 0, GPR[6]);
- if (astatic > 2) {
- do_store (SD_, AccessLength_WORD, temp -= 4, 0, GPR[5]);
- if (astatic > 3) {
- do_store (SD_, AccessLength_WORD, temp -= 4, 0, GPR[4]);
- }
- }
- }
- }
-
- GPR[29] -= framesize;
-}
-
-01100,100,1,3.RAS,4.FS:I8:16::SAVE
-"save %s<RAS>,<SFRAME>"
-*mips16e
-{
- do_save (SD_, 0, 0, RAS, SFRAME);
-}
-
-
-11110,3.XSREGS,4.FSHI,4.AREGS + 01100,100,1,3.RAS,4.FSLO:EXT-I8:16::SAVE
-"save %s<RAS>%s<XSREGS>%s<AREGS><BFRAME>"
-*mips16e
-{
- do_save (SD_, XSREGS, AREGS, RAS, BFRAME);
-}
-
-
-:function:::void:do_restore:int xsregs, int aregs, int ras0s1, int framesize
-*mips16e
-{
- unsigned_word temp, temp2;
- int astatic;
-
- temp = GPR[29] + framesize;
- temp2 = temp;
-
- /* reads are in the same order as the hardware description... */
-
- if (ras0s1 & 4)
- GPR[31] = EXTEND32 (do_load(SD_, AccessLength_WORD, temp -= 4, 0));
-
- switch (xsregs) {
- case 7:
- GPR[30] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- case 6:
- GPR[23] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- case 5:
- GPR[22] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- case 4:
- GPR[21] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- case 3:
- GPR[20] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- case 2:
- GPR[19] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- case 1:
- GPR[18] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- }
-
- if (ras0s1 & 1)
- GPR[17] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- if (ras0s1 & 2)
- GPR[16] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
-
- switch (aregs) {
- case 0: case 4: case 8: case 12: case 14:
- astatic = 0;
- break;
- case 1: case 5: case 9: case 13:
- astatic = 1;
- break;
- case 2: case 6: case 10:
- astatic = 2;
- break;
- case 3: case 7:
- astatic = 3;
- break;
- case 11:
- astatic = 4;
- break;
- default:
- sim_engine_abort (SD, CPU, CIA, "save: aregs=%d causes unpredictable results\n", aregs);
- }
- if (astatic > 0) {
- GPR[7] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- if (astatic > 1) {
- GPR[6] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- if (astatic > 2) {
- GPR[5] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- if (astatic > 3) {
- GPR[4] = EXTEND32 (do_load (SD_,AccessLength_WORD, temp -= 4, 0));
- }
- }
- }
- }
-
- GPR[29] = temp2;
-}
-
-01100,100,0,3.RAS,4.FS:I8:16::RESTORE
-"restore %s<RAS>,<SFRAME>"
-*mips16e
-{
- do_restore (SD_,0,0,RAS,SFRAME);
-}
-
-11110,3.XSREGS,4.FSHI,4.AREGS + 01100,100,0,3.RAS,4.FSLO:EXT-I8:16::RESTORE
-"restore %s<RAS>%s<XSREGS>%s<AREGS><BFRAME>"
-*mips16e
-{
- do_restore (SD_,XSREGS,AREGS,RAS,BFRAME);
-}
diff --git a/sim/mips/mips.igen b/sim/mips/mips.igen
index 85d08ea..e179cf0 100644
--- a/sim/mips/mips.igen
+++ b/sim/mips/mips.igen
@@ -72,7 +72,6 @@
:model:::mips3d:mips3d: // mips3d.igen
:model:::mdmx:mdmx: // mdmx.igen
:model:::dsp:dsp: // dsp.igen
-:model:::smartmips:smartmips: // smartmips.igen
// Vendor Extensions
//
@@ -2458,7 +2457,6 @@
TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
temp = (U8_4 (VL4_8 (HI), VL4_8 (LO))
+ ((unsigned64) VL4_8 (GPR[RS]) * (unsigned64) VL4_8 (GPR[RT])));
- ACX += U8_4 (VL4_8 (HI), VL4_8 (LO)) < temp; /* SmartMIPS */
LO = EXTEND32 (temp);
HI = EXTEND32 (VH4_8 (temp));
TRACE_ALU_RESULT2 (HI, LO);
@@ -2660,7 +2658,6 @@
* ((signed64)(signed32) GPR[rt]));
LO = EXTEND32 (VL4_8 (prod));
HI = EXTEND32 (VH4_8 (prod));
- ACX = 0; /* SmartMIPS */
if (rd != 0)
GPR[rd] = LO;
TRACE_ALU_RESULT2 (HI, LO);
@@ -2853,7 +2850,6 @@
"ror r<RD>, r<RT>, <SHIFT>"
*mips32r2:
*mips64r2:
-*smartmips:
*vr5400:
*vr5500:
{
@@ -2864,7 +2860,6 @@
"rorv r<RD>, r<RT>, r<RS>"
*mips32r2:
*mips64r2:
-*smartmips:
*vr5400:
*vr5500:
{
@@ -5688,5 +5683,4 @@
:include:::tx.igen
:include:::vr.igen
:include:::dsp.igen
-:include:::smartmips.igen
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index b300f07..76e6374 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -348,7 +348,6 @@ struct _sim_cpu {
#define Debug (REGISTERS[86])
#define DEPC (REGISTERS[87])
#define EPC (REGISTERS[88])
-#define ACX (REGISTERS[89])
#define AC0LOIDX (33) /* Must be the same register as LO */
#define AC0HIIDX (34) /* Must be the same register as HI */
diff --git a/sim/mips/smartmips.igen b/sim/mips/smartmips.igen
deleted file mode 100644
index 31d3a4b..0000000
--- a/sim/mips/smartmips.igen
+++ /dev/null
@@ -1,123 +0,0 @@
-// -*- C -*-
-//
-// Simulator definition for the SmartMIPS extensions.
-// Copyright (C) 2005 Free Software Foundation, Inc.
-// Contributed by Nigel Stephens (nigel@mips.com) and
-// David Ung (davidu@mips.com) of MIPS Technologies.
-//
-// This file is part of GDB, the GNU debugger.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-011100,5.BASE,5.INDEX,5.RD,00010,001000:SPECIAL:32::LWXS
-"lwxs r<RD>, <INDEX>(r<BASE>)"
-*smartmips:
-{
- GPR[RD] = EXTEND32 (do_load(SD_, AccessLength_WORD, GPR[BASE], GPR[INDEX]<<2));
-}
-
-011100,5.RS,5.RT,00000,10001,000001:SPECIAL:32::MADDP
-"maddp r<RS>, r<RT>"
-*smartmips:
-{
- unsigned64 res;
- unsigned64 rs, rt;
- int i;
-
- check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
- TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
-
- res = 0;
- rs = GPR[RS];
- rt = GPR[RT];
- for (i = 0; i < 32; i++)
- {
- if (rs & 1)
- res ^= rt;
- rs >>= 1;
- rt <<= 1;
- }
- LO ^= EXTEND32 (VL4_8 (res));
- HI ^= EXTEND32 (VH4_8 (res));
- TRACE_ALU_RESULT2 (HI, LO);
-}
-
-
-000000,0000000000,5.RD,00001,010010:SPECIAL:32::MFLHXU
-"mflhxu r<RD>"
-*smartmips:
-{
- check_mf_hilo (SD_, HIHISTORY, LOHISTORY);
- TRACE_ALU_INPUT3 (ACX,HI,LO);
- GPR[RD] = LO;
- LO = HI;
- HI = ACX;
- ACX = 0;
- TRACE_ALU_RESULT4 (ACX,HI,LO,GPR[RD]);
-}
-
-000000,5.RS,000000000000001,010011:SPECIAL:32::MTLHX
-"mtlhx r<RS>"
-*smartmips:
-{
- check_mf_hilo (SD_, HIHISTORY, LOHISTORY);
- TRACE_ALU_INPUT3 (HI,LO,GPR[RS]);
- ACX = HI;
- HI = LO;
- LO = GPR[RS];
- TRACE_ALU_RESULT4 (ACX,HI,LO,GPR[RS]);
-}
-
-000000,5.RS,5.RT,00000,10001,011001:SPECIAL:32::MULTP
-"multp r<RS>, r<RT>"
-*smartmips:
-{
- unsigned64 res;
- unsigned64 rs, rt;
- int i;
- check_mult_hilo (SD_, HIHISTORY, LOHISTORY);
- TRACE_ALU_INPUT2 (GPR[RS], GPR[RT]);
-
- res = 0;
- rs = GPR[RS];
- rt = GPR[RT];
- for (i = 0; i < 32; i++)
- {
- if (rs & 1)
- res ^= rt;
- rs >>= 1;
- rt <<= 1;
- }
- LO = EXTEND32 (VL4_8 (res));
- HI = EXTEND32 (VH4_8 (res));
- ACX = 0;
- TRACE_ALU_RESULT2 (HI, LO);
-}
-
-011100,5.RS,5.RT,00000,10010,000001:SPECIAL:32::PPERM
-"pperm r<RS>, r<RT>"
-*smartmips:
-{
- int i;
- ACX = (ACX << 6) | MSEXTRACTED(HI,26,31);
- HI = EXTEND32 ((HI << 6) | MSEXTRACTED(LO,26,31));
- LO = EXTEND32 (LO << 6);
- for (i = 0; i < 6; i++) {
- int sbit = 5*i;
- int ebit = sbit + 4;
- int tbit = EXTRACTED(GPR[RT],sbit,ebit);
- LO |= MSEXTRACTED(GPR[RS],tbit,tbit) << i;
- }
-}
diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index c7c0acc..061b45d 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -1,33 +1,3 @@
-2006-10-02 Hans-Peter Nilsson <hp@axis.com>
- Edgar E. Iglesias <edgar@axis.com>
-
- * sim/cris/c/clone5.c, sim/cris/c/mprotect1.c,
- sim/cris/c/rtsigprocmask1.c, sim/cris/c/rtsigsuspend1.c,
- sim/cris/c/sig7.c, sim/cris/c/sigreturn1.c,
- sim/cris/c/sigreturn2.c, sim/cris/c/syscall1.c,
- sim/cris/c/syscall2.c, sim/cris/c/sysctl2.c, sim/cris/c/fcntl1.c,
- sim/cris/c/readlink2.c: Add code to print ENOSYS if syscall being
- tested returns ENOSYS. Add early exit where needed. Change any
- existing code to print "xyzzy", not "pass".
- * sim/cris/asm/option3.ms, sim/cris/asm/option4.ms,
- sim/cris/c/clone6.c, sim/cris/c/fcntl2.c,
- sim/cris/c/mprotect2.c, sim/cris/c/readlink11.c,
- sim/cris/c/rtsigprocmask2.c, sim/cris/c/rtsigsuspend2.c,
- sim/cris/c/sig13.c, sim/cris/c/sigreturn3.c,
- sim/cris/c/sigreturn4.c, sim/cris/c/syscall3.c,
- sim/cris/c/syscall4.c, sim/cris/c/syscall5.c,
- sim/cris/c/syscall6.c, sim/cris/c/syscall7.c,
- sim/cris/c/syscall8.c, sim/cris/c/sysctl3.c: New tests.
-
-2006-09-30 Hans-Peter Nilsson <hp@axis.com>
-
- * sim/cris/c/pipe2.c: Adjust expected output.
- (process): Don't write as much to the pipe as to trig the
- inordinate-amount test in the sim pipe machinery. Correct test of
- write return-value; check only that pipemax bytes were
- successfully written. For error-case, emit strerror as well.
- (main): Add a second read.
-
2006-04-08 Hans-Peter Nilsson <hp@axis.com>
* sim/cris/hw/rv-n-cris/irq6.ms: New test.
diff --git a/sim/testsuite/sim/cris/asm/option3.ms b/sim/testsuite/sim/cris/asm/option3.ms
deleted file mode 100644
index 75ddb44..0000000
--- a/sim/testsuite/sim/cris/asm/option3.ms
+++ /dev/null
@@ -1,7 +0,0 @@
-#mach: crisv0 crisv3 crisv8 crisv10 crisv32
-#sim: --cris-cycles=foo
-#xerror:
-#output: Unknown option `--cris-cycles=foo'\n
- .include "testutils.inc"
- start
- fail
diff --git a/sim/testsuite/sim/cris/asm/option4.ms b/sim/testsuite/sim/cris/asm/option4.ms
deleted file mode 100644
index e0bc691..0000000
--- a/sim/testsuite/sim/cris/asm/option4.ms
+++ /dev/null
@@ -1,7 +0,0 @@
-#mach: crisv0 crisv3 crisv8 crisv10 crisv32
-#sim: --cris-unknown-syscall=foo
-#xerror:
-#output: Unknown option `--cris-unknown-syscall=foo'\n
- .include "testutils.inc"
- start
- fail
diff --git a/sim/testsuite/sim/cris/c/clone5.c b/sim/testsuite/sim/cris/c/clone5.c
index 3444b56..b642a2f 100644
--- a/sim/testsuite/sim/cris/c/clone5.c
+++ b/sim/testsuite/sim/cris/c/clone5.c
@@ -11,7 +11,6 @@
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <errno.h>
int pip[2];
@@ -27,9 +26,7 @@ main (void)
int retcode;
long stack[16384];
- retcode = clone (process, (char *) stack + sizeof (stack) - 64, 0, "cba");
- if (retcode == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ clone (process, (char *) stack + sizeof (stack) - 64, 0, "cba");
printf ("xyzzy\n");
return 0;
}
diff --git a/sim/testsuite/sim/cris/c/clone6.c b/sim/testsuite/sim/cris/c/clone6.c
deleted file mode 100644
index 586b5c6..0000000
--- a/sim/testsuite/sim/cris/c/clone6.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "clone5.c"
diff --git a/sim/testsuite/sim/cris/c/fcntl1.c b/sim/testsuite/sim/cris/c/fcntl1.c
index 184fd64..e180841 100644
--- a/sim/testsuite/sim/cris/c/fcntl1.c
+++ b/sim/testsuite/sim/cris/c/fcntl1.c
@@ -7,13 +7,10 @@
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
int main (void)
{
- int err = fcntl (1, 42);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
- printf ("xyzzy\n");
+ fcntl (1, 42);
+ printf ("pass\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/fcntl2.c b/sim/testsuite/sim/cris/c/fcntl2.c
deleted file mode 100644
index fc9f95b..0000000
--- a/sim/testsuite/sim/cris/c/fcntl2.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "fcntl1.c"
diff --git a/sim/testsuite/sim/cris/c/mprotect1.c b/sim/testsuite/sim/cris/c/mprotect1.c
index 01d9519..ef249ec 100644
--- a/sim/testsuite/sim/cris/c/mprotect1.c
+++ b/sim/testsuite/sim/cris/c/mprotect1.c
@@ -7,13 +7,10 @@
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>
-#include <errno.h>
int main (int argc, char *argv[])
{
- int err = mprotect (0, 8193, PROT_EXEC);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ mprotect (0, 8193, PROT_EXEC);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/mprotect2.c b/sim/testsuite/sim/cris/c/mprotect2.c
deleted file mode 100644
index 4d83945..0000000
--- a/sim/testsuite/sim/cris/c/mprotect2.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "mprotect1.c"
diff --git a/sim/testsuite/sim/cris/c/pipe2.c b/sim/testsuite/sim/cris/c/pipe2.c
index 18ccf38..ccb97f8 100644
--- a/sim/testsuite/sim/cris/c/pipe2.c
+++ b/sim/testsuite/sim/cris/c/pipe2.c
@@ -1,6 +1,6 @@
/* Check that closing a pipe with a nonempty buffer works.
#notarget: cris*-*-elf
-#output: got: a\ngot: b\nexit: 0\n
+#output: got: a\nexit: 0\n
*/
@@ -14,7 +14,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <string.h>
+
int pip[2];
int pipemax;
@@ -23,8 +23,7 @@ int
process (void *arg)
{
char *s = arg;
- int lots = pipemax + 256;
- char *buf = malloc (lots);
+ char *buf = malloc (pipemax * 100);
int ret;
if (buf == NULL)
@@ -38,17 +37,12 @@ process (void *arg)
*buf = s[1];
- /* The second write may or may not be successful for the whole
- write, but should be successful for at least the pipemax part.
- As linux/limits.h clamps PIPE_BUF to 4096, but the page size is
- actually 8k, we can get away with that much. There should be no
- error, though. Doing this on host shows that for
- x86_64-unknown-linux-gnu (2.6.14-1.1656_FC4) pipemax * 10 can be
- successfully written, perhaps for similar reasons. */
- ret = write (pip[1], buf, lots);
- if (ret < pipemax)
+ /* The second write should only successful for at most the PIPE_MAX
+ part, but no error. */
+ ret = write (pip[1], buf, pipemax * 10);
+ if (ret != 0 && ret != pipemax - 1 && ret != pipemax)
{
- fprintf (stderr, "ret: %d, %s, %d\n", ret, strerror (errno), pipemax);
+ fprintf (stderr, "ret: %d\n", ret);
fflush (0);
abort ();
}
@@ -110,19 +104,6 @@ main (void)
printf ("got: %c\n", buf[0]);
- /* Need to read out something from the second write too before
- closing, or the writer can get EPIPE. */
- while ((retcode = read (pip[0], buf, 1)) == 0)
- ;
-
- if (retcode != 1)
- {
- fprintf (stderr, "Bad read 2: %d\n", retcode);
- abort ();
- }
-
- printf ("got: %c\n", buf[0]);
-
if (close (pip[0]) != 0)
{
perror ("pip close");
diff --git a/sim/testsuite/sim/cris/c/readlink11.c b/sim/testsuite/sim/cris/c/readlink11.c
deleted file mode 100644
index 05a332f..0000000
--- a/sim/testsuite/sim/cris/c/readlink11.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As readlink5.c (sic), but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#dest: ./readlink11.c.x
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "readlink2.c"
diff --git a/sim/testsuite/sim/cris/c/readlink2.c b/sim/testsuite/sim/cris/c/readlink2.c
index e5e9d94..5a0d878 100644
--- a/sim/testsuite/sim/cris/c/readlink2.c
+++ b/sim/testsuite/sim/cris/c/readlink2.c
@@ -12,18 +12,11 @@ int main (int argc, char *argv[])
{
char buf[1024];
char buf2[1024];
- int err;
/* This is a special feature handled in the simulator. The "42"
should be formed from getpid () if this was a real program. */
- err = readlink ("/proc/42/exe", buf, sizeof (buf));
- if (err < 0)
- {
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
- printf ("xyzzy\n");
- exit (0);
- }
+ if (readlink ("/proc/42/exe", buf, sizeof (buf)) < 0)
+ abort ();
/* Don't use an abort in the following; it might cause the printf to
not make it all the way to output and make debugging more
diff --git a/sim/testsuite/sim/cris/c/rtsigprocmask1.c b/sim/testsuite/sim/cris/c/rtsigprocmask1.c
index 7cc7c5c..0eee768 100644
--- a/sim/testsuite/sim/cris/c/rtsigprocmask1.c
+++ b/sim/testsuite/sim/cris/c/rtsigprocmask1.c
@@ -13,7 +13,6 @@
#include <unistd.h>
#include <signal.h>
#include <pthread.h>
-#include <errno.h>
static void *
process (void *arg)
@@ -39,13 +38,8 @@ main (void)
abort ();
/* An invalid parameter 1 should cause this to halt the simulator. */
- retcode
- = pthread_sigmask (SIG_BLOCK + SIG_UNBLOCK + SIG_SETMASK, NULL, &sigs);
- /* Direct return of the error number; i.e. not using -1 and errno,
- is the actual documented behavior. */
- if (retcode == ENOSYS)
- printf ("ENOSYS\n");
-
+ pthread_sigmask (SIG_BLOCK + SIG_UNBLOCK + SIG_SETMASK,
+ NULL, &sigs);
printf ("xyzzy\n");
return 0;
}
diff --git a/sim/testsuite/sim/cris/c/rtsigprocmask2.c b/sim/testsuite/sim/cris/c/rtsigprocmask2.c
deleted file mode 100644
index 5026908..0000000
--- a/sim/testsuite/sim/cris/c/rtsigprocmask2.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#cc: additional_flags=-pthread
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "rtsigprocmask1.c"
diff --git a/sim/testsuite/sim/cris/c/rtsigsuspend1.c b/sim/testsuite/sim/cris/c/rtsigsuspend1.c
index 0e00cc1..4a5ee3f 100644
--- a/sim/testsuite/sim/cris/c/rtsigsuspend1.c
+++ b/sim/testsuite/sim/cris/c/rtsigsuspend1.c
@@ -9,13 +9,10 @@
#include <sys/syscall.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
int main (void)
{
- int err = syscall (SYS_rt_sigsuspend, 1, 2);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ syscall (SYS_rt_sigsuspend, 1, 2);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/rtsigsuspend2.c b/sim/testsuite/sim/cris/c/rtsigsuspend2.c
deleted file mode 100644
index 9ce165d..0000000
--- a/sim/testsuite/sim/cris/c/rtsigsuspend2.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "rtsigsuspend1.c"
diff --git a/sim/testsuite/sim/cris/c/sig13.c b/sim/testsuite/sim/cris/c/sig13.c
deleted file mode 100644
index 4d71752..0000000
--- a/sim/testsuite/sim/cris/c/sig13.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "sig7.c"
diff --git a/sim/testsuite/sim/cris/c/sig7.c b/sim/testsuite/sim/cris/c/sig7.c
index 0991ff0..2e70a43 100644
--- a/sim/testsuite/sim/cris/c/sig7.c
+++ b/sim/testsuite/sim/cris/c/sig7.c
@@ -7,20 +7,17 @@
#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
-#include <errno.h>
int
main (void)
{
struct sigaction sa;
- int err;
sa.sa_sigaction = NULL;
sa.sa_flags = SA_RESTART | SA_SIGINFO;
sigemptyset (&sa.sa_mask);
- err = sigaction (SIGFPE, &sa, NULL);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ if (sigaction (SIGFPE, &sa, NULL) != 0)
+ abort ();
printf ("xyzzy\n");
exit (0);
diff --git a/sim/testsuite/sim/cris/c/sigreturn1.c b/sim/testsuite/sim/cris/c/sigreturn1.c
index 09989f5..ddb0d02 100644
--- a/sim/testsuite/sim/cris/c/sigreturn1.c
+++ b/sim/testsuite/sim/cris/c/sigreturn1.c
@@ -9,13 +9,10 @@
#include <sys/syscall.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
int main (void)
{
- int err = syscall (SYS_sigreturn, 1, 2, 3, 4, 5, 6);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ syscall (SYS_sigreturn, 1, 2, 3, 4, 5, 6);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/sigreturn2.c b/sim/testsuite/sim/cris/c/sigreturn2.c
index d0305cb..f0157f0 100644
--- a/sim/testsuite/sim/cris/c/sigreturn2.c
+++ b/sim/testsuite/sim/cris/c/sigreturn2.c
@@ -14,7 +14,6 @@
#include <sys/types.h>
#include <sys/syscall.h>
#include <signal.h>
-#include <errno.h>
static void *
process (void *arg)
@@ -28,11 +27,7 @@ int main (void)
{
pthread_t th_a;
if (pthread_create (&th_a, NULL, process, (void *) "a") == 0)
- {
- int err = syscall (SYS_sigreturn, 1, 2, 3, 4, 5, 6);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
- }
+ syscall (SYS_sigreturn, 1, 2, 3, 4, 5, 6);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/sigreturn3.c b/sim/testsuite/sim/cris/c/sigreturn3.c
deleted file mode 100644
index f5ed90f..0000000
--- a/sim/testsuite/sim/cris/c/sigreturn3.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "sigreturn1.c"
diff --git a/sim/testsuite/sim/cris/c/sigreturn4.c b/sim/testsuite/sim/cris/c/sigreturn4.c
deleted file mode 100644
index 456e312..0000000
--- a/sim/testsuite/sim/cris/c/sigreturn4.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#cc: additional_flags=-pthread
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "sigreturn2.c"
diff --git a/sim/testsuite/sim/cris/c/syscall1.c b/sim/testsuite/sim/cris/c/syscall1.c
index 150f297..5b8cfda 100644
--- a/sim/testsuite/sim/cris/c/syscall1.c
+++ b/sim/testsuite/sim/cris/c/syscall1.c
@@ -8,15 +8,12 @@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
int main (void)
{
/* The number 166 is chosen because there's a gap for that number in
the CRIS asm/unistd.h. */
- int err = syscall (166, 1, 2, 3, 4, 5, 6);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ syscall (166, 1, 2, 3, 4, 5, 6);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/syscall2.c b/sim/testsuite/sim/cris/c/syscall2.c
index 43462ec..4497588 100644
--- a/sim/testsuite/sim/cris/c/syscall2.c
+++ b/sim/testsuite/sim/cris/c/syscall2.c
@@ -8,16 +8,11 @@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
int main (void)
{
- int err;
-
/* Check special case of number 0 syscall. */
- err = syscall (0, 3, 2, 1, 4, 6, 5);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ syscall (0, 3, 2, 1, 4, 6, 5);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/syscall3.c b/sim/testsuite/sim/cris/c/syscall3.c
deleted file mode 100644
index 9ba9635..0000000
--- a/sim/testsuite/sim/cris/c/syscall3.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As the included file, just actually specifying the default.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=stop
-#xerror:
-#output: Unimplemented syscall: 166 (0x1, 0x2, 0x3, 0x4, 0x5, 0x6)\n
-#output: program stopped with signal 4.\n
-*/
-
-#include "syscall1.c"
diff --git a/sim/testsuite/sim/cris/c/syscall4.c b/sim/testsuite/sim/cris/c/syscall4.c
deleted file mode 100644
index 757099f..0000000
--- a/sim/testsuite/sim/cris/c/syscall4.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As the included file, just actually specifying the default.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=stop
-#xerror:
-#output: Unimplemented syscall: 0 (0x3, 0x2, 0x1, 0x4, 0x6, 0x5)\n
-#output: program stopped with signal 4.\n
-*/
-
-#include "syscall2.c"
diff --git a/sim/testsuite/sim/cris/c/syscall5.c b/sim/testsuite/sim/cris/c/syscall5.c
deleted file mode 100644
index 2eac900..0000000
--- a/sim/testsuite/sim/cris/c/syscall5.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As the included file, but specifying ENOSYS with message.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys
-#output: Unimplemented syscall: 166 (0x1, 0x2, 0x3, 0x4, 0x5, 0x6)\n
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "syscall1.c"
diff --git a/sim/testsuite/sim/cris/c/syscall6.c b/sim/testsuite/sim/cris/c/syscall6.c
deleted file mode 100644
index 91375df..0000000
--- a/sim/testsuite/sim/cris/c/syscall6.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* As the included file, but specifying ENOSYS with message.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys
-#output: Unimplemented syscall: 0 (0x3, 0x2, 0x1, 0x4, 0x6, 0x5)\n
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "syscall2.c"
diff --git a/sim/testsuite/sim/cris/c/syscall7.c b/sim/testsuite/sim/cris/c/syscall7.c
deleted file mode 100644
index 0f1daf1..0000000
--- a/sim/testsuite/sim/cris/c/syscall7.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "syscall1.c"
diff --git a/sim/testsuite/sim/cris/c/syscall8.c b/sim/testsuite/sim/cris/c/syscall8.c
deleted file mode 100644
index c579436..0000000
--- a/sim/testsuite/sim/cris/c/syscall8.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "syscall2.c"
diff --git a/sim/testsuite/sim/cris/c/sysctl2.c b/sim/testsuite/sim/cris/c/sysctl2.c
index b6752a8..482e546 100644
--- a/sim/testsuite/sim/cris/c/sysctl2.c
+++ b/sim/testsuite/sim/cris/c/sysctl2.c
@@ -10,7 +10,6 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#include <errno.h>
int main (void)
{
@@ -33,9 +32,7 @@ int main (void)
(void *) -1, &x, NULL, 0
};
- int err = syscall (SYS__sysctl, &scargs);
- if (err == -1 && errno == ENOSYS)
- printf ("ENOSYS\n");
+ syscall (SYS__sysctl, &scargs);
printf ("xyzzy\n");
exit (0);
}
diff --git a/sim/testsuite/sim/cris/c/sysctl3.c b/sim/testsuite/sim/cris/c/sysctl3.c
deleted file mode 100644
index 747e784..0000000
--- a/sim/testsuite/sim/cris/c/sysctl3.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* As the included file, but specifying silent ENOSYS.
-#notarget: cris*-*-elf
-#sim: --cris-unknown-syscall=enosys-quiet
-#output: ENOSYS\n
-#output: xyzzy\n
-*/
-
-#include "sysctl2.c"
diff --git a/sim/testsuite/sim/mips/ChangeLog b/sim/testsuite/sim/mips/ChangeLog
index b6ff359..9c7b789 100644
--- a/sim/testsuite/sim/mips/ChangeLog
+++ b/sim/testsuite/sim/mips/ChangeLog
@@ -1,13 +1,3 @@
-2006-11-08 Thiemo Seufer <ths@mips.com>
-
- * basic.exp: Fix spelling in comment. Use canonical form of target
- patterns. Run DSP test only for DSP-capable ISAs. Check also mips32r2
- and mips64r2 if supported by the target.
-
-2006-08-08 Chris Dearman <chris@mips.com>
-
- * testutils.inc (setup): __start is also a valid start symbol.
-
2006-05-15 Chao-ying Fu <fu@mips.com>
* mips32-dsp.s: Add some tests for shra_r.ph, shrav_r.ph, shra_r.w,
diff --git a/sim/testsuite/sim/mips/basic.exp b/sim/testsuite/sim/mips/basic.exp
index 00f77c2..98795ab 100644
--- a/sim/testsuite/sim/mips/basic.exp
+++ b/sim/testsuite/sim/mips/basic.exp
@@ -1,6 +1,6 @@
# MIPS simulator instruction tests
-# As gross as it is, we unset the linker script specified by the target
+# As gross as it is, we unset the linker script specifid by the target
# board. The MIPS libgloss linker scripts include libgcc (and possibly
# other libraries), which the linker (used to link these tests rather
# than the compiler) can't necessarily find.
@@ -32,27 +32,23 @@ proc run_hilo_test {testfile models nops} {
}
-# Only test mips*-*-elf (e.g., no mips*-*-linux), and only test if the target
+# Only test mips*-elf (e.g., no mips-linux), and only test if the target
# board really is a simulator (sim tests don't work on real HW).
-if {[istarget mips*-*-elf] && [board_info target exists is_simulator]} {
+if {[istarget mips*-elf] && [board_info target exists is_simulator]} {
- set dspmodels ""
-
- if {[istarget mipsisa64sb1*-*-elf]} {
+ if {[istarget mipsisa64sb1*-elf]} {
set models "sb1"
set submodels "mips1 mips2 mips3 mips4 mips32 mips64"
- } elseif {[istarget mipsisa64*-*-elf]} {
- set models "mips32 mips64 mips32r2 mips64r2"
+ } elseif {[istarget mipsisa64*-elf]} {
+ set models "mips32 mips64"
set submodels "mips1 mips2 mips3 mips4"
- append dspmodels " mips32r2 mips64r2"
- } elseif {[istarget mipsisa32*-*-elf]} {
- set models "mips32 mips32r2"
+ } elseif {[istarget mipsisa32*-elf]} {
+ set models "mips32"
set submodels "mips1 mips2"
- append dspmodels " mips32r2"
- } elseif {[istarget mips64vr*-*-elf]} {
+ } elseif {[istarget mips64vr-*-elf] || [istarget mips64vrel-*-elf]} {
set models "vr4100 vr4111 vr4120 vr5000 vr5400 vr5500"
set submodels "mips1 mips2 mips3 mips4"
- } elseif {[istarget mips64*-*-elf]} {
+ } elseif {[istarget mips64*-elf]} {
set models "mips3"
set submodels "mips1 mips2"
} else {
@@ -76,5 +72,5 @@ if {[istarget mips*-*-elf] && [board_info target exists is_simulator]} {
run_sim_test mdmx-ob.s $submodels
run_sim_test mdmx-ob-sb1.s $submodels
- run_sim_test mips32-dsp.s $dspmodels
+ run_sim_test mips32-dsp.s $models
}
diff --git a/sim/testsuite/sim/mips/testutils.inc b/sim/testsuite/sim/mips/testutils.inc
index 1d4b732..f111f79 100644
--- a/sim/testsuite/sim/mips/testutils.inc
+++ b/sim/testsuite/sim/mips/testutils.inc
@@ -47,10 +47,8 @@
.macro setup
.global _start
- .global __start
.ent _start
_start:
-__start:
.set push
.set noreorder
j DIAG