aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/ChangeLog
AgeCommit message (Collapse)AuthorFilesLines
2021-08-17sim: rename ChangeLog files to ChangeLog-2021Mike Frysinger1-475/+0
Now that ChangeLog entries are no longer used for sim patches, this commit renames all relevant sim ChangeLog to ChangeLog-2021, similar to what we would do in the context of the "Start of New Year" procedure. The purpose of this change is to avoid people merging ChangeLog entries by mistake when applying existing commits that they are currently working on. Also throw in a .gitignore entry to keep people from adding new ChangeLog files anywhere in the sim tree.
2021-06-14sim: enable silent rules in common buildsMike Frysinger1-0/+5
We only do the common code as automake simplifies the logic.
2021-05-07sim: Add bfd include path for common testsuite toolsDimitar Dimitrov1-0/+4
On a host without installed libbfd, this patch fixes the following "make check-sim" errors for both pru cross target, and native x86_64: In file included from ../../../binutils/sim/common/sim-basics.h:131, from testsuite/common/bits32m0.c:13:../../../binutils/sim/../include/gdb/callback.h:55:10: fatal error: bfd.h: No such file or directory 55 | #include "bfd.h" | ^~~~~~~ Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
2021-04-08sim: testsuite: support exit 77 for unsupported testsMike Frysinger1-0/+5
Exit status 77 is common (including the autotools world) to indicate "skip this test". Add support for mapping that to "unsupported" as that's the closest in the dejagnu world.
2021-04-08sim: testsuite: skip tests when the port is disabledMike Frysinger1-0/+5
If the port hasn't been enabled, don't try to run its tests. Making this dynamic simplifies the test harnesses and avoids duplicating a bunch of target tuple checks.
2021-04-08sim: testsuite: calculate $arch from $subdirMike Frysinger1-0/+5
Since we require ports to use a matching subdir name in the testsuite tree, we can use that to calculate the $arch value.
2021-04-03sim: example-synacor: a simple implementation for referenceMike Frysinger1-0/+4
Provide a simple example simulator for people porting to new targets to use as a reference. This one has the advantage of being used by people and having a fun program available for it. It doesn't require a special target -- the example simulators can be built for any existing port.
2021-04-03sim: testsuite: integrate common tests into buildMike Frysinger1-0/+6
Now that we have the common automake build with support for build-time programs working, we can integrate the common tests into the default `make check` flow.
2021-03-07sim: testsuite: merge into toplevel automakeMike Frysinger1-0/+6
This allows us to delete most of our custom test logic, and avoids a recursive make for minor speed up.
2021-02-13sim: testsuite: push $arch out to targetsMike Frysinger1-0/+5
This is needed to move to automake & its dejagnu-provided logic, and eventually by the unified sim logic. The $arch is used only to figure out which `run` program to use when running tests, and as we move to a single top-level build, we can delete this and use sim/run directly.
2021-02-04sim: riscv: new portMike Frysinger1-0/+4
This is a hand-written implementation that should have fairly complete coverage for the base integer instruction set ("i"), and for the atomic ("a") and integer multiplication+division ("m") extensions. It also covers 32-bit & 64-bit targets. The unittest coverage is a bit weak atm, but should get better.
2021-01-15sim: testsuite: flatten treeMike Frysinger1-0/+5
Now that all port tests live under testsuite/sim/*/, and none live in testsuite/ directly, flatten the structure by moving all of the dirs under testsuite/sim/ to testsuite/ directly. We need to stop passing --tool to dejagnu so that it searches all dirs and not just ones that start with "sim". Since we have no other dirs in this tree, and no plans to add any, should be fine.
2021-01-15sim: testsuite: delete configure scriptMike Frysinger1-0/+5
Now that we've moved all ports to dejagnu & testsuite/sim/, the only thing the testsuite/configure script has been doing is filling in the sim_arch field in the testsuite/Makefile. We can simply let the top sim/configure script do that for us now. This simplifies & speeds up the build a bit by killing an entire configure script.
2021-01-15sim: d10v: relocate tests & clean up test harnessMike Frysinger1-1/+8
This is the only target using a dir directly under testsuite/. All others use sim/<arch>/ instead. Relocate it so all targets look the same, and so we can leverage the common test harness. We drop loop.s in the process because it was never referenced and was just 2 lines of code. All other test files are moved & have directives added to the top so that the test harness can invoke them correctly.
2021-01-15sim: mips: delete empty stub test dirMike Frysinger1-0/+6
No tests were ever added in here in the ~22 years since it was first created. Seems unlikely any tests will be added at this rate, and the sim/mips/ testdir already has some (light) coverage for this target. So punt the tree.
2021-01-15sim: frv: clean up redundant test coverageMike Frysinger1-0/+6
The frv-elf subdir contained five tests: * cache: A cache test of some sort. * exit47: A program to test exit status of 47 from sim. * grloop: Some basic limited loop test program. * hello: Standard "hello world" output program. * loop: An infinite loop program. The loop.s test is never referenced anywhere, and is all of 2 lines. Anyone who really needs a while(1); test case and re-implement it themselves locally. The cache.s code isn't referenced anywhere because it requires some custom args to the run program, and when this testcase was added, we didn't have any support for that. We do now, so we can add a header to enable that. Turns out the code crashes even with those, so turn around and mark it xfail. Maybe someone someday will care. That leaves the small exit47, grloop, and hello tests. Now that the sim test harness supports testing for custom exit status, we can move them all to sim/frv/ to maintain test coverage. The remaining differences between frv-elf & sim/frv are: * frv-elf/ runs for frv-*-elf while sim/frv/ runs for frv*-*-*. * frv-elf/ runs "*.s" files while sim/frv/ only has .cgs and such. On closer inspection, these are also meaningless distinctions: * There is nothing specific to the tests that require an *-elf target. Normally that would mean newlib+libgloss type stuff, but there's no such requirement in frv-elf/. * The ".s" suffix is the standard "this is an assembly file" suffix. Since FRV is a CGEN target, we can reuse the existing convention of ".ms" to mean "miscellaneous .s" as in "this is an assembly file, and run/bucket its test results in the miscellaneous category". So moving frv-elf/{cache,exit47,grloop,hello}.s to sim/frv/*.ms makes sense and simplifies things quite a bit for the target while also slightly increasing the coverage for some tuples.
2021-01-15sim: m32r: clean up redundant test coverageMike Frysinger1-0/+6
The m32r-elf subdir contained three tests: * exit47: A program to test exit status of 47 from sim. * hello: Standard "hello world" output program. * loop: An infinite loop program. There's already a sim/m32r/hello.ms test that does exactly the same thing as m32r-elf/hello.s, so we can delete that. The loop.s test is never referenced anywhere, and is all of 2 lines. Anyone who really needs a while(1); test case and re-implement it themselves locally. That leaves the single exit47 test. Now that the sim test harness supports testing for custom exit status, we can easily move that to sim/m32r/exit47.ms to maintain test coverage. The remaining differences between m32r-elf & sim/m32r are: * m32r-elf/ runs for m32r-*-elf while sim/m32r/ runs for m32r*-*-*. * m32r-elf/ runs "*.s" files while sim/m32r/ runs "*.ms" files. On closer inspection, these are also meaningless distinctions: * There is nothing specific to the tests that require an *-elf target. Normally that would mean newlib+libgloss type stuff, but there's no such requirement in m32r-elf/. * The ".s" suffix is the standard "this is an assembly file" suffix. Turns out ".ms" is just how sim/m32r/ (and a few other CGEN based targets) categorize/bucket test cases. It simply means "miscellaneous .s" as in "this is an assembly file, and run/bucket its test results in the miscellaneous category". So moving m32r-elf/exit47.s to sim/m32r/exit47.ms makes sense and simplifies things quite a bit for the target while also slightly increasing the coverage for some tuples.
2021-01-15sim: testsuite: allow tests to declare expected exit statusMike Frysinger1-0/+6
Some tests want to verify they can control the exit status, and allowing any non-zero value would allow tests to silently fail: if it crashed & exited 1, or forced all non-zero to 1, then we wouldn't be able to differentiate with a test exiting with a status like 47. Extend the test harness to allow tests to declare their expected exit status that would be defined as a "pass". This requires a small tweak to the sim_run API to return the status directly, but that shouldn't be a big deal as it's only used by sim code.
2021-01-11sim: tests: get common tests working againMike Frysinger1-1/+15
These were written with 32-bit host assumptions baked into it. Simplify the printf formats to use ll length modifier as it's in C11 rather than trying to manually break it up into two, and cleanup some of the casts to stop assuming sizeof(long) is the same as sizeof(int). We also have to add a few more includes for the various funcs used in here. The tests aren't compiled automatically still. We can figure that out later with more work.
2021-01-09sim: sh64: delete portMike Frysinger1-0/+5
Support for sh64 was dropped from bfd et al in 2018. Without that, the sim port is useless. So clean up this code too.
2021-01-07sim: ChangeLog: move arch-specific entries into the arch dirMike Frysinger1-17/+1
We don't want arch-specific entries in the common ChangeLog files. Most arches do this already, so clean up the recent additions, and move some older entries down to help avoid confusing newcomers.
2021-01-05sim: fr30: delete unused testsuiteMike Frysinger1-0/+4
Looking through the history, it doesn't seem like the fr30 port was ever merged. There used to be a testsuite/fr30-elf/ dir, but that was punted back in 2005 as being dead too. Since there's no refs and the dir hasn't been touched since 1999, lets assume no one will ever notice or care.
2021-01-05sim: testsuite: delete unused Make-common.in fileMike Frysinger1-0/+4
This seems like it was meant to unify arch test Makefiles, but that never happened, and we've instead unified using dejagnu.
2021-01-04sim: update bug URI to https://Mike Frysinger1-0/+4
2020-10-06sim: Fix autoreconf errors in sim/ directoryAndrew Burgess1-0/+5
Run autoreconf in sim/ directory and you'll see some errors. The problem is that autoreconf (a perl script) does not evaluate the value passed as an argument to AC_CONFIG_AUX_DIR, so something like: AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../..) does not do the right thing inside autoreconf, my understanding is that changing to something like this is fine: AC_CONFIG_AUX_DIR(../..) the generated configure seems to check the value passed, and the value passed relative to the source directory, so I think we get basically the same behaviour as before. sim/testsuite/ChangeLog: * configure: Regnerate. * configure.ac (AC_CONFIG_AUX_DIR): Update. sim/testsuite/d10v-elf/ChangeLog: * configure: Regnerate. * configure.ac (AC_CONFIG_AUX_DIR): Update. sim/testsuite/frv-elf/ChangeLog: * configure: Regnerate. * configure.ac (AC_CONFIG_AUX_DIR): Update. sim/testsuite/m32r-elf/ChangeLog: * configure: Regnerate. * configure.ac (AC_CONFIG_AUX_DIR): Update. sim/testsuite/mips64el-elf/ChangeLog: * configure: Regnerate. * configure.ac (AC_CONFIG_AUX_DIR): Update.
2020-09-08bpf: simulator: correct div, mod insn semanticsDavid Faust1-0/+5
The div and mod eBPF instructions are unsigned, but the semantic specification for the simulator incorrectly used signed operators. Correct them to unsigned versions, and correct the ALU tests in the simulator (which incorrectly assumed signed semantics). Tested in bpf-unknown-none. cpu/ChangeLog: 2020-09-08 David Faust <david.faust@oracle.com> * bpf.cpu (define-alu-instructions): Correct semantic operators for div, mod to unsigned versions. sim/ChangeLog: 2020-09-08 David Faust <david.faust@oracle.com> * bpf/sem-be.c: Regenerate. * bpf/sem-le.c: Likewise. sim/testsuite/ChangeLog: 2020-09-08 David Faust <david.faust@oracle.com> * sim/bpf/alu.s: Correct div and mod tests. * sim/bpf/alu32.s: Likewise.
2020-08-04sim: eBPF simulatorJose E. Marchesi1-0/+17
This patch introduces the basics of an instruction-simulator for eBPF. The simulator is based on CGEN. gdb/ChangeLog: 2020-08-04 Jose E. Marchesi <jose.marchesi@oracle.com> * configure.tgt: Set gdb_sim for bpf-*-* targets. sim/ChangeLog: 2020-08-04 Jose E. Marchesi <jose.marchesi@oracle.com> David Faust <david.faust@oracle.com> * configure.tgt (sim_arch): Add entry for bpf-*-*. * configure: Regenerate. * MAINTAINERS: Add maintainer for the BPF simulator. * bpf/Makefile.in: New file. * bpf/bpf-helpers.c: Likewise. * bpf/bpf-helpers.def: Likewise. * bpf/bpf-helpers.h: Likewise. * bpf/bpf-sim.h: Likewise. * bpf/bpf.c: Likewise. * bpf/config.in: Likewise. * bpf/configure.ac: Likewise. * bpf/decode.h: Likewise. * bpf/eng.h: Likewise. * bpf/mloop.in: Likewise. * bpf/sim-if.c: Likewise. * bpf/sim-main.h: Likewise. * bpf/traps.c: Likewise. * bpf/configure: Generate. * bpf/aclocal.m4: Likewise. sim/testsuite/ChangeLog: 2020-08-04 David Faust <david.faust@oracle.com> Jose E. Marchesi <jose.marchesi@oracle.com> * configure: Regenerate. * sim/bpf/allinsn.exp: New file. * sim/bpf/alu.s: Likewise. * sim/bpf/alu32.s: Likewise. * sim/bpf/endbe.s: Likewise. * sim/bpf/endle.s: Likewise. * sim/bpf/jmp.s: Likewise. * sim/bpf/jmp32.s: Likewise. * sim/bpf/ldabs.s: Likewise. * sim/bpf/mem.s: Likewise. * sim/bpf/mov.s: Likewise. * sim/bpf/testutils.inc: Likewise. * sim/bpf/xadd.s: Likewise.
2020-07-29Run `autoreconf -vf` throughoutSimon Marchi1-0/+4
I ran for i in $(find . -name configure.ac); do pushd $(dirname $i); autoreconf -vf; popd; done to re-generate all automake/autoconf files throughout the repo (with upstream autoconf 2.69 and automake 1.15.1). These were the changes that came out. I am pushing this as obvious. libdecnumber/ChangeLog: * aclocal.m4, configure: Re-generate. sim/bfin/ChangeLog: * aclocal.m4, configure: Re-generate. sim/erc32/ChangeLog: * configure: Re-generate. sim/mips/ChangeLog: * configure: Re-generate. sim/testsuite/ChangeLog: * configure: Re-generate. Change-Id: I97335c09972d25cc5f6fd8da4db4ffe4a0348787
2019-12-19Add install-strip to sim/Tom Tromey1-0/+5
PR build/24572 notes that "make install-strip" fails. For me, it works in every directory except "sim", so this patch adds install-strip targets to the Makefiles that appear there. sim/ChangeLog 2019-12-19 Tom Tromey <tromey@adacore.com> PR build/24572: * Makefile.in (install-strip): New target. sim/common/ChangeLog 2019-12-19 Tom Tromey <tromey@adacore.com> PR build/24572: * Makefile.in (install-strip): New target. sim/igen/ChangeLog 2019-12-19 Tom Tromey <tromey@adacore.com> PR build/24572: * Makefile.in (install-strip): New target. sim/ppc/ChangeLog 2019-12-19 Tom Tromey <tromey@adacore.com> PR build/24572: * Makefile.in (install-strip): New target. sim/testsuite/ChangeLog 2019-12-19 Tom Tromey <tromey@adacore.com> PR build/24572: * Makefile.in (install-strip): New target. Change-Id: I76613bc5c7e7812284f33826f8a5d914477fcdc5
2019-09-23Add testsuite for the PRU simulator portDimitar Dimitrov1-0/+4
sim/testsuite/ChangeLog: * configure: Regenerate. sim/testsuite/sim/pru/ChangeLog: * add.s: New test. * allinsn.exp: New file. * dmem-zero-pass.s: New test. * dmem-zero-trap.s: New test. * dram.s: New test. * jmp.s: New test. * loop-imm.s: New test. * loop-reg.s: New test. * mul.s: New test. * subreg.s: New test. * testutils.inc: New file.
2017-12-12sim: testsuite: add testsuite for or1k simPeter Gavin1-0/+5
This is the testsuite for the or1k sim, it tests running many of the basic architecture instructions on the openrisc sim. sim/testsuite/sim/or1k/ChangeLog: 2017-12-12 Peter Gavin <pgavin@gmail.com> Stafford Horne <shorne@gmail.com> * add.S: New file. * alltests.exp: New file. * and.S: New file. * basic.S: New file. * div.S: New file. * ext.S: New file. * find.S: New file. * flag.S: New file. * fpu.S: New file. * jump.S: New file. * load.S: New file. * mac.S: New file. * mfspr.S: New file. * mul.S: New file. * or.S: New file. * or1k-asm-test-env.h: New file. * or1k-asm-test-helpers.h: New file. * or1k-asm-test.h: New file. * or1k-asm.h: New file. * or1k-test.ld: New file. * ror.S: New file. * shift.S: New file. * spr-defs.h: New file. * sub.S: New file. * xor.S: New file. sim/testsuite/ChangeLog: 2017-12-12 Stafford Horne <shorne@gmail.com> Peter Gavin <pgavin@gmail.com> * configure: Regenerated.
2016-01-10sim: drop --enable-sim-cflags optionMike Frysinger1-0/+4
No other sub directory provides such a configuration option, so drop it from the sim dir as well. This cleans up a good bit of code in the process. If people want to use custom flags for just the sim, they can still run configure+make by hand in the sim subdir and use the normal CFLAGS settings.
2016-01-03sim: convert to bfd_endianMike Frysinger1-0/+5
Rather than re-invent endian defines, as well as maintain our own list of OS & arch-specific includes, punt all that logic in favor of the bfd ones already set up and maintained elsewhere. We already rely on the bfd library, so leveraging the endian aspect should be fine.
2015-11-24Add an AArch64 simulator to GDB.Nick Clifton1-0/+5
sim * configure.tgt: Add aarch64 entry. * configure: Regenerate. * sim/aarch64/configure.ac: New configure template. * sim/aarch64/aclocal.m4: Generate. * sim/aarch64/config.in: Generate. * sim/aarch64/configure: Generate. * sim/aarch64/cpustate.c: New file - functions for accessing AArch64 registers. * sim/aarch64/cpustate.h: New header. * sim/aarch64/decode.h: New header. * sim/aarch64/interp.c: New file - interface between GDB and simulator. * sim/aarch64/Makefile.in: New makefile template. * sim/aarch64/memory.c: New file - functions for simulating aarch64 memory accesses. * sim/aarch64/memory.h: New header. * sim/aarch64/sim-main.h: New header. * sim/aarch64/simulator.c: New file - aarch64 simulator functions. * sim/aarch64/simulator.h: New header. include/gdb * sim-aarch64.h: New file. sim/test * configure: Regenerate. * sim/aarch64: New directory.
2015-11-15sim: testsuite: support basic vars in flagsMike Frysinger1-1/+6
Sometimes in tests, we need supplemental files like linker scripts or board helper files. There's no way to set those flags in the tests currently and relative paths don't work (breaks out of tree builds). Update the main option parser to replace some strings on the fly. Now tests can do things like: Long term we'll want to switch the framework to use the dejagnu helpers like dg-xxx that gcc & gdb utilize. But that'll require more rework.
2015-07-24Remove leading/trailing white spaces in ChangeLogH.J. Lu1-9/+9
2015-04-13Do unset_currtarget_info ldscript for all simulator testsuites.Hans-Peter Nilsson1-0/+4
sim/testsuite: * sim-defs.exp (sim_init): Unset target ldscript here. sim/testsuite/sim/mips: * basic.exp: Don't unset target ldscript here.
2015-03-30sim: d10v: link in missing testsuiteMike Frysinger1-0/+5
Looks like historical restructuring in this dir lost the d10v-elf subdir and no one noticed in the meantime. Re-add it to the testsuite. There are some failures, but better some tests get run than none at all.
2015-03-29sim; testsuite: allow tests to set no outputMike Frysinger1-0/+6
If a test doesn't write anything at all to stdout, the current test framework can't support that. Even if you put a blank output line: # output: the setup happily clobbers that with a default pass/fail string. Tweak the parsing logic so we only set the output to pass/fail when the test has no output marker.
2015-03-29sim: testsuite: make subdir unconditionalMike Frysinger1-0/+4
Since the testsuite subdir has to handle dynamic arch values already, there's no real value in requiring arches to opt in to it. Most have a testsuite now anyways, and we're requiring it in the future.
2015-03-28sim: avr: start a basic testsuiteMike Frysinger1-0/+4
Just enough to know the sim isn't totally broken.
2015-03-28sim: ft32: new portJames Bowman1-0/+4
FT32 is a new high performance 32-bit RISC core developed by FTDI for embedded applications.
2014-03-10sim: msp430: start a test frameworkMike Frysinger1-0/+4
The current sim lacks any sort of tests. Start a basic framework and add a simple one to test the add insn.
2014-03-04sim: convert old style prototypesMike Frysinger1-0/+4
Most of these prototypes have been killed off, but we have a few left in the sim tree. Clean them up so we can enable the -W flag for it.
2013-09-23Regenerate sim configure files to pick up support for powerpc64le inAlan Modra1-0/+4
libtool.m4.
2012-06-15Define PACKAGE macro in all sims' config.h.Joel Brobecker1-0/+4
Some of the common includes in include/gdb such as callback.h include bfd.h. But there was a recent change in bfd-in.h to require that config.h be included before bfd.h can be included: /* PR 14072: Ensure that config.h is included first. */ #if !defined PACKAGE && !defined PACKAGE_VERSION #error config.h must be included before this header #endif PACKAGE_VERSION is always defined by default by the AC_INIT autoconf macro, but PACKAGE isn't. This patch updates the SIM_AC_COMMON macro to define it, and then regenerates all configure scripts and config.in files. sim/common/changeLog: * acinclude.m4 (SIM_AC_COMMON): Define PACKAGE. * config.in, configure: Regenerate. sim/ChangeLog: * configure: Regenerate. sim/arm/ChangeLog: * config.in, configure: Regenerate. sim/avr/ChangeLog: * config.in, configure: Regenerate. sim/bfin/ChangeLog: * config.in, configure: Regenerate. sim/cr16/ChangeLog: * config.in, configure: Regenerate. sim/cris/ChangeLog: * config.in, configure: Regenerate. sim/d10v/ChangeLog: * config.in, configure: Regenerate. sim/erc32/ChangeLog: * config.in, configure: Regenerate. sim/frv/ChangeLog: * config.in, configure: Regenerate. sim/h8300/ChangeLog: * config.in, configure: Regenerate. sim/iq2000/ChangeLog: * config.in, configure: Regenerate. sim/lm32/ChangeLog: * config.in, configure: Regenerate. sim/m32c/ChangeLog: * config.in, configure: Regenerate. sim/m32r/ChangeLog: * config.in, configure: Regenerate. sim/m68hc11/ChangeLog: * config.in, configure: Regenerate. sim/mcore/ChangeLog: * config.in, configure: Regenerate. sim/microblaze/ChangeLog: * config.in, configure: Regenerate. sim/mips/ChangeLog: * config.in, configure: Regenerate. sim/mn10300/ChangeLog: * config.in, configure: Regenerate. sim/moxie/ChangeLog: * config.in, configure: Regenerate. sim/ppc/ChangeLog: * configure: Regenerate. sim/rl78/ChangeLog: * config.in, configure: Regenerate. sim/rx/ChangeLog: * config.in, configure: Regenerate. sim/sh/ChangeLog: * config.in, configure: Regenerate. sim/sh64/ChangeLog: * config.in, configure: Regenerate. sim/v850/ChangeLog: * config.in, configure: Regenerate. sim/testsuite/ChangeLog: * configure: Regenerate.
2012-03-24sim: testsuite: regen configure after rl78 additionMike Frysinger1-0/+4
2012-03-21sim/testsuite/: split up arch-specific changelogsMike Frysinger1-613/+0
2012-03-19sim: tests: ignore generated testsMike Frysinger1-0/+4
2011-10-18sim: testsuite: regenerate configureMike Frysinger1-0/+4
Signed-off-by: Mike Frysinger <vapier@gentoo.org>