riscv: [Patch 8/5] Added some regression tests to RISC-V
authorAlec Roelke <ar4jc@virginia.edu>
Wed, 30 Nov 2016 22:12:56 +0000 (17:12 -0500)
committerAlec Roelke <ar4jc@virginia.edu>
Wed, 30 Nov 2016 22:12:56 +0000 (17:12 -0500)
commit33683bd087c2009db588844e8fa89b454a5c3d77
treee276700fc7838cb322d830abebffcc6215d0cee0
parentee0c261e10c17cb1ce0a1511bb1040318e6d17f9
riscv: [Patch 8/5] Added some regression tests to RISC-V

This patch is the eighth patch in a series adding RISC-V to gem5, and
third of the bonus patches to the original series of five. It adds some
regression tests to RISC-V.

Regression tests included:
- se/00.hello
- se/02.insttest (split into several binaries which are not included due
  to large size)

The tests added to 00.insttest will need to be build manually; to
facilitate this, a Makefile is included. The required toolchain and
compiler (riscv64-unknown-elf-gcc) can be built from the riscv-tools
GitHub repository at https://github.com/riscv/riscv-tools.

Note that because EBREAK only makes sense when gdb is running or while in
FS mode, it is not included in the linux-rv64i insttest. ERET is not
included because it does not make sense in SE mode and, in fact, causes
a panic by design.

Note also that not every system call is tested in linux-rv64i; of the ones
defined in linux/process.hh, some have been given numbers but not
definitions for the toolchain, or are merely stubs that always return 0. Of
the ones that do work properly, only a subset are tested due to similar
functionality.

Signed-off by: Alec Roelke

Signed-off by: Jason Lowe-Power <jason@lowepower.com>
14 files changed:
tests/test-progs/hello/bin/riscv/linux/hello [new file with mode: 0755]
tests/test-progs/insttest/src/riscv/Makefile [new file with mode: 0644]
tests/test-progs/insttest/src/riscv/insttest.h [new file with mode: 0644]
tests/test-progs/insttest/src/riscv/rv64a.cpp [new file with mode: 0644]
tests/test-progs/insttest/src/riscv/rv64a.h [new file with mode: 0644]
tests/test-progs/insttest/src/riscv/rv64d.cpp [new file with mode: 0644]
tests/test-progs/insttest/src/riscv/rv64d.h [new file with mode: 0644]
tests/test-progs/insttest/src/riscv/rv64f.cpp [new file with mode: 0644]
tests/test-progs/insttest/src/riscv/rv64f.h [new file with mode: 0644]
tests/test-progs/insttest/src/riscv/rv64i.cpp [new file with mode: 0644]
tests/test-progs/insttest/src/riscv/rv64i.h [new file with mode: 0644]
tests/test-progs/insttest/src/riscv/rv64m.cpp [new file with mode: 0644]
tests/test-progs/insttest/src/riscv/rv64m.h [new file with mode: 0644]
util/regress