tests,style: add RISC-V assembly tests
authorTuan Ta <qtt2@cornell.edu>
Tue, 22 May 2018 04:24:24 +0000 (00:24 -0400)
committerTuan Ta <qtt2@cornell.edu>
Fri, 15 Jun 2018 00:25:50 +0000 (00:25 +0000)
commite502572ce4c30a74ea1847e123c886f984dee311
treef153cbf2076a9c2336da3d2215a89d50ccd672f6
parent3bb22b7fc3e642533f8bb170e8de1de5e62d976c
tests,style: add RISC-V assembly tests

This patch adds a subset (rv64*) of RISC-V assembly tests. The original
riscv-test project can be found here:
https://github.com/riscv/riscv-tests. The riscv-test project is under the
BSD license (https://github.com/riscv/riscv-tests/blob/master/LICENSE)
and is maintained separately from gem5 project.

The tests have been slightly modified to work in gem5 SE mode:

(1) Removed a trap handler used in riscv-tests for bare-metal systems

(2) Instead of throwing an exception, the tests call the exit syscall
with
the exit code of
    - '0' if SUCCESS
    - Failed test case's number (non-zero) if FAILURE
The exit code can be captured after a simuation completes.

In addition to original RISC-V assembly tests, this patch adds several
assembly tests specifically for AMO, LR, SC and system calls. Those
tests target a multi-core system.

(1) rv64uamt: multi-threaded tests for A-extension instructions

(2) rv64samt: multi-threaded tests for clone and futex system calls

This patch also makes the style checker ignore RISC-V assembly test
directory. The assembly tests are maintained in an external project
that does not follow the gem5 coding conventions.

Please find more details in the README file included in this patch.

Change-Id: Id1015d9a2c6c7d0341fa8b81483289e5f0bfcec0
Reviewed-on: https://gem5-review.googlesource.com/6703
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
173 files changed:
tests/test-progs/asmtest/src/riscv/LICENSE [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/Makefile [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/README.md [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/env/LICENSE [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/env/encoding.h [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/env/p/link.ld [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/env/p/riscv_test.h [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/env/pm/link.ld [new symlink]
tests/test-progs/asmtest/src/riscv/env/pm/riscv_test.h [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/env/ps/link.ld [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/env/ps/riscv_test.h [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/env/pt/link.ld [new symlink]
tests/test-progs/asmtest/src/riscv/env/pt/riscv_test.h [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/env/v/entry.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/env/v/link.ld [new symlink]
tests/test-progs/asmtest/src/riscv/env/v/riscv_test.h [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/env/v/string.c [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/env/v/vm.c [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/.gitignore [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/macros/mt/test_macros_mt.h [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/macros/mt/test_macros_mt_ecall.h [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/macros/scalar/test_macros.h [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64mi/Makefrag [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64mi/access.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64mi/breakpoint.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64mi/csr.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64mi/illegal.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64mi/ma_addr.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64mi/ma_fetch.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64mi/mcsr.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64mi/sbreak.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64mi/scall.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64samt/Makefrag [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64samt/sysclone_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64samt/sysfutex1_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64samt/sysfutex2_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64samt/sysfutex3_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64samt/sysfutex_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64si/Makefrag [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64si/csr.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64si/dirty.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64si/ma_fetch.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64si/sbreak.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64si/scall.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64si/wfi.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/Makefrag [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amoadd_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amoadd_w.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amoand_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amoand_w.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amomax_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amomax_w.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amomaxu_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amomaxu_w.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amomin_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amomin_w.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amominu_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amominu_w.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amoor_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amoor_w.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amoswap_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amoswap_w.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amoxor_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/amoxor_w.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/lrsc.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ua/test.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uamt/Makefrag [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uamt/amoadd_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uamt/amoand_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uamt/amomax_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uamt/amomaxu_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uamt/amomin_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uamt/amominu_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uamt/amoor_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uamt/amoswap_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uamt/amoxor_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uamt/lrsc_d.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uc/Makefrag [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uc/rvc.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/Makefrag [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/fadd.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/fclass.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/fcmp.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/fcvt.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/fcvt_w.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/fdiv.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/fmadd.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/fmin.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/ldst.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/move.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/recoding.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ud/structural.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uf/Makefrag [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uf/fadd.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uf/fclass.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uf/fcmp.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uf/fcvt.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uf/fcvt_w.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uf/fdiv.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uf/fmadd.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uf/fmin.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uf/ldst.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uf/move.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64uf/recoding.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/Makefrag [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/add.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/addi.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/addiw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/addw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/and.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/andi.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/auipc.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/beq.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/bge.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/bgeu.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/blt.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/bltu.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/bne.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/fence_i.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/jal.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/jalr.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/lb.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/lbu.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/ld.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/lh.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/lhu.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/lui.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/lw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/lwu.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/or.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/ori.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/sb.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/sd.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/sh.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/simple.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/sll.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/slli.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/slliw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/sllw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/slt.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/slti.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/sltiu.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/sltu.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/sra.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/srai.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/sraiw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/sraw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/srl.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/srli.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/srliw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/srlw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/sub.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/subw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/sw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/test.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/xor.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64ui/xori.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/Makefrag [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/div.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/divu.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/divuw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/divw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/mul.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/mulh.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/mulhsu.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/mulhu.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/mulw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/rem.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/remu.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/remuw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/isa/rv64um/remw.S [new file with mode: 0644]
tests/test-progs/asmtest/src/riscv/run-tests.py [new file with mode: 0755]
util/style/style.py