Add R5900 system tests, code is covered, CPU can come back,
allowing to fix a bug on PCGT opcode.

Since [v1]:
- rebased
- added freestanding libc stubs
- o32/n32 tests

[v1]: 
https://lore.kernel.org/qemu-devel/[email protected]/

Philippe Mathieu-Daudé (9):
  target/mips: Re-introduce the R5900 CPU in system mode
  target/mips/tx79: Fix PCGT* (Parallel Compare for Greater Than)
  tests/guest-debug: Allow placing the binary within system QEMU args
  tests/tcg/mips64el: Add bare-metal harness for R5900 system tests
  tests/tcg/mips64el: Move R5900 tests to system mode and build with
    meson
  target/mips: Factor mips_gdb_read_value() out
  target/mips: Describe gdbstub registers with XML features
  target/mips: Expose R5900 registers to gdb
  tests/tcg/mips64el: Add a TX79 instruction test in system mode

 MAINTAINERS                                   |   1 +
 configs/targets/mips-linux-user.mak           |   1 +
 configs/targets/mips-softmmu.mak              |   1 +
 configs/targets/mips64-linux-user.mak         |   1 +
 configs/targets/mips64-softmmu.mak            |   1 +
 configs/targets/mips64el-linux-user.mak       |   1 +
 configs/targets/mips64el-softmmu.mak          |   1 +
 configs/targets/mipsel-linux-user.mak         |   1 +
 configs/targets/mipsel-softmmu.mak            |   1 +
 configs/targets/mipsn32-linux-user.mak        |   1 +
 configs/targets/mipsn32el-linux-user.mak      |   1 +
 target/mips/internal.h                        |   2 +
 tests/tcg/mips64el/system/include/assert.h    |  15 +
 tests/tcg/mips64el/system/include/inttypes.h  |   7 +
 tests/tcg/mips64el/system/include/stdio.h     |  17 +
 tests/tcg/mips64el/system/include/string.h    |  16 +
 target/mips/cpu.c                             |   4 +
 target/mips/gdbstub.c                         | 152 +++++-
 target/mips/tcg/tx79_translate.c              |  10 +-
 tests/tcg/mips64el/system/harness.c           |  66 +++
 .../system}/test_r5900_div1.c                 |   0
 .../system}/test_r5900_divu1.c                |   0
 .../system}/test_r5900_madd.c                 |   0
 .../system}/test_r5900_maddu.c                |   0
 .../system}/test_r5900_mflohi1.c              |   0
 .../system}/test_r5900_mtlohi1.c              |   0
 .../system}/test_r5900_mult.c                 |   0
 .../system}/test_r5900_multu.c                |   0
 tests/tcg/mips64el/system/test_r5900_tx79.c   | 477 ++++++++++++++++++
 target/mips/cpu-defs.c.inc                    |  45 ++
 gdbstub/gdb-xml/mips32-cp0.xml                |   9 +
 gdbstub/gdb-xml/mips32-cpu.xml                |  42 ++
 gdbstub/gdb-xml/mips32-fpu.xml                |  41 ++
 gdbstub/gdb-xml/mips64-cp0.xml                |   9 +
 gdbstub/gdb-xml/mips64-cpu.xml                |  42 ++
 gdbstub/gdb-xml/mips64-fpu.xml                |  41 ++
 gdbstub/gdb-xml/mips64-r5900.xml              |  47 ++
 tests/guest-debug/run-test.py                 |   9 +-
 tests/tcg/mips/user/isa/r5900/Makefile        |  32 --
 tests/tcg/mips/user/isa/r5900/README          |   6 -
 tests/tcg/mips64el/meson.build                |   2 +
 tests/tcg/mips64el/system/boot.S              |  23 +
 tests/tcg/mips64el/system/kernel.ld           |  43 ++
 tests/tcg/mips64el/system/meson.build         |  62 +++
 tests/tcg/mips64el/system/test-r5900.py       |  30 ++
 45 files changed, 1211 insertions(+), 49 deletions(-)
 create mode 100644 tests/tcg/mips64el/system/include/assert.h
 create mode 100644 tests/tcg/mips64el/system/include/inttypes.h
 create mode 100644 tests/tcg/mips64el/system/include/stdio.h
 create mode 100644 tests/tcg/mips64el/system/include/string.h
 create mode 100644 tests/tcg/mips64el/system/harness.c
 rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_div1.c 
(100%)
 rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_divu1.c 
(100%)
 rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_madd.c 
(100%)
 rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_maddu.c 
(100%)
 rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_mflohi1.c 
(100%)
 rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_mtlohi1.c 
(100%)
 rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_mult.c 
(100%)
 rename tests/tcg/{mips/user/isa/r5900 => mips64el/system}/test_r5900_multu.c 
(100%)
 create mode 100644 tests/tcg/mips64el/system/test_r5900_tx79.c
 create mode 100644 gdbstub/gdb-xml/mips32-cp0.xml
 create mode 100644 gdbstub/gdb-xml/mips32-cpu.xml
 create mode 100644 gdbstub/gdb-xml/mips32-fpu.xml
 create mode 100644 gdbstub/gdb-xml/mips64-cp0.xml
 create mode 100644 gdbstub/gdb-xml/mips64-cpu.xml
 create mode 100644 gdbstub/gdb-xml/mips64-fpu.xml
 create mode 100644 gdbstub/gdb-xml/mips64-r5900.xml
 delete mode 100644 tests/tcg/mips/user/isa/r5900/Makefile
 delete mode 100644 tests/tcg/mips/user/isa/r5900/README
 create mode 100644 tests/tcg/mips64el/system/boot.S
 create mode 100644 tests/tcg/mips64el/system/kernel.ld
 create mode 100644 tests/tcg/mips64el/system/meson.build
 create mode 100644 tests/tcg/mips64el/system/test-r5900.py

-- 
2.55.0


Reply via email to