Age | Commit message (Collapse) | Author | Files | Lines |
|
The point of this test is to just make sure the usage text is shown,
not the exact details of the usage text. So shorten the output test
to match the beginning. This fixes breakage when the output changed
slightly to include [--].
|
|
The #dest field used in the cris testsuite is a bit of hack to set the
argv[0] for the tests to read out later on. Now that the sim has an
option to set argv[0] explicitly, we don't need this custom field, so
let's drop it to harmonize the testsuites a little.
|
|
Set the mach to the right value all the time, and update xfail to
say the test fails on all targets. WIth multitarget testing, the
idea of target here doesn't make much sense.
|
|
Most code isn't using this, and the only call site (in one cris file)
can use target_compile directly. So switch it over to simplify.
|
|
Since gcc dropped support for a.out starting with 4.4.0 in 2009, it's
been impossible to verify this code actually still works. Since it
crashes in ld, and it uses a config option that no other tests uses
and we want to remove, drop the test to avoid all the trouble.
|
|
There's no need to sync testutils.inc with remote hosts. The one
we have in the source tree is all we need and only thing we test.
Delete it to simplify.
|
|
Objcopy was used to create a binary file of just the executable code
since the environment requires code to based at address 0. We can
accomplish the same thing with the -Ttext=0 flag, so switch to that
to get rid of custom logic.
|
|
Switch from the centralized list in the exp file to each test declaring
its own requirements which they're already (mostly) doing. This will
increase coverage slightly by running more tests in more configurations
since the hardcoded exp list was a little out of date.
We have to mark the psh* tests as shdsp only (to match what the exp
file was doing), mark the fsca & fsrra tests as failing (since they
weren't even being run by the exp file), and to fix the expected
output & status of the fail test.
|
|
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.
|
|
We don't want to handle Linux syscalls when in the virtual environment,
just the user environment, so adjust the Linux traps logic to check for
that specifically (instead of just skipping the operating environment).
Also tweak some testcases to explicitly specify the environment they run
under rather than relying on the default matching their needs. This gets
the tests passing for all m32r targets.
|
|
We only do the common code as automake simplifies the logic.
|
|
* addb.s: Add special case reg,<@reg+ / @reg- / @+reg / @-reg>.
* andb.s: Likewise.
* cmpb.s: Likewise.
* orb.s: Likewise.
* subb.s: Likewise.
* xorb.s: Likewise.
* movb.s: Add special case reg,<@reg+ / @reg- / @+reg / @-reg>
@reg+,@reg+ / @-reg,@-reg.
* movw.s: Likewise.
* movl.s: Likewise.
|
|
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>
|
|
In "mov. [bwl] reg, @ -reg", added a special case test
using the same register.
|
|
When in the virtual environment, have brki 8 trigger libgloss syscalls
like other ports. This also matches the ABI that Linux uses for its
syscalls (ignoring the syscall table differences).
|
|
Hoist the Blackfin implementation up to the common one.
|
|
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.
|
|
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.
|
|
Since we require ports to use a matching subdir name in the testsuite
tree, we can use that to calculate the $arch value.
|
|
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.
|
|
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.
|
|
This allows us to delete most of our custom test logic,
and avoids a recursive make for minor speed up.
|
|
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.
|
|
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.
|
|
This wasn't supposed to be in here when it was first merged as we
had specifically disabled it for all the tests (and ADI has papers
in place w/the FSF). Clean up this one.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
Support for sh64 was dropped from bfd et al in 2018. Without
that, the sim port is useless. So clean up this code too.
|
|
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.
|
|
PR ld/13900
Linking this test crashes the linker, so disable it. The crash
was reported about 9 years ago but haven't made progress, so lets
avoid the failures in test runs.
|
|
Building the C tests with a cris-elf toolchain (gcc-10.2 &
newlib-4.1.0) currently fail due to warnings it emits:
cris-elf-ld: libc.a(lib_a-closer.o): in function `_close_r':
newlib/libc/reent/closer.c:47: warning: _close is not implemented and will always fail
This is because the default target for cris-elf is bare metal, not
the simulator. For that, we need -sim. So add it for elf targets.
We don't add it for all targets as the simulator (and testsuite)
run both libgloss programs as well as Linux userspace programs.
|
|
|
|
Make sure we include unistd.h for getpid prototypes to fix build
warnings/errors with newer compilers & C libraries.
Doing that for close in openpf highlights these were using the
wrong function -- need to use fclose on FILE*, not close.
These tests pass again with a cris-elf toolchain.
|
|
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.
|
|
This seems like it was meant to unify arch test Makefiles, but
that never happened, and we've instead unified using dejagnu.
|
|
These tests all fail to assemble when targeting the h8300 or h8300h
cpu variants with errors like:
rotl.s:242: Warning: Opcode `rotl.b' with these operand types not available in H8/300H mode
rotl.s:242: Error: invalid operands
It's been this way for years and no one seems to care, so disable
them for those targets since the assembler thinks it's impossible.
|
|
We don't need to manually enumerate every test. Use a glob function
like every other port and rely on the (already existing) #mach headers
in each file to filter out targets we don't care about.
|
|
Make sure the files using abs() include stdlib.h for its prototype.
These files were relying on it being included implicitly by others
which isn't guaranteed, and newer toolchains produce warnings.
|
|
|
|
This commits the result of running gdb/copyright.py as per our Start
of New Year procedure...
gdb/ChangeLog
Update copyright year range in copyright header of all GDB files.
|
|
Binutils support for LMBD instruction was merged [1]. So add it also
to simulator.
LMBD instruction does left-most-bit-detection. It returns 32 if
the given bit value is not found in the provided word value.
[1] https://sourceware.org/pipermail/binutils/2020-October/113901.html
sim/pru/ChangeLog:
* pru.h (RS1SEL): New macro.
(RS1_WIDTH): New macro.
* pru.isa: Describe the LMBD instruction.
sim/testsuite/sim/pru/ChangeLog:
* lmbd.s: New test.
|
|
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.
|
|
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.
|