All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH  00/13] Enabling tcg/tests for xtensa, mips and cris
@ 2018-12-10 15:28 Alex Bennée
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 01/13] tests/tcg: add softmmu awareness to Makefile Alex Bennée
                   ` (14 more replies)
  0 siblings, 15 replies; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée

Hi,

This is very much a work in progress but I'm posting it in the hope of
getting some feedback from the architecture maintainers.

When I originally enabled tcg tests I only enabled linux-user tests for
architectures that had easily available compilers. I also skipped over a
bunch of the tests that were already in the tree but didn't build.

Enabling the building of system tests is actually fairly simple. The
patch introduces the concept of Makefile.softmmu-target so we can keep
the build rules nicely separated from that of linux-user targets.

I've enabled system builds for xtensa, cris and mips64. However they all
have some niggles that need sorting out.

Xtensa

The tests all build and run manually but for some reason running under
make break. I think this is something to do with the monitor being
involved in the semihosting output.

MIPS

The existing mips tests are split between 32 bit which are linux-user
tests. I've enabled a chunk of these but adding the mips32r2 aran into
problems with make which I haven't yet figured out despite having
targets in different build directories. The mipsr5900 build is limited
by the fact that upstream GCC doesn't seem to support the build type.

The 64 bit mips tests are system tests and are built for the
mips64el-softmmu target. Getting them to build has been more problematic
possibly because there is a bunch of target flags I don't understand.
For example why does FLAGS define have -march=mips64r2 for the mip64-dsp
target?

I could do with some guidance from the MIPS guys here about the right
toolchain and build options.

CRIS

Again I've gotten these building. I had to skip a bunch of tests because
it seems the upstream cris compiler:

cris-linux-gnu-gcc (GCC) 7.2.1 20170915 (Red Hat Cross 7.2.1-1)

Can't build all the cris tests because it doesn't support all the
versions of the architecture. Secondly I'm not sure how these tests are
meant to be invoked within QEMU. They originally come from the binutils
simulator (SIM) and are split into ctst (linux-user) and tst (simulator)
tests. As we can only build system tests with the cris cross compiler
I've stuck to those but I'm unsure how they are meant to be invoked.

I actually started down this road to add Stefan's microbit tests to the
build. You can see this commit:

[https://github.com/stsquad/qemu/commit/727e106204e867cc42dc8fa44f84b013c7f7fcb7]

For how easy it was to add. As this is an RFC I've included all the
aspirational work in progress for our more esoteric architectures so
maintainers can have a play. The next iteration of the series will only
include working patches ;-)

Alex Bennée (12):
  tests/tcg: add softmmu awareness to Makefile
  tests: enable tcg tests for softmmu
  tests/tcg: add QEMU_OPT option for test runner
  tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user
    (WIP)
  tests/tcg/mips: enable mips64 system tests (WIP)
  tests/tcg/xtensa: enable system tests
  tests/docker: add fedora-cris-cross compilers
  tests/tcg: split cris tests into system and user mode
  tests/tcg/cris: cleanup sys.c
  tests/tcg/cris: comment out the ccs test
  tests/tcg/cris: align mul operations
  tests/tcg: enable cris system tests

Philippe Mathieu-Daudé (1):
  tests/docker: add debian-xtensa-cross image

 Makefile.target                               |   2 -
 tests/Makefile.include                        |   7 +-
 tests/docker/Makefile.include                 |   1 +
 .../dockerfiles/debian-xtensa-cross.docker    |  31 ++
 .../dockerfiles/fedora-cris-cross.docker      |   8 +
 tests/tcg/Makefile                            |  21 +-
 tests/tcg/Makefile.include                    |   2 +-
 tests/tcg/cris/Makefile                       | 168 ---------
 tests/tcg/cris/Makefile.include               |   6 +
 tests/tcg/cris/Makefile.softmmu-target        |  50 +++
 tests/tcg/cris/sys.c                          |  59 ---
 tests/tcg/cris/{ => system}/check_addcv17.s   |   0
 tests/tcg/cris/{ => system}/check_addi.s      |   0
 tests/tcg/cris/{ => system}/check_addiv32.s   |   0
 tests/tcg/cris/{ => system}/check_addm.s      |   0
 tests/tcg/cris/{ => system}/check_addq.s      |   0
 tests/tcg/cris/{ => system}/check_addr.s      |   0
 tests/tcg/cris/{ => system}/check_addxc.s     |   0
 tests/tcg/cris/{ => system}/check_addxm.s     |   0
 tests/tcg/cris/{ => system}/check_addxr.s     |   0
 tests/tcg/cris/{ => system}/check_andc.s      |   0
 tests/tcg/cris/{ => system}/check_andm.s      |   0
 tests/tcg/cris/{ => system}/check_andq.s      |   0
 tests/tcg/cris/{ => system}/check_andr.s      |   0
 tests/tcg/cris/{ => system}/check_asr.s       |   0
 tests/tcg/cris/{ => system}/check_ba.s        |   0
 tests/tcg/cris/{ => system}/check_bas.s       |   0
 tests/tcg/cris/{ => system}/check_bcc.s       |   0
 tests/tcg/cris/{ => system}/check_boundc.s    |   0
 tests/tcg/cris/{ => system}/check_boundr.s    |   0
 tests/tcg/cris/{ => system}/check_btst.s      |  14 +-
 tests/tcg/cris/{ => system}/check_clearfv32.s |   0
 tests/tcg/cris/{ => system}/check_clrjmp1.s   |   0
 tests/tcg/cris/{ => system}/check_cmp-2.s     |   0
 tests/tcg/cris/{ => system}/check_cmpc.s      |   0
 tests/tcg/cris/{ => system}/check_cmpm.s      |   0
 tests/tcg/cris/{ => system}/check_cmpq.s      |   0
 tests/tcg/cris/{ => system}/check_cmpr.s      |   0
 tests/tcg/cris/{ => system}/check_cmpxc.s     |   0
 tests/tcg/cris/{ => system}/check_cmpxm.s     |   0
 tests/tcg/cris/{ => system}/check_dstep.s     |   0
 tests/tcg/cris/{ => system}/check_jsr.s       |   0
 tests/tcg/cris/{ => system}/check_lapc.s      |   0
 tests/tcg/cris/{ => system}/check_lsl.s       |   0
 tests/tcg/cris/{ => system}/check_lsr.s       |   0
 tests/tcg/cris/{ => system}/check_mcp.s       |   0
 tests/tcg/cris/{ => system}/check_movdelsr1.s |   0
 tests/tcg/cris/{ => system}/check_movecr.s    |   0
 tests/tcg/cris/{ => system}/check_movei.s     |   0
 tests/tcg/cris/{ => system}/check_movemr.s    |   0
 tests/tcg/cris/{ => system}/check_movemrv32.s |   0
 tests/tcg/cris/{ => system}/check_mover.s     |   0
 tests/tcg/cris/{ => system}/check_moverm.s    |   0
 tests/tcg/cris/{ => system}/check_movmp.s     |   0
 tests/tcg/cris/{ => system}/check_movpmv32.s  |   0
 tests/tcg/cris/{ => system}/check_movpr.s     |   0
 tests/tcg/cris/{ => system}/check_movprv32.s  |   0
 tests/tcg/cris/{ => system}/check_movscr.s    |   0
 tests/tcg/cris/{ => system}/check_movsm.s     |   0
 tests/tcg/cris/{ => system}/check_movsr.s     |   0
 tests/tcg/cris/{ => system}/check_movucr.s    |   0
 tests/tcg/cris/{ => system}/check_movum.s     |   0
 tests/tcg/cris/{ => system}/check_movur.s     |   0
 tests/tcg/cris/{ => system}/check_mulv32.s    |   0
 tests/tcg/cris/{ => system}/check_mulx.s      |  11 +
 tests/tcg/cris/{ => system}/check_neg.s       |   0
 tests/tcg/cris/{ => system}/check_not.s       |   0
 tests/tcg/cris/{ => system}/check_orc.s       |   0
 tests/tcg/cris/{ => system}/check_orm.s       |   0
 tests/tcg/cris/{ => system}/check_orq.s       |   0
 tests/tcg/cris/{ => system}/check_orr.s       |   0
 tests/tcg/cris/{ => system}/check_ret.s       |   0
 tests/tcg/cris/{ => system}/check_scc.s       |   0
 tests/tcg/cris/{ => system}/check_subc.s      |   0
 tests/tcg/cris/{ => system}/check_subm.s      |   0
 tests/tcg/cris/{ => system}/check_subq.s      |   0
 tests/tcg/cris/{ => system}/check_subr.s      |   0
 tests/tcg/cris/{ => system}/check_xarith.s    |   0
 tests/tcg/cris/{ => system}/crt.s             |   0
 tests/tcg/cris/system/sys.c                   |  59 +++
 tests/tcg/cris/{ => system}/testutils.inc     |   0
 tests/tcg/cris/{ => user}/check_abs.c         |   0
 tests/tcg/cris/{ => user}/check_addc.c        |   0
 tests/tcg/cris/{ => user}/check_addcm.c       |   0
 tests/tcg/cris/{ => user}/check_addo.c        |   0
 tests/tcg/cris/{ => user}/check_addoq.c       |   0
 tests/tcg/cris/{ => user}/check_bound.c       |   0
 tests/tcg/cris/{ => user}/check_ftag.c        |   0
 .../{ => user}/check_glibc_kernelversion.c    |   0
 tests/tcg/cris/{ => user}/check_hello.c       |   0
 tests/tcg/cris/{ => user}/check_int64.c       |   0
 tests/tcg/cris/{ => user}/check_lz.c          |   0
 tests/tcg/cris/{ => user}/check_mapbrk.c      |   0
 tests/tcg/cris/{ => user}/check_mmap1.c       |   0
 tests/tcg/cris/{ => user}/check_mmap2.c       |   0
 tests/tcg/cris/{ => user}/check_mmap3.c       |   0
 tests/tcg/cris/{ => user}/check_moveq.c       |   0
 tests/tcg/cris/{ => user}/check_openpf1.c     |   0
 tests/tcg/cris/{ => user}/check_openpf2.c     |   0
 tests/tcg/cris/{ => user}/check_openpf3.c     |   0
 tests/tcg/cris/{ => user}/check_openpf5.c     |   0
 tests/tcg/cris/{ => user}/check_settls1.c     |   0
 tests/tcg/cris/{ => user}/check_sigalrm.c     |   0
 tests/tcg/cris/{ => user}/check_stat1.c       |   0
 tests/tcg/cris/{ => user}/check_stat2.c       |   0
 tests/tcg/cris/{ => user}/check_stat3.c       |   0
 tests/tcg/cris/{ => user}/check_stat4.c       |   0
 tests/tcg/cris/{ => user}/check_swap.c        |   0
 tests/tcg/cris/{ => user}/check_time2.c       |   0
 tests/tcg/cris/{ => user}/crisutils.h         |   0
 tests/tcg/cris/{ => user}/sys.h               |   0
 tests/tcg/mips/Makefile.softmmu-target        |  20 ++
 tests/tcg/mips/Makefile.target                |  15 +-
 tests/tcg/mips/mips32-dsp/Makefile            | 166 ++-------
 tests/tcg/mips/mips32-dspr2/Makefile          |  83 +----
 tests/tcg/mips/mips64-dsp/Makefile            | 336 +++---------------
 tests/tcg/mips/mipsr5900/Makefile             |  40 +--
 tests/tcg/xtensa/Makefile                     |  93 -----
 tests/tcg/xtensa/Makefile.include             |   7 +
 tests/tcg/xtensa/Makefile.softmmu-target      |  43 +++
 120 files changed, 385 insertions(+), 857 deletions(-)
 create mode 100644 tests/docker/dockerfiles/debian-xtensa-cross.docker
 create mode 100644 tests/docker/dockerfiles/fedora-cris-cross.docker
 delete mode 100644 tests/tcg/cris/Makefile
 create mode 100644 tests/tcg/cris/Makefile.include
 create mode 100644 tests/tcg/cris/Makefile.softmmu-target
 delete mode 100644 tests/tcg/cris/sys.c
 rename tests/tcg/cris/{ => system}/check_addcv17.s (100%)
 rename tests/tcg/cris/{ => system}/check_addi.s (100%)
 rename tests/tcg/cris/{ => system}/check_addiv32.s (100%)
 rename tests/tcg/cris/{ => system}/check_addm.s (100%)
 rename tests/tcg/cris/{ => system}/check_addq.s (100%)
 rename tests/tcg/cris/{ => system}/check_addr.s (100%)
 rename tests/tcg/cris/{ => system}/check_addxc.s (100%)
 rename tests/tcg/cris/{ => system}/check_addxm.s (100%)
 rename tests/tcg/cris/{ => system}/check_addxr.s (100%)
 rename tests/tcg/cris/{ => system}/check_andc.s (100%)
 rename tests/tcg/cris/{ => system}/check_andm.s (100%)
 rename tests/tcg/cris/{ => system}/check_andq.s (100%)
 rename tests/tcg/cris/{ => system}/check_andr.s (100%)
 rename tests/tcg/cris/{ => system}/check_asr.s (100%)
 rename tests/tcg/cris/{ => system}/check_ba.s (100%)
 rename tests/tcg/cris/{ => system}/check_bas.s (100%)
 rename tests/tcg/cris/{ => system}/check_bcc.s (100%)
 rename tests/tcg/cris/{ => system}/check_boundc.s (100%)
 rename tests/tcg/cris/{ => system}/check_boundr.s (100%)
 rename tests/tcg/cris/{ => system}/check_btst.s (89%)
 rename tests/tcg/cris/{ => system}/check_clearfv32.s (100%)
 rename tests/tcg/cris/{ => system}/check_clrjmp1.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmp-2.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmpc.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmpm.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmpq.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmpr.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmpxc.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmpxm.s (100%)
 rename tests/tcg/cris/{ => system}/check_dstep.s (100%)
 rename tests/tcg/cris/{ => system}/check_jsr.s (100%)
 rename tests/tcg/cris/{ => system}/check_lapc.s (100%)
 rename tests/tcg/cris/{ => system}/check_lsl.s (100%)
 rename tests/tcg/cris/{ => system}/check_lsr.s (100%)
 rename tests/tcg/cris/{ => system}/check_mcp.s (100%)
 rename tests/tcg/cris/{ => system}/check_movdelsr1.s (100%)
 rename tests/tcg/cris/{ => system}/check_movecr.s (100%)
 rename tests/tcg/cris/{ => system}/check_movei.s (100%)
 rename tests/tcg/cris/{ => system}/check_movemr.s (100%)
 rename tests/tcg/cris/{ => system}/check_movemrv32.s (100%)
 rename tests/tcg/cris/{ => system}/check_mover.s (100%)
 rename tests/tcg/cris/{ => system}/check_moverm.s (100%)
 rename tests/tcg/cris/{ => system}/check_movmp.s (100%)
 rename tests/tcg/cris/{ => system}/check_movpmv32.s (100%)
 rename tests/tcg/cris/{ => system}/check_movpr.s (100%)
 rename tests/tcg/cris/{ => system}/check_movprv32.s (100%)
 rename tests/tcg/cris/{ => system}/check_movscr.s (100%)
 rename tests/tcg/cris/{ => system}/check_movsm.s (100%)
 rename tests/tcg/cris/{ => system}/check_movsr.s (100%)
 rename tests/tcg/cris/{ => system}/check_movucr.s (100%)
 rename tests/tcg/cris/{ => system}/check_movum.s (100%)
 rename tests/tcg/cris/{ => system}/check_movur.s (100%)
 rename tests/tcg/cris/{ => system}/check_mulv32.s (100%)
 rename tests/tcg/cris/{ => system}/check_mulx.s (98%)
 rename tests/tcg/cris/{ => system}/check_neg.s (100%)
 rename tests/tcg/cris/{ => system}/check_not.s (100%)
 rename tests/tcg/cris/{ => system}/check_orc.s (100%)
 rename tests/tcg/cris/{ => system}/check_orm.s (100%)
 rename tests/tcg/cris/{ => system}/check_orq.s (100%)
 rename tests/tcg/cris/{ => system}/check_orr.s (100%)
 rename tests/tcg/cris/{ => system}/check_ret.s (100%)
 rename tests/tcg/cris/{ => system}/check_scc.s (100%)
 rename tests/tcg/cris/{ => system}/check_subc.s (100%)
 rename tests/tcg/cris/{ => system}/check_subm.s (100%)
 rename tests/tcg/cris/{ => system}/check_subq.s (100%)
 rename tests/tcg/cris/{ => system}/check_subr.s (100%)
 rename tests/tcg/cris/{ => system}/check_xarith.s (100%)
 rename tests/tcg/cris/{ => system}/crt.s (100%)
 create mode 100644 tests/tcg/cris/system/sys.c
 rename tests/tcg/cris/{ => system}/testutils.inc (100%)
 rename tests/tcg/cris/{ => user}/check_abs.c (100%)
 rename tests/tcg/cris/{ => user}/check_addc.c (100%)
 rename tests/tcg/cris/{ => user}/check_addcm.c (100%)
 rename tests/tcg/cris/{ => user}/check_addo.c (100%)
 rename tests/tcg/cris/{ => user}/check_addoq.c (100%)
 rename tests/tcg/cris/{ => user}/check_bound.c (100%)
 rename tests/tcg/cris/{ => user}/check_ftag.c (100%)
 rename tests/tcg/cris/{ => user}/check_glibc_kernelversion.c (100%)
 rename tests/tcg/cris/{ => user}/check_hello.c (100%)
 rename tests/tcg/cris/{ => user}/check_int64.c (100%)
 rename tests/tcg/cris/{ => user}/check_lz.c (100%)
 rename tests/tcg/cris/{ => user}/check_mapbrk.c (100%)
 rename tests/tcg/cris/{ => user}/check_mmap1.c (100%)
 rename tests/tcg/cris/{ => user}/check_mmap2.c (100%)
 rename tests/tcg/cris/{ => user}/check_mmap3.c (100%)
 rename tests/tcg/cris/{ => user}/check_moveq.c (100%)
 rename tests/tcg/cris/{ => user}/check_openpf1.c (100%)
 rename tests/tcg/cris/{ => user}/check_openpf2.c (100%)
 rename tests/tcg/cris/{ => user}/check_openpf3.c (100%)
 rename tests/tcg/cris/{ => user}/check_openpf5.c (100%)
 rename tests/tcg/cris/{ => user}/check_settls1.c (100%)
 rename tests/tcg/cris/{ => user}/check_sigalrm.c (100%)
 rename tests/tcg/cris/{ => user}/check_stat1.c (100%)
 rename tests/tcg/cris/{ => user}/check_stat2.c (100%)
 rename tests/tcg/cris/{ => user}/check_stat3.c (100%)
 rename tests/tcg/cris/{ => user}/check_stat4.c (100%)
 rename tests/tcg/cris/{ => user}/check_swap.c (100%)
 rename tests/tcg/cris/{ => user}/check_time2.c (100%)
 rename tests/tcg/cris/{ => user}/crisutils.h (100%)
 rename tests/tcg/cris/{ => user}/sys.h (100%)
 create mode 100644 tests/tcg/mips/Makefile.softmmu-target
 delete mode 100644 tests/tcg/xtensa/Makefile
 create mode 100644 tests/tcg/xtensa/Makefile.include
 create mode 100644 tests/tcg/xtensa/Makefile.softmmu-target

-- 
2.17.1

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH 01/13] tests/tcg: add softmmu awareness to Makefile
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2018-12-11 13:38   ` Richard Henderson
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 02/13] tests: enable tcg tests for softmmu Alex Bennée
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée, Philippe Mathieu-Daudé

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/Makefile         | 17 ++++++++++++++++-
 tests/tcg/Makefile.include |  2 +-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index bf06415390..d6a7fee2e7 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -26,7 +26,7 @@
 #
 # We also accept SPEED=slow to enable slower running tests
 #
-# We also expect to be in the tests build dir for the FOO-linux-user.
+# We also expect to be in the tests build dir for the FOO-(linux-user|softmmu).
 #
 
 -include ../../config-host.mak
@@ -52,7 +52,11 @@ QEMU_CFLAGS=
 LDFLAGS=
 
 # The QEMU for this TARGET
+ifdef CONFIG_USER_ONLY
 QEMU=../qemu-$(TARGET_NAME)
+else
+QEMU=../qemu-system-$(TARGET_NAME)
+endif
 
 # If TCG debugging is enabled things are a lot slower
 ifeq ($(CONFIG_DEBUG_TCG),y)
@@ -61,6 +65,7 @@ else
 TIMEOUT=15
 endif
 
+ifdef CONFIG_USER_ONLY
 # The order we include is important. We include multiarch, base arch
 # and finally arch if it's not the same as base arch.
 -include $(SRC_PATH)/tests/tcg/multiarch/Makefile.target
@@ -77,6 +82,16 @@ endif
 
 %: %.c
 	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
+else
+# For softmmu targets we inculde a different Makefile fragement as the
+# build options for bare programs are usually pretty different. They
+# are expected to provide their own build recipes.
+-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.softmmu-target
+ifneq ($(TARGET_BASE_ARCH),$(TARGET_NAME))
+-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.softmmu-target
+endif
+
+endif
 
 all: $(TESTS)
 
diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include
index c581bd6ffc..73b5626fc5 100644
--- a/tests/tcg/Makefile.include
+++ b/tests/tcg/Makefile.include
@@ -67,7 +67,7 @@ endif
 ifneq ($(GUEST_BUILD),)
 guest-tests: $(GUEST_BUILD)
 
-run-guest-tests: guest-tests qemu-$(TARGET_NAME)
+run-guest-tests: guest-tests qemu-$(subst y,system-,$(CONFIG_SOFTMMU))$(TARGET_NAME)
 	$(call quiet-command, \
 	(cd tests && $(MAKE) -f $(TCG_MAKE) SPEED=$(SPEED) run), \
 	"RUN", "tests for $(TARGET_NAME)")
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH 02/13] tests: enable tcg tests for softmmu
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 01/13] tests/tcg: add softmmu awareness to Makefile Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2018-12-11 13:39   ` Richard Henderson
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 03/13] tests/tcg: add QEMU_OPT option for test runner Alex Bennée
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 Makefile.target        | 2 --
 tests/Makefile.include | 7 +++----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 4d56298bbf..a0fe085bae 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -37,9 +37,7 @@ PROGS=$(QEMU_PROG) $(QEMU_PROGW)
 STPFILES=
 
 # Makefile Tests
-ifdef CONFIG_USER_ONLY
 include $(SRC_PATH)/tests/tcg/Makefile.include
-endif
 
 config-target.h: config-target.h-timestamp
 config-target.h-timestamp: config-target.mak
diff --git a/tests/Makefile.include b/tests/Makefile.include
index fb0b449c02..7dd9ecc2be 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -837,10 +837,9 @@ check-report.html: check-report.xml
 
 # Per guest TCG tests
 
-LINUX_USER_TARGETS=$(filter %-linux-user,$(TARGET_DIRS))
-BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(LINUX_USER_TARGETS))
-CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(LINUX_USER_TARGETS))
-RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(LINUX_USER_TARGETS))
+BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGET_DIRS))
+CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TARGET_DIRS))
+RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGET_DIRS))
 
 ifeq ($(HAVE_USER_DOCKER),y)
 # Probe for the Docker Builds needed for each build
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH 03/13] tests/tcg: add QEMU_OPT option for test runner
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 01/13] tests/tcg: add softmmu awareness to Makefile Alex Bennée
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 02/13] tests: enable tcg tests for softmmu Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2018-12-11 13:39   ` Richard Henderson
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP) Alex Bennée
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée, Philippe Mathieu-Daudé

This will allow tests to modify the QEMU invocation with for example
different -cpu stazas without having to define a whole new set of
runner types.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index d6a7fee2e7..e7215e8455 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -58,6 +58,8 @@ else
 QEMU=../qemu-system-$(TARGET_NAME)
 endif
 
+QEMU_OPTS=
+
 # If TCG debugging is enabled things are a lot slower
 ifeq ($(CONFIG_DEBUG_TCG),y)
 TIMEOUT=45
@@ -108,7 +110,7 @@ RUN_TESTS=$(patsubst %,run-%, $(TESTS))
 RUN_TESTS+=$(EXTRA_RUNS)
 
 run-%: %
-	$(call run-test, $<, $(QEMU) $<, "$< on $(TARGET_NAME)")
+	$(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on $(TARGET_NAME) $(QEMU_OPTS)")
 
 .PHONY: run
 run: $(RUN_TESTS)
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP)
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
                   ` (2 preceding siblings ...)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 03/13] tests/tcg: add QEMU_OPT option for test runner Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2018-12-11  9:54   ` Aleksandar Markovic
                     ` (2 more replies)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 05/13] tests/tcg/mips: enable mips64 system tests (WIP) Alex Bennée
                   ` (10 subsequent siblings)
  14 siblings, 3 replies; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée, Stefan Markovic

Convert the existing tests to use our common cross build
infrastructure.

[WIP: mips32r2 disabled to avoid name clash]
[WIP: mipsr5900 disabled due to clashing build flags]

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/mips/Makefile.target       |  15 ++-
 tests/tcg/mips/mips32-dsp/Makefile   | 166 +++++----------------------
 tests/tcg/mips/mips32-dspr2/Makefile |  83 +++-----------
 tests/tcg/mips/mipsr5900/Makefile    |  40 +++----
 4 files changed, 75 insertions(+), 229 deletions(-)

diff --git a/tests/tcg/mips/Makefile.target b/tests/tcg/mips/Makefile.target
index 086625f533..33bb25bf8d 100644
--- a/tests/tcg/mips/Makefile.target
+++ b/tests/tcg/mips/Makefile.target
@@ -15,8 +15,17 @@ TESTS += $(MIPS_TESTS)
 hello-mips: CFLAGS+=-ffreestanding
 hello-mips: LDFLAGS+=-nostdlib
 
-# For MIPS32 and 64 we have a bunch of extra tests in sub-directories
-# however they are intended for system tests.
-
 run-hello-mips: hello-mips
 	$(call skip-test, $<, "BROKEN")
+
+# For MIPS32 and mipsr5900 we have a bunch of extra tests in sub-directories
+
+ifeq ($(TARGET_NAME),mipsel)
+-include $(MIPS_SRC)/mips32-dsp/Makefile
+
+# FIXME: doesn't build - names clash with mips32-dsp
+#-include $(MIPS_SRC)/mips32-dspr2/Makefile
+
+# FIXME: the docker compiler can't build the binaries
+#-include $(MIPS_SRC)/mipsr5900/Makefile
+endif
diff --git a/tests/tcg/mips/mips32-dsp/Makefile b/tests/tcg/mips/mips32-dsp/Makefile
index c3a0a00944..df2dddceaa 100644
--- a/tests/tcg/mips/mips32-dsp/Makefile
+++ b/tests/tcg/mips/mips32-dsp/Makefile
@@ -1,136 +1,30 @@
--include ../../config-host.mak
-
-CROSS=mips64el-unknown-linux-gnu-
-
-SIM=qemu-mipsel
-SIM_FLAGS=-cpu 74Kf
-
-CC      = $(CROSS)gcc
-CFLAGS  = -mabi=32 -march=mips32r2 -mgp32 -mdsp -static
-
-TESTCASES = absq_s_ph.tst
-TESTCASES += absq_s_w.tst
-TESTCASES += addq_ph.tst
-TESTCASES += addq_s_ph.tst
-TESTCASES += addq_s_w.tst
-TESTCASES += addsc.tst
-TESTCASES += addu_qb.tst
-TESTCASES += addu_s_qb.tst
-TESTCASES += addwc.tst
-TESTCASES += bitrev.tst
-TESTCASES += bposge32.tst
-TESTCASES += cmp_eq_ph.tst
-TESTCASES += cmpgu_eq_qb.tst
-TESTCASES += cmpgu_le_qb.tst
-TESTCASES += cmpgu_lt_qb.tst
-TESTCASES += cmp_le_ph.tst
-TESTCASES += cmp_lt_ph.tst
-TESTCASES += cmpu_eq_qb.tst
-TESTCASES += cmpu_le_qb.tst
-TESTCASES += cmpu_lt_qb.tst
-TESTCASES += dpaq_sa_l_w.tst
-TESTCASES += dpaq_s_w_ph.tst
-TESTCASES += dpau_h_qbl.tst
-TESTCASES += dpau_h_qbr.tst
-TESTCASES += dpsq_sa_l_w.tst
-TESTCASES += dpsq_s_w_ph.tst
-TESTCASES += dpsu_h_qbl.tst
-TESTCASES += dpsu_h_qbr.tst
-TESTCASES += extp.tst
-TESTCASES += extpdp.tst
-TESTCASES += extpdpv.tst
-TESTCASES += extpv.tst
-TESTCASES += extr_rs_w.tst
-TESTCASES += extr_r_w.tst
-TESTCASES += extr_s_h.tst
-TESTCASES += extrv_rs_w.tst
-TESTCASES += extrv_r_w.tst
-TESTCASES += extrv_s_h.tst
-TESTCASES += extrv_w.tst
-TESTCASES += extr_w.tst
-TESTCASES += insv.tst
-TESTCASES += lbux.tst
-TESTCASES += lhx.tst
-TESTCASES += lwx.tst
-TESTCASES += madd.tst
-TESTCASES += maddu.tst
-TESTCASES += maq_sa_w_phl.tst
-TESTCASES += maq_sa_w_phr.tst
-TESTCASES += maq_s_w_phl.tst
-TESTCASES += maq_s_w_phr.tst
-TESTCASES += mfhi.tst
-TESTCASES += mflo.tst
-TESTCASES += modsub.tst
-TESTCASES += msub.tst
-TESTCASES += msubu.tst
-TESTCASES += mthi.tst
-TESTCASES += mthlip.tst
-TESTCASES += mtlo.tst
-TESTCASES += muleq_s_w_phl.tst
-TESTCASES += muleq_s_w_phr.tst
-TESTCASES += muleu_s_ph_qbl.tst
-TESTCASES += muleu_s_ph_qbr.tst
-TESTCASES += mulq_rs_ph.tst
-TESTCASES += mult.tst
-TESTCASES += multu.tst
-TESTCASES += packrl_ph.tst
-TESTCASES += pick_ph.tst
-TESTCASES += pick_qb.tst
-TESTCASES += precequ_ph_qbla.tst
-TESTCASES += precequ_ph_qbl.tst
-TESTCASES += precequ_ph_qbra.tst
-TESTCASES += precequ_ph_qbr.tst
-TESTCASES += preceq_w_phl.tst
-TESTCASES += preceq_w_phr.tst
-TESTCASES += preceu_ph_qbla.tst
-TESTCASES += preceu_ph_qbl.tst
-TESTCASES += preceu_ph_qbra.tst
-TESTCASES += preceu_ph_qbr.tst
-TESTCASES += precrq_ph_w.tst
-TESTCASES += precrq_qb_ph.tst
-TESTCASES += precrq_rs_ph_w.tst
-TESTCASES += precrqu_s_qb_ph.tst
-TESTCASES += raddu_w_qb.tst
-TESTCASES += rddsp.tst
-TESTCASES += repl_ph.tst
-TESTCASES += repl_qb.tst
-TESTCASES += replv_ph.tst
-TESTCASES += replv_qb.tst
-TESTCASES += shilo.tst
-TESTCASES += shilov.tst
-TESTCASES += shll_ph.tst
-TESTCASES += shll_qb.tst
-TESTCASES += shll_s_ph.tst
-TESTCASES += shll_s_w.tst
-TESTCASES += shllv_ph.tst
-TESTCASES += shllv_qb.tst
-TESTCASES += shllv_s_ph.tst
-TESTCASES += shllv_s_w.tst
-TESTCASES += shra_ph.tst
-TESTCASES += shra_r_ph.tst
-TESTCASES += shra_r_w.tst
-TESTCASES += shrav_ph.tst
-TESTCASES += shrav_r_ph.tst
-TESTCASES += shrav_r_w.tst
-TESTCASES += shrl_qb.tst
-TESTCASES += shrlv_qb.tst
-TESTCASES += subq_ph.tst
-TESTCASES += subq_s_ph.tst
-TESTCASES += subq_s_w.tst
-TESTCASES += subu_qb.tst
-TESTCASES += subu_s_qb.tst
-TESTCASES += wrdsp.tst
-
-all: $(TESTCASES)
-
-%.tst: %.c
-	$(CC) $(CFLAGS) $< -o $@
-
-check: $(TESTCASES)
-	@for case in $(TESTCASES); do \
-        echo $(SIM) $(SIM_FLAGS) ./$$case;\
-        $(SIM) $(SIM_FLAGS) ./$$case; \
-	done
-
-clean:
-	$(RM) -rf $(TESTCASES)
+#
+# MIPS32-DSP linux-user tests
+#
+# We don't set the VPATH for these tests as we re-use the VPATH from
+# ../Makefile and add explicit paths for the source to avoid name clashes
+# between the various sub-dirs.
+#
+
+MIPS32DSP_SRC = $(SRC_PATH)/tests/tcg/mips/mips32-dsp
+MIPS32DSP_ALL = $(wildcard $(MIPS32DSP_SRC)/*.c)
+MIPS32DSP_TESTS = $(patsubst $(MIPS32DSP_SRC)/%.c, mips32-dsp/%, $(MIPS32DSP_ALL))
+MIPS32DSP_RUNS = $(patsubst %, run-%, $(MIPS32DSP_TESTS))
+
+# add to the list of tests
+TESTS += $(MIPS32DSP_TESTS)
+
+# We need a rule to ensure we create a sub-directory to build in
+# It is a PHONY target to prevent confusion with MIPS32DSP_SRC
+.PHONY: mips32-dsp.build
+mips32-dsp.build:
+	mkdir -p mips32-dsp
+
+$(MIPS32DSP_TESTS): | mips32-dsp.build
+$(MIPS32DSP_TESTS): CFLAGS+=-mabi=32 -march=mips32r2 -mgp32 -mdsp
+
+$(MIPS32DSP_RUNS): QEMU_OPTS=-cpu 74Kf
+
+# FIXME: I don't know why the general rule in tests/tcg/Makefile isn't enough
+run-mips32-dsp/%: mips32-dsp/%
+	$(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on $(TARGET_NAME) $(QEMU_OPTS)")
diff --git a/tests/tcg/mips/mips32-dspr2/Makefile b/tests/tcg/mips/mips32-dspr2/Makefile
index ed19581c7e..6da966abb6 100644
--- a/tests/tcg/mips/mips32-dspr2/Makefile
+++ b/tests/tcg/mips/mips32-dspr2/Makefile
@@ -1,71 +1,24 @@
--include ../../config-host.mak
+#
+# MIPS32-DSPR2 linux-user tests
+#
 
-CROSS=mips64el-unknown-linux-gnu-
+MIPS32_DSPR2_SRC = $(SRC_PATH)/tests/tcg/mips/mips32-dsp
+MIPS32_DSPR2_ALL = $(wildcard $(MIPS32_DSPR2_SRC)/*.c)
+MIPS32_DSPR2_TESTS = $(patsubst $(MIPS32_DSPR2_SRC)/%.c, mips32-dspr2/%, $(MIPS32_DSPR2_ALL))
+MIPS32_DSPR2_RUNS = $(patsubst %, run-%, $(MIPS32_DSPR2_TESTS))
 
-SIM=qemu-mipsel
-SIM_FLAGS=-cpu 74Kf
+# add to the list of tests
+TESTS += $(MIPS32_DSPR2_TESTS)
 
-CC      = $(CROSS)gcc
-CFLAGS  = -mabi=32 -march=mips32r2 -mgp32 -mdspr2 -static
+.PHONY: mips32-dspr2.build
+mips32-dspr2.build:
+	mkdir -p mips32-dspr2
 
-TESTCASES = absq_s_qb.tst
-TESTCASES += addqh_ph.tst
-TESTCASES += addqh_r_ph.tst
-TESTCASES += addqh_r_w.tst
-TESTCASES += addqh_w.tst
-TESTCASES += adduh_qb.tst
-TESTCASES += adduh_r_qb.tst
-TESTCASES += addu_ph.tst
-TESTCASES += addu_s_ph.tst
-TESTCASES += append.tst
-TESTCASES += balign.tst
-TESTCASES += cmpgdu_eq_qb.tst
-TESTCASES += cmpgdu_le_qb.tst
-TESTCASES += cmpgdu_lt_qb.tst
-TESTCASES += dpaqx_sa_w_ph.tst
-TESTCASES += dpa_w_ph.tst
-TESTCASES += dpax_w_ph.tst
-TESTCASES += dpaqx_s_w_ph.tst
-TESTCASES += dpsqx_sa_w_ph.tst
-TESTCASES += dpsqx_s_w_ph.tst
-TESTCASES += dps_w_ph.tst
-TESTCASES += dpsx_w_ph.tst
-TESTCASES += mul_ph.tst
-TESTCASES += mulq_rs_w.tst
-TESTCASES += mulq_s_ph.tst
-TESTCASES += mulq_s_w.tst
-TESTCASES += mulsaq_s_w_ph.tst
-TESTCASES += mulsa_w_ph.tst
-TESTCASES += mul_s_ph.tst
-TESTCASES += precr_qb_ph.tst
-TESTCASES += precr_sra_ph_w.tst
-TESTCASES += precr_sra_r_ph_w.tst
-TESTCASES += prepend.tst
-TESTCASES += shra_qb.tst
-TESTCASES += shra_r_qb.tst
-TESTCASES += shrav_qb.tst
-TESTCASES += shrav_r_qb.tst
-TESTCASES += shrl_ph.tst
-TESTCASES += shrlv_ph.tst
-TESTCASES += subqh_ph.tst
-TESTCASES += subqh_r_ph.tst
-TESTCASES += subqh_r_w.tst
-TESTCASES += subqh_w.tst
-TESTCASES += subuh_qb.tst
-TESTCASES += subuh_r_qb.tst
-TESTCASES += subu_ph.tst
-TESTCASES += subu_s_ph.tst
+$(MIPS32_DSPR2_TESTS): | mips32-dspr2.build
+$(MIPS32_DSPR2_TESTS): CFLAGS+=-mabi=32 -march=mips32r2 -mgp32 -mdspr2
 
-all: $(TESTCASES)
+$(MIPS32_DSPR2_RUNS): QEMU_OPTS=-cpu 74Kf
 
-%.tst: %.c
-	$(CC) $(CFLAGS) $< -o $@
-
-check: $(TESTCASES)
-	@for case in $(TESTCASES); do \
-        echo $(SIM) $(SIM_FLAGS) ./$$case;\
-		$(SIM) $(SIM_FLAGS) ./$$case; \
-	done
-
-clean:
-	$(RM) -rf $(TESTCASES)
+# FIXME: I don't know why the general rule in tests/tcg/Makefile isn't enough
+run-mips32-dspr2/%: mips32-dspr2/%
+	$(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on $(TARGET_NAME) $(QEMU_OPTS)")
diff --git a/tests/tcg/mips/mipsr5900/Makefile b/tests/tcg/mips/mipsr5900/Makefile
index a1c388bc3c..7880e76986 100644
--- a/tests/tcg/mips/mipsr5900/Makefile
+++ b/tests/tcg/mips/mipsr5900/Makefile
@@ -1,30 +1,20 @@
--include ../../config-host.mak
+#
+# MIPSR5900 linux-user tests
+#
 
-CROSS=mipsr5900el-unknown-linux-gnu-
+MIPSR5900_SRC = $(SRC_PATH)/tests/tcg/mips/mipsr5900
+MIPSR5900_ALL = $(wildcard $(MIPSR5900_SRC)/*.c)
+MIPSR5900_TESTS = $(patsubst $(MIPSR5900_SRC)/%.c, %, $(MIPSR5900_ALL))
+MIPSR5900_RUNS = $(patsubst %, run-%, $(MIPSR5900_TESTS))
 
-SIM=qemu-mipsel
-SIM_FLAGS=-cpu R5900
+# add to the list of tests
+TESTS += $(MIPSR5900_TESTS)
 
-CC      = $(CROSS)gcc
-CFLAGS  = -Wall -mabi=32 -march=r5900 -static
+.PHONY: mipsr5900.build
+mipsr5900.build:
+	mkdir -p mipsr5900
 
-TESTCASES = div1.tst
-TESTCASES += divu1.tst
-TESTCASES += mflohi1.tst
-TESTCASES += mtlohi1.tst
-TESTCASES += mult.tst
-TESTCASES += multu.tst
+$(MIPS32DSP_TESTS): | mipsr5900.build
+$(MIPSR5900_TESTS): CFLAGS+=-mabi=32 -march=r5900 -msingle-float
 
-all: $(TESTCASES)
-
-%.tst: %.c
-	$(CC) $(CFLAGS) $< -o $@
-
-check: $(TESTCASES)
-	@for case in $(TESTCASES); do \
-        echo $(SIM) $(SIM_FLAGS) ./$$case;\
-        $(SIM) $(SIM_FLAGS) ./$$case; \
-	done
-
-clean:
-	$(RM) -rf $(TESTCASES)
+$(MIPSR5900_RUNS): QEMU_OPTS=-cpu R5900
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH 05/13] tests/tcg/mips: enable mips64 system tests (WIP)
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
                   ` (3 preceding siblings ...)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP) Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2018-12-27 18:40   ` Aleksandar Markovic
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 06/13] tests/docker: add debian-xtensa-cross image Alex Bennée
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée, Stefan Markovic

The mips64-dsp and mips64-dspr2 tests are softmmu tests. Tweaks the
makefiles to use the tcg tests build system.

[WIP: currently won't link but the flags for HEAD vs CFLAGS seem odd]

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/mips/Makefile.softmmu-target |  20 ++
 tests/tcg/mips/mips64-dsp/Makefile     | 336 ++++---------------------
 2 files changed, 64 insertions(+), 292 deletions(-)
 create mode 100644 tests/tcg/mips/Makefile.softmmu-target

diff --git a/tests/tcg/mips/Makefile.softmmu-target b/tests/tcg/mips/Makefile.softmmu-target
new file mode 100644
index 0000000000..79781ae03c
--- /dev/null
+++ b/tests/tcg/mips/Makefile.softmmu-target
@@ -0,0 +1,20 @@
+# -*- Mode: makefile -*-
+#
+# MIPS Softmmu Targets - included from tests/tcg/Makefile.target
+#
+# The system tests for mips cover a number of different devices and
+# softmmu builds so we include only the one appropriate for the
+# current target.
+#
+
+# Set search path for all sources. As there are clashing files in both
+# the mips64-dsp and mips64-dspr2 directories we build the rules
+# explicitly including the directory so VPATH only needs to be the top
+# of the MIPS tests.
+MIPS_SRC = $(SRC_PATH)/tests/tcg/mips
+VPATH 	+= $(MIPS_SRC)
+
+ifeq ($(TARGET_NAME),mips64el)
+-include $(MIPS_SRC)/mips64-dsp/Makefile
+#-include $(MIPS_SRC)/mips64-dspr2/Makefile
+endif
diff --git a/tests/tcg/mips/mips64-dsp/Makefile b/tests/tcg/mips/mips64-dsp/Makefile
index b2ac6b3ffd..55198f3cc9 100644
--- a/tests/tcg/mips/mips64-dsp/Makefile
+++ b/tests/tcg/mips/mips64-dsp/Makefile
@@ -1,306 +1,58 @@
-
-CROSS_COMPILE	?= mips64el-unknown-linux-gnu-
-
-SIM = qemu-system-mips64el
-SIMFLAGS = -nographic -cpu mips64dspr2 -kernel
-
-AS      = $(CROSS_COMPILE)as
-LD      = $(CROSS_COMPILE)ld
-CC      = $(CROSS_COMPILE)gcc
-AR      = $(CROSS_COMPILE)ar
-NM      = $(CROSS_COMPILE)nm
-STRIP       = $(CROSS_COMPILE)strip
-RANLIB      = $(CROSS_COMPILE)ranlib
-OBJCOPY     = $(CROSS_COMPILE)objcopy
-OBJDUMP     = $(CROSS_COMPILE)objdump
-
-VECTORS_OBJ ?= ./head.o ./printf.o
-
-HEAD_FLAGS ?= -nostdinc -mabi=64 -G 0 -mno-abicalls -fno-pic -pipe \
-              -msoft-float -march=mips64 -Wa,-mips64 -Wa,--trap \
-              -msym32 -DKBUILD_64BIT_SYM32 -I./
-
-CFLAGS ?= -nostdinc -mabi=64 -G 0 -mno-abicalls -fno-pic -fno-builtin  \
+#
+# MIPS64-DSP softmmu tests
+#
+
+MIPS64_DSP_SRC = $(SRC_PATH)/tests/tcg/mips/mips64-dsp
+MIPS64_DSP_ALL = $(wildcard $(MIPS64_DSP_SRC)/*.c)
+MIPS64_DSP_TESTS = $(patsubst $(MIPS64_DSP_SRC)/%.c, %, $(MIPS64_DSP_ALL))
+# for now filter out these
+MIPS64_DSP_BROKEN_TESTS  = dappend preceq_l_pwl preceq_l_pwr precequ_qh_obla precequ_qh_obl
+MIPS64_DSP_BROKEN_TESTS += precequ_qh_obra precequ_qh_obr precr_ob_qh precr_sra_qh_pw
+MIPS64_DSP_BROKEN_TESTS += precr_sra_r_qh_pw prependd prependw raddu_l_ob
+MIPS64_DSP_BROKEN_TESTS += shra_ob shra_r_ob shrl_qh shrlv_qh
+MIPS64_DSP_USABLE_TESTS = $(patsubst %,mips64-dsp/%, $(filter-out $(MIPS64_DSP_BROKEN_TESTS), $(MIPS64_DSP_TESTS)))
+MIPS64_DSP_RUNS = $(patsubst %, run-%, $(MIPS64_DSP_USABLE_TESTS))
+
+# add to the list of tests
+TESTS += $(MIPS64_DSP_USABLE_TESTS)
+
+.PHONY: mips64-dsp.build
+mips64-dsp.build:
+	mkdir -p mips64-dsp
+
+# head objects (linked into other binaries)
+VECTORS_OBJ = mips64-dsp/head.o mips64-dsp/printf.o
+.PRECIOUS: $(VECTOR_OBJS)
+
+HEAD_FLAGS = -nostdinc -mabi=64 -G 0 -mno-abicalls -fno-pic -pipe \
+           -msoft-float -march=mips64 -Wa,-mips64 -Wa,--trap \
+           -msym32 -DKBUILD_64BIT_SYM32 -I./
+
+CFLAGS = -nostdinc -mabi=64 -G 0 -mno-abicalls -fno-pic -fno-builtin  \
           -pipe -march=mips64r2 -mgp64 -mdsp -static -Wa,--trap -msym32 \
           -DKBUILD_64BIT_SYM32 -I./
 
-LDFLAGS = -T./mips_boot.lds -L./
+LDFLAGS = -T$(MIPS64_DSP_SRC)/mips_boot.lds -L./mips64-dsp
 FLAGS = -nostdlib -mabi=64 -march=mips64r2 -mgp64 -mdsp
 
+mips64-dsp/head.o: mips64-dsp/head.S | mips64-dsp.build
+	$(CC) $(HEAD_FLAGS) -D"STACK_TOP=0xffffffff80200000" -c $< -o $@
 
-#TESTCASES = absq_s_ob.tst
-TESTCASES = absq_s_ph.tst
-TESTCASES += absq_s_pw.tst
-TESTCASES += absq_s_qh.tst
-TESTCASES += absq_s_w.tst
-TESTCASES += addq_ph.tst
-TESTCASES += addq_pw.tst
-TESTCASES += addq_qh.tst
-TESTCASES += addq_s_ph.tst
-TESTCASES += addq_s_pw.tst
-TESTCASES += addq_s_qh.tst
-TESTCASES += addq_s_w.tst
-TESTCASES += addsc.tst
-TESTCASES += addu_ob.tst
-TESTCASES += addu_qb.tst
-TESTCASES += addu_s_ob.tst
-TESTCASES += addu_s_qb.tst
-TESTCASES += addwc.tst
-TESTCASES += bitrev.tst
-TESTCASES += bposge32.tst
-TESTCASES += bposge64.tst
-TESTCASES += cmp_eq_ph.tst
-TESTCASES += cmp_eq_pw.tst
-TESTCASES += cmp_eq_qh.tst
-TESTCASES += cmpgu_eq_ob.tst
-TESTCASES += cmpgu_eq_qb.tst
-TESTCASES += cmpgu_le_ob.tst
-TESTCASES += cmpgu_le_qb.tst
-TESTCASES += cmpgu_lt_ob.tst
-TESTCASES += cmpgu_lt_qb.tst
-TESTCASES += cmp_le_ph.tst
-TESTCASES += cmp_le_pw.tst
-TESTCASES += cmp_le_qh.tst
-TESTCASES += cmp_lt_ph.tst
-TESTCASES += cmp_lt_pw.tst
-TESTCASES += cmp_lt_qh.tst
-TESTCASES += cmpu_eq_ob.tst
-TESTCASES += cmpu_eq_qb.tst
-TESTCASES += cmpu_le_ob.tst
-TESTCASES += cmpu_le_qb.tst
-TESTCASES += cmpu_lt_ob.tst
-TESTCASES += cmpu_lt_qb.tst
-#TESTCASES += dappend.tst
-TESTCASES += dextp.tst
-TESTCASES += dextpdp.tst
-TESTCASES += dextpdpv.tst
-TESTCASES += dextpv.tst
-TESTCASES += dextr_l.tst
-TESTCASES += dextr_r_l.tst
-TESTCASES += dextr_rs_l.tst
-TESTCASES += dextr_rs_w.tst
-TESTCASES += dextr_r_w.tst
-TESTCASES += dextr_s_h.tst
-TESTCASES += dextrv_l.tst
-TESTCASES += dextrv_r_l.tst
-TESTCASES += dextrv_rs_l.tst
-TESTCASES += dextrv_rs_w.tst
-TESTCASES += dextrv_r_w.tst
-TESTCASES += dextrv_s_h.tst
-TESTCASES += dextrv_w.tst
-TESTCASES += dextr_w.tst
-TESTCASES += dinsv.tst
-TESTCASES += dmadd.tst
-TESTCASES += dmaddu.tst
-TESTCASES += dmsub.tst
-TESTCASES += dmsubu.tst
-TESTCASES += dmthlip.tst
-TESTCASES += dpaq_sa_l_pw.tst
-TESTCASES += dpaq_sa_l_w.tst
-TESTCASES += dpaq_s_w_ph.tst
-TESTCASES += dpaq_s_w_qh.tst
-TESTCASES += dpau_h_obl.tst
-TESTCASES += dpau_h_obr.tst
-TESTCASES += dpau_h_qbl.tst
-TESTCASES += dpau_h_qbr.tst
-TESTCASES += dpsq_sa_l_pw.tst
-TESTCASES += dpsq_sa_l_w.tst
-TESTCASES += dpsq_s_w_ph.tst
-TESTCASES += dpsq_s_w_qh.tst
-TESTCASES += dpsu_h_obl.tst
-TESTCASES += dpsu_h_obr.tst
-TESTCASES += dpsu_h_qbl.tst
-TESTCASES += dpsu_h_qbr.tst
-TESTCASES += dshilo.tst
-TESTCASES += dshilov.tst
-TESTCASES += extp.tst
-TESTCASES += extpdp.tst
-TESTCASES += extpdpv.tst
-TESTCASES += extpv.tst
-TESTCASES += extr_rs_w.tst
-TESTCASES += extr_r_w.tst
-TESTCASES += extr_s_h.tst
-TESTCASES += extrv_rs_w.tst
-TESTCASES += extrv_r_w.tst
-TESTCASES += extrv_s_h.tst
-TESTCASES += extrv_w.tst
-TESTCASES += extr_w.tst
-TESTCASES += insv.tst
-TESTCASES += lbux.tst
-TESTCASES += lhx.tst
-TESTCASES += lwx.tst
-TESTCASES += ldx.tst
-TESTCASES += madd.tst
-TESTCASES += maddu.tst
-TESTCASES += maq_sa_w_phl.tst
-TESTCASES += maq_sa_w_phr.tst
-TESTCASES += maq_sa_w_qhll.tst
-TESTCASES += maq_sa_w_qhlr.tst
-TESTCASES += maq_sa_w_qhrl.tst
-TESTCASES += maq_sa_w_qhrr.tst
-TESTCASES += maq_s_l_pwl.tst
-TESTCASES += maq_s_l_pwr.tst
-TESTCASES += maq_s_w_phl.tst
-TESTCASES += maq_s_w_phr.tst
-TESTCASES += maq_s_w_qhll.tst
-TESTCASES += maq_s_w_qhlr.tst
-TESTCASES += maq_s_w_qhrl.tst
-TESTCASES += maq_s_w_qhrr.tst
-TESTCASES += mfhi.tst
-TESTCASES += mflo.tst
-TESTCASES += modsub.tst
-TESTCASES += msub.tst
-TESTCASES += msubu.tst
-TESTCASES += mthi.tst
-TESTCASES += mthlip.tst
-TESTCASES += mtlo.tst
-TESTCASES += muleq_s_pw_qhl.tst
-TESTCASES += muleq_s_pw_qhr.tst
-TESTCASES += muleq_s_w_phl.tst
-TESTCASES += muleq_s_w_phr.tst
-TESTCASES += muleu_s_ph_qbl.tst
-TESTCASES += muleu_s_ph_qbr.tst
-TESTCASES += muleu_s_qh_obl.tst
-TESTCASES += muleu_s_qh_obr.tst
-TESTCASES += mulq_rs_ph.tst
-TESTCASES += mulq_rs_qh.tst
-TESTCASES += mulsaq_s_l_pw.tst
-TESTCASES += mulsaq_s_w_qh.tst
-TESTCASES += mult.tst
-TESTCASES += multu.tst
-TESTCASES += packrl_ph.tst
-TESTCASES += packrl_pw.tst
-TESTCASES += pick_ob.tst
-TESTCASES += pick_ph.tst
-TESTCASES += pick_pw.tst
-TESTCASES += pick_qb.tst
-TESTCASES += pick_qh.tst
-#TESTCASES += preceq_l_pwl.tst
-#TESTCASES += preceq_l_pwr.tst
-TESTCASES += preceq_pw_qhla.tst
-TESTCASES += preceq_pw_qhl.tst
-TESTCASES += preceq_pw_qhra.tst
-TESTCASES += preceq_pw_qhr.tst
-TESTCASES += precequ_ph_qbla.tst
-TESTCASES += precequ_ph_qbl.tst
-TESTCASES += precequ_ph_qbra.tst
-TESTCASES += precequ_ph_qbr.tst
-#TESTCASES += precequ_qh_obla.tst
-#TESTCASES += precequ_qh_obl.tst
-#TESTCASES += precequ_qh_obra.tst
-#TESTCASES += precequ_qh_obr.tst
-TESTCASES += preceq_w_phl.tst
-TESTCASES += preceq_w_phr.tst
-TESTCASES += preceu_ph_qbla.tst
-TESTCASES += preceu_ph_qbl.tst
-TESTCASES += preceu_ph_qbra.tst
-TESTCASES += preceu_ph_qbr.tst
-TESTCASES += preceu_qh_obla.tst
-TESTCASES += preceu_qh_obl.tst
-TESTCASES += preceu_qh_obra.tst
-TESTCASES += preceu_qh_obr.tst
-#TESTCASES += precr_ob_qh.tst
-TESTCASES += precrq_ob_qh.tst
-TESTCASES += precrq_ph_w.tst
-TESTCASES += precrq_pw_l.tst
-TESTCASES += precrq_qb_ph.tst
-TESTCASES += precrq_qh_pw.tst
-TESTCASES += precrq_rs_ph_w.tst
-TESTCASES += precrq_rs_qh_pw.tst
-TESTCASES += precrqu_s_ob_qh.tst
-TESTCASES += precrqu_s_qb_ph.tst
-#TESTCASES += precr_sra_qh_pw.tst
-#TESTCASES += precr_sra_r_qh_pw.tst
-#TESTCASES += prependd.tst
-#TESTCASES += prependw.tst
-#TESTCASES += raddu_l_ob.tst
-TESTCASES += raddu_w_qb.tst
-TESTCASES += rddsp.tst
-TESTCASES += repl_ob.tst
-TESTCASES += repl_ph.tst
-TESTCASES += repl_pw.tst
-TESTCASES += repl_qb.tst
-TESTCASES += repl_qh.tst
-TESTCASES += replv_ob.tst
-TESTCASES += replv_ph.tst
-TESTCASES += replv_pw.tst
-TESTCASES += replv_qb.tst
-TESTCASES += shilo.tst
-TESTCASES += shilov.tst
-TESTCASES += shll_ob.tst
-TESTCASES += shll_ph.tst
-TESTCASES += shll_pw.tst
-TESTCASES += shll_qb.tst
-TESTCASES += shll_qh.tst
-TESTCASES += shll_s_ph.tst
-TESTCASES += shll_s_pw.tst
-TESTCASES += shll_s_qh.tst
-TESTCASES += shll_s_w.tst
-TESTCASES += shllv_ob.tst
-TESTCASES += shllv_ph.tst
-TESTCASES += shllv_pw.tst
-TESTCASES += shllv_qb.tst
-TESTCASES += shllv_qh.tst
-TESTCASES += shllv_s_ph.tst
-TESTCASES += shllv_s_pw.tst
-TESTCASES += shllv_s_qh.tst
-TESTCASES += shllv_s_w.tst
-#TESTCASES += shra_ob.tst
-TESTCASES += shra_ph.tst
-TESTCASES += shra_pw.tst
-TESTCASES += shra_qh.tst
-#TESTCASES += shra_r_ob.tst
-TESTCASES += shra_r_ph.tst
-TESTCASES += shra_r_pw.tst
-TESTCASES += shra_r_qh.tst
-TESTCASES += shra_r_w.tst
-TESTCASES += shrav_ph.tst
-TESTCASES += shrav_pw.tst
-TESTCASES += shrav_qh.tst
-TESTCASES += shrav_r_ph.tst
-TESTCASES += shrav_r_pw.tst
-TESTCASES += shrav_r_qh.tst
-TESTCASES += shrav_r_w.tst
-TESTCASES += shrl_ob.tst
-TESTCASES += shrl_qb.tst
-#TESTCASES += shrl_qh.tst
-TESTCASES += shrlv_ob.tst
-TESTCASES += shrlv_qb.tst
-#TESTCASES += shrlv_qh.tst
-TESTCASES += subq_ph.tst
-TESTCASES += subq_pw.tst
-TESTCASES += subq_qh.tst
-TESTCASES += subq_s_ph.tst
-TESTCASES += subq_s_pw.tst
-TESTCASES += subq_s_qh.tst
-TESTCASES += subq_s_w.tst
-TESTCASES += subu_ob.tst
-TESTCASES += subu_qb.tst
-TESTCASES += subu_s_ob.tst
-TESTCASES += subu_s_qb.tst
-TESTCASES += wrdsp.tst
-
-all: build
-
-head.o : head.S
-	$(Q)$(CC) $(HEAD_FLAGS) -D"STACK_TOP=0xffffffff80200000" -c $< -o $@
-
-%.o  : %.S
+mips64-dsp/%.o: mips64-dsp/%.S | mips64-dsp.build
 	$(CC) $(CFLAGS) -c $< -o $@
 
-%.o  : %.c
+mips64-dsp/%.o: mips64-dsp/%.c | mips64-dsp.build
 	$(CC) $(CFLAGS) -c $< -o $@
 
-%.tst: %.o $(VECTORS_OBJ)
+mips64-dsp/%: mips64-dsp/%.o $(VECTORS_OBJ)
 	$(CC) $(VECTORS_OBJ) $(FLAGS) $(LDFLAGS) $< -o $@
 
-build: $(VECTORS_OBJ) $(MIPSSOC_LIB) $(TESTCASES)
+#
+# Runners
+#
 
-check:  $(VECTORS_OBJ) $(MIPSSOC_LIB) $(TESTCASES)
-	@for case in $(TESTCASES); do \
-		echo $(SIM) $(SIMFLAGS) ./$$case; \
-		$(SIM) $(SIMFLAGS) ./$$case & (sleep 1; killall $(SIM)); \
-	done
+$(MIPS64_DSP_RUNS): QEMU_OPTS=-nographic -cpu mips64dspr2 -kernel
 
-clean:
-	$(Q)rm -f *.o *.tst *.a
+# FIXME: I don't know why the general rule in tests/tcg/Makefile isn't enough
+run-mips64-dsp/%: mips64-dsp/%
+	$(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on $(TARGET_NAME) $(QEMU_OPTS)")
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH 06/13] tests/docker: add debian-xtensa-cross image
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
                   ` (4 preceding siblings ...)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 05/13] tests/tcg/mips: enable mips64 system tests (WIP) Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 07/13] tests/tcg/xtensa: enable system tests Alex Bennée
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Philippe Mathieu-Daudé,
	Alex Bennée, Fam Zheng

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Xtensa cpu supported:
- dc232b
- dc233c
- csp

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 .../dockerfiles/debian-xtensa-cross.docker    | 31 +++++++++++++++++++
 tests/tcg/xtensa/Makefile.include             |  7 +++++
 2 files changed, 38 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-xtensa-cross.docker
 create mode 100644 tests/tcg/xtensa/Makefile.include

diff --git a/tests/docker/dockerfiles/debian-xtensa-cross.docker b/tests/docker/dockerfiles/debian-xtensa-cross.docker
new file mode 100644
index 0000000000..afd2ab9163
--- /dev/null
+++ b/tests/docker/dockerfiles/debian-xtensa-cross.docker
@@ -0,0 +1,31 @@
+#
+# Docker cross-compiler target
+#
+# This docker target builds on the debian stretch base image,
+# using a prebuilt toolchains for Xtensa cores from:
+# https://github.com/foss-xtensa/toolchain/releases
+#
+FROM debian:stretch-slim
+
+RUN apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        bison \
+        build-essential \
+        ca-certificates \
+        curl \
+        flex \
+        gettext \
+        git \
+        python-minimal
+
+ENV CPU_LIST csp dc232b dc233c
+ENV TOOLCHAIN_RELEASE 2018.02
+
+RUN for cpu in $CPU_LIST; do \
+        curl -#SL http://github.com/foss-xtensa/toolchain/releases/download/$TOOLCHAIN_RELEASE/x86_64-$TOOLCHAIN_RELEASE-xtensa-$cpu-elf.tar.gz \
+        | tar -xzC /opt; \
+    done
+
+ENV PATH $PATH:/opt/$TOOLCHAIN_RELEASE/xtensa-dc232b-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-dc233c-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-csp-elf/bin
diff --git a/tests/tcg/xtensa/Makefile.include b/tests/tcg/xtensa/Makefile.include
new file mode 100644
index 0000000000..1454e7e821
--- /dev/null
+++ b/tests/tcg/xtensa/Makefile.include
@@ -0,0 +1,7 @@
+# Makefile.include for xtensa targets
+
+DOCKER_IMAGE=debian-xtensa-cross
+
+# default to the dc232b cpu
+DOCKER_CROSS_COMPILER=/opt/2018.02/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-gcc
+DOCKER_CROSS_LINKER=/opt/2018.02/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-ld
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH 07/13] tests/tcg/xtensa: enable system tests
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
                   ` (5 preceding siblings ...)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 06/13] tests/docker: add debian-xtensa-cross image Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2018-12-11  0:25   ` Max Filippov
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 08/13] tests/docker: add fedora-cris-cross compilers Alex Bennée
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/xtensa/Makefile                | 93 ------------------------
 tests/tcg/xtensa/Makefile.softmmu-target | 43 +++++++++++
 2 files changed, 43 insertions(+), 93 deletions(-)
 delete mode 100644 tests/tcg/xtensa/Makefile
 create mode 100644 tests/tcg/xtensa/Makefile.softmmu-target

diff --git a/tests/tcg/xtensa/Makefile b/tests/tcg/xtensa/Makefile
deleted file mode 100644
index 2f5691f75b..0000000000
--- a/tests/tcg/xtensa/Makefile
+++ /dev/null
@@ -1,93 +0,0 @@
--include ../../../config-host.mak
-
-CORE=dc232b
-CROSS=xtensa-$(CORE)-elf-
-
-ifndef XT
-SIM = ../../../xtensa-softmmu/qemu-system-xtensa
-SIMFLAGS = -M sim -cpu $(CORE) -nographic -semihosting -icount 6 $(EXTFLAGS) -kernel
-SIMDEBUG = -s -S
-else
-SIM = xt-run
-SIMFLAGS = --xtensa-core=DC_B_232L --exit_with_target_code $(EXTFLAGS)
-SIMDEBUG = --gdbserve=0
-endif
-
-HOST_CC = gcc
-CC      = $(CROSS)gcc
-AS      = $(CROSS)gcc -x assembler-with-cpp
-LD      = $(CROSS)ld
-
-XTENSA_SRC_PATH = $(SRC_PATH)/tests/tcg/xtensa
-INCLUDE_DIRS = $(XTENSA_SRC_PATH) $(SRC_PATH)/target/xtensa/core-$(CORE)
-XTENSA_INC = $(addprefix -I,$(INCLUDE_DIRS))
-
-LDFLAGS = -Tlinker.ld
-
-CRT        = crt.o vectors.o
-
-TESTCASES += test_b.tst
-TESTCASES += test_bi.tst
-#TESTCASES += test_boolean.tst
-TESTCASES += test_break.tst
-TESTCASES += test_bz.tst
-TESTCASES += test_cache.tst
-TESTCASES += test_clamps.tst
-TESTCASES += test_extui.tst
-TESTCASES += test_fail.tst
-TESTCASES += test_interrupt.tst
-TESTCASES += test_loop.tst
-TESTCASES += test_mac16.tst
-TESTCASES += test_max.tst
-TESTCASES += test_min.tst
-TESTCASES += test_mmu.tst
-TESTCASES += test_mul16.tst
-TESTCASES += test_mul32.tst
-TESTCASES += test_nsa.tst
-TESTCASES += test_phys_mem.tst
-ifdef XT
-TESTCASES += test_pipeline.tst
-endif
-TESTCASES += test_quo.tst
-TESTCASES += test_rem.tst
-TESTCASES += test_rst0.tst
-TESTCASES += test_s32c1i.tst
-TESTCASES += test_sar.tst
-TESTCASES += test_sext.tst
-TESTCASES += test_shift.tst
-TESTCASES += test_sr.tst
-TESTCASES += test_timer.tst
-TESTCASES += test_windowed.tst
-
-all: build
-
-linker.ld: $(XTENSA_SRC_PATH)/linker.ld.S
-	$(HOST_CC) $(XTENSA_INC) -E -P $< -o $@
-
-%.o: $(XTENSA_SRC_PATH)/%.c
-	$(CC) $(XTENSA_INC) $(CFLAGS) -c $< -o $@
-
-%.o: $(XTENSA_SRC_PATH)/%.S
-	$(CC) $(XTENSA_INC) $(ASFLAGS) -c $< -o $@
-
-%.tst: %.o linker.ld $(XTENSA_SRC_PATH)/macros.inc $(CRT) Makefile
-	$(LD) $(LDFLAGS) $(NOSTDFLAGS) $(CRT) $< -o $@
-
-build: $(TESTCASES)
-
-check: $(addprefix run-, $(TESTCASES))
-
-run-%.tst: %.tst
-	$(SIM) $(SIMFLAGS) ./$<
-
-run-test_fail.tst: test_fail.tst
-	! $(SIM) $(SIMFLAGS) ./$<
-
-debug-%.tst: %.tst
-	$(SIM) $(SIMDEBUG) $(SIMFLAGS) ./$<
-
-host-debug-%.tst: %.tst
-	gdb --args $(SIM) $(SIMFLAGS) ./$<
-
-clean:
-	$(RM) -fr $(TESTCASES) $(CRT) linker.ld
diff --git a/tests/tcg/xtensa/Makefile.softmmu-target b/tests/tcg/xtensa/Makefile.softmmu-target
new file mode 100644
index 0000000000..e9d6939990
--- /dev/null
+++ b/tests/tcg/xtensa/Makefile.softmmu-target
@@ -0,0 +1,43 @@
+#
+# Xtensa softmmu tests
+#
+
+XTENSA_SRC = $(SRC_PATH)/tests/tcg/xtensa
+XTENSA_ALL = $(wildcard $(XTENSA_SRC)/*.S)
+XTENSA_TESTS = $(patsubst $(XTENSA_SRC)/%.S, %, $(XTENSA_ALL))
+# Filter out common blobs and broken tests
+XTENSA_BROKEN_TESTS  = crt vectors test_boolean test_pipeline
+XTENSA_USABLE_TESTS = $(filter-out $(XTENSA_BROKEN_TESTS), $(XTENSA_TESTS))
+XTENSA_RUNS = $(patsubst %, run-%, $(XTENSA_USABLE_TESTS))
+
+# add to the list of tests
+TESTS += $(XTENSA_USABLE_TESTS)
+VPATH += $(XTENSA_SRC)
+
+CORE=dc232b
+QEMU_OPTS = -M sim -cpu $(CORE) -nographic -semihosting -icount 6 $(EXTFLAGS) -kernel
+
+INCLUDE_DIRS = $(SRC_PATH)/target/xtensa/core-$(CORE)
+XTENSA_INC = $(addprefix -I,$(INCLUDE_DIRS))
+
+LDFLAGS = -Tlinker.ld -nostartfiles -nostdlib
+
+CRT        = crt.o vectors.o
+
+linker.ld: linker.ld.S
+	$(HOST_CC) $(XTENSA_INC) -E -P $< -o $@
+
+$(XTENSA_USABLE_TESTS): linker.ld macros.inc $(CRT) Makefile.softmmu-target
+
+# special rule for common blobs
+%.o: %.S
+	$(CC) $(XTENSA_INC) $(ASFLAGS) -c $< -o $@
+
+%: %.S
+	$(CC) $(XTENSA_INC) $(ASFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT)
+
+# Special runner
+$(XTENSA_RUNS): $(XTENSA_USABLE_TESTS)
+	$(call quiet-command,					\
+		timeout $(TIMEOUT) $(QEMU) $(QEMU_OPTS) $<, 	\
+		"TEST","$< on $(TARGET_NAME) $(QEMU_OPTS)")
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH 08/13] tests/docker: add fedora-cris-cross compilers
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
                   ` (6 preceding siblings ...)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 07/13] tests/tcg/xtensa: enable system tests Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 09/13] tests/tcg: split cris tests into system and user mode Alex Bennée
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/dockerfiles/fedora-cris-cross.docker | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 tests/docker/dockerfiles/fedora-cris-cross.docker

diff --git a/tests/docker/dockerfiles/fedora-cris-cross.docker b/tests/docker/dockerfiles/fedora-cris-cross.docker
new file mode 100644
index 0000000000..b168ada615
--- /dev/null
+++ b/tests/docker/dockerfiles/fedora-cris-cross.docker
@@ -0,0 +1,8 @@
+#
+# Cross compiler for cris system tests
+#
+
+FROM fedora:latest
+ENV PACKAGES gcc-cris-linux-gnu
+RUN dnf install -y $PACKAGES
+RUN rpm -q $PACKAGES | sort > /packages.txt
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH 09/13] tests/tcg: split cris tests into system and user mode
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
                   ` (7 preceding siblings ...)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 08/13] tests/docker: add fedora-cris-cross compilers Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2018-12-11 17:47   ` Alex Bennée
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 10/13] tests/tcg/cris: cleanup sys.c Alex Bennée
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée

This will help with the make system as we build a different set of
tests for each qemu binary.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/cris/{ => system}/check_addcv17.s           | 0
 tests/tcg/cris/{ => system}/check_addi.s              | 0
 tests/tcg/cris/{ => system}/check_addiv32.s           | 0
 tests/tcg/cris/{ => system}/check_addm.s              | 0
 tests/tcg/cris/{ => system}/check_addq.s              | 0
 tests/tcg/cris/{ => system}/check_addr.s              | 0
 tests/tcg/cris/{ => system}/check_addxc.s             | 0
 tests/tcg/cris/{ => system}/check_addxm.s             | 0
 tests/tcg/cris/{ => system}/check_addxr.s             | 0
 tests/tcg/cris/{ => system}/check_andc.s              | 0
 tests/tcg/cris/{ => system}/check_andm.s              | 0
 tests/tcg/cris/{ => system}/check_andq.s              | 0
 tests/tcg/cris/{ => system}/check_andr.s              | 0
 tests/tcg/cris/{ => system}/check_asr.s               | 0
 tests/tcg/cris/{ => system}/check_ba.s                | 0
 tests/tcg/cris/{ => system}/check_bas.s               | 0
 tests/tcg/cris/{ => system}/check_bcc.s               | 0
 tests/tcg/cris/{ => system}/check_boundc.s            | 0
 tests/tcg/cris/{ => system}/check_boundr.s            | 0
 tests/tcg/cris/{ => system}/check_btst.s              | 0
 tests/tcg/cris/{ => system}/check_clearfv32.s         | 0
 tests/tcg/cris/{ => system}/check_clrjmp1.s           | 0
 tests/tcg/cris/{ => system}/check_cmp-2.s             | 0
 tests/tcg/cris/{ => system}/check_cmpc.s              | 0
 tests/tcg/cris/{ => system}/check_cmpm.s              | 0
 tests/tcg/cris/{ => system}/check_cmpq.s              | 0
 tests/tcg/cris/{ => system}/check_cmpr.s              | 0
 tests/tcg/cris/{ => system}/check_cmpxc.s             | 0
 tests/tcg/cris/{ => system}/check_cmpxm.s             | 0
 tests/tcg/cris/{ => system}/check_dstep.s             | 0
 tests/tcg/cris/{ => system}/check_jsr.s               | 0
 tests/tcg/cris/{ => system}/check_lapc.s              | 0
 tests/tcg/cris/{ => system}/check_lsl.s               | 0
 tests/tcg/cris/{ => system}/check_lsr.s               | 0
 tests/tcg/cris/{ => system}/check_mcp.s               | 0
 tests/tcg/cris/{ => system}/check_movdelsr1.s         | 0
 tests/tcg/cris/{ => system}/check_movecr.s            | 0
 tests/tcg/cris/{ => system}/check_movei.s             | 0
 tests/tcg/cris/{ => system}/check_movemr.s            | 0
 tests/tcg/cris/{ => system}/check_movemrv32.s         | 0
 tests/tcg/cris/{ => system}/check_mover.s             | 0
 tests/tcg/cris/{ => system}/check_moverm.s            | 0
 tests/tcg/cris/{ => system}/check_movmp.s             | 0
 tests/tcg/cris/{ => system}/check_movpmv32.s          | 0
 tests/tcg/cris/{ => system}/check_movpr.s             | 0
 tests/tcg/cris/{ => system}/check_movprv32.s          | 0
 tests/tcg/cris/{ => system}/check_movscr.s            | 0
 tests/tcg/cris/{ => system}/check_movsm.s             | 0
 tests/tcg/cris/{ => system}/check_movsr.s             | 0
 tests/tcg/cris/{ => system}/check_movucr.s            | 0
 tests/tcg/cris/{ => system}/check_movum.s             | 0
 tests/tcg/cris/{ => system}/check_movur.s             | 0
 tests/tcg/cris/{ => system}/check_mulv32.s            | 0
 tests/tcg/cris/{ => system}/check_mulx.s              | 0
 tests/tcg/cris/{ => system}/check_neg.s               | 0
 tests/tcg/cris/{ => system}/check_not.s               | 0
 tests/tcg/cris/{ => system}/check_orc.s               | 0
 tests/tcg/cris/{ => system}/check_orm.s               | 0
 tests/tcg/cris/{ => system}/check_orq.s               | 0
 tests/tcg/cris/{ => system}/check_orr.s               | 0
 tests/tcg/cris/{ => system}/check_ret.s               | 0
 tests/tcg/cris/{ => system}/check_scc.s               | 0
 tests/tcg/cris/{ => system}/check_subc.s              | 0
 tests/tcg/cris/{ => system}/check_subm.s              | 0
 tests/tcg/cris/{ => system}/check_subq.s              | 0
 tests/tcg/cris/{ => system}/check_subr.s              | 0
 tests/tcg/cris/{ => system}/check_xarith.s            | 0
 tests/tcg/cris/{ => system}/crt.s                     | 0
 tests/tcg/cris/{ => system}/sys.c                     | 0
 tests/tcg/cris/{ => system}/testutils.inc             | 0
 tests/tcg/cris/{ => user}/check_abs.c                 | 0
 tests/tcg/cris/{ => user}/check_addc.c                | 0
 tests/tcg/cris/{ => user}/check_addcm.c               | 0
 tests/tcg/cris/{ => user}/check_addo.c                | 0
 tests/tcg/cris/{ => user}/check_addoq.c               | 0
 tests/tcg/cris/{ => user}/check_bound.c               | 0
 tests/tcg/cris/{ => user}/check_ftag.c                | 0
 tests/tcg/cris/{ => user}/check_glibc_kernelversion.c | 0
 tests/tcg/cris/{ => user}/check_hello.c               | 0
 tests/tcg/cris/{ => user}/check_int64.c               | 0
 tests/tcg/cris/{ => user}/check_lz.c                  | 0
 tests/tcg/cris/{ => user}/check_mapbrk.c              | 0
 tests/tcg/cris/{ => user}/check_mmap1.c               | 0
 tests/tcg/cris/{ => user}/check_mmap2.c               | 0
 tests/tcg/cris/{ => user}/check_mmap3.c               | 0
 tests/tcg/cris/{ => user}/check_moveq.c               | 0
 tests/tcg/cris/{ => user}/check_openpf1.c             | 0
 tests/tcg/cris/{ => user}/check_openpf2.c             | 0
 tests/tcg/cris/{ => user}/check_openpf3.c             | 0
 tests/tcg/cris/{ => user}/check_openpf5.c             | 0
 tests/tcg/cris/{ => user}/check_settls1.c             | 0
 tests/tcg/cris/{ => user}/check_sigalrm.c             | 0
 tests/tcg/cris/{ => user}/check_stat1.c               | 0
 tests/tcg/cris/{ => user}/check_stat2.c               | 0
 tests/tcg/cris/{ => user}/check_stat3.c               | 0
 tests/tcg/cris/{ => user}/check_stat4.c               | 0
 tests/tcg/cris/{ => user}/check_swap.c                | 0
 tests/tcg/cris/{ => user}/check_time2.c               | 0
 tests/tcg/cris/{ => user}/crisutils.h                 | 0
 tests/tcg/cris/{ => user}/sys.h                       | 0
 100 files changed, 0 insertions(+), 0 deletions(-)
 rename tests/tcg/cris/{ => system}/check_addcv17.s (100%)
 rename tests/tcg/cris/{ => system}/check_addi.s (100%)
 rename tests/tcg/cris/{ => system}/check_addiv32.s (100%)
 rename tests/tcg/cris/{ => system}/check_addm.s (100%)
 rename tests/tcg/cris/{ => system}/check_addq.s (100%)
 rename tests/tcg/cris/{ => system}/check_addr.s (100%)
 rename tests/tcg/cris/{ => system}/check_addxc.s (100%)
 rename tests/tcg/cris/{ => system}/check_addxm.s (100%)
 rename tests/tcg/cris/{ => system}/check_addxr.s (100%)
 rename tests/tcg/cris/{ => system}/check_andc.s (100%)
 rename tests/tcg/cris/{ => system}/check_andm.s (100%)
 rename tests/tcg/cris/{ => system}/check_andq.s (100%)
 rename tests/tcg/cris/{ => system}/check_andr.s (100%)
 rename tests/tcg/cris/{ => system}/check_asr.s (100%)
 rename tests/tcg/cris/{ => system}/check_ba.s (100%)
 rename tests/tcg/cris/{ => system}/check_bas.s (100%)
 rename tests/tcg/cris/{ => system}/check_bcc.s (100%)
 rename tests/tcg/cris/{ => system}/check_boundc.s (100%)
 rename tests/tcg/cris/{ => system}/check_boundr.s (100%)
 rename tests/tcg/cris/{ => system}/check_btst.s (100%)
 rename tests/tcg/cris/{ => system}/check_clearfv32.s (100%)
 rename tests/tcg/cris/{ => system}/check_clrjmp1.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmp-2.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmpc.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmpm.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmpq.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmpr.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmpxc.s (100%)
 rename tests/tcg/cris/{ => system}/check_cmpxm.s (100%)
 rename tests/tcg/cris/{ => system}/check_dstep.s (100%)
 rename tests/tcg/cris/{ => system}/check_jsr.s (100%)
 rename tests/tcg/cris/{ => system}/check_lapc.s (100%)
 rename tests/tcg/cris/{ => system}/check_lsl.s (100%)
 rename tests/tcg/cris/{ => system}/check_lsr.s (100%)
 rename tests/tcg/cris/{ => system}/check_mcp.s (100%)
 rename tests/tcg/cris/{ => system}/check_movdelsr1.s (100%)
 rename tests/tcg/cris/{ => system}/check_movecr.s (100%)
 rename tests/tcg/cris/{ => system}/check_movei.s (100%)
 rename tests/tcg/cris/{ => system}/check_movemr.s (100%)
 rename tests/tcg/cris/{ => system}/check_movemrv32.s (100%)
 rename tests/tcg/cris/{ => system}/check_mover.s (100%)
 rename tests/tcg/cris/{ => system}/check_moverm.s (100%)
 rename tests/tcg/cris/{ => system}/check_movmp.s (100%)
 rename tests/tcg/cris/{ => system}/check_movpmv32.s (100%)
 rename tests/tcg/cris/{ => system}/check_movpr.s (100%)
 rename tests/tcg/cris/{ => system}/check_movprv32.s (100%)
 rename tests/tcg/cris/{ => system}/check_movscr.s (100%)
 rename tests/tcg/cris/{ => system}/check_movsm.s (100%)
 rename tests/tcg/cris/{ => system}/check_movsr.s (100%)
 rename tests/tcg/cris/{ => system}/check_movucr.s (100%)
 rename tests/tcg/cris/{ => system}/check_movum.s (100%)
 rename tests/tcg/cris/{ => system}/check_movur.s (100%)
 rename tests/tcg/cris/{ => system}/check_mulv32.s (100%)
 rename tests/tcg/cris/{ => system}/check_mulx.s (100%)
 rename tests/tcg/cris/{ => system}/check_neg.s (100%)
 rename tests/tcg/cris/{ => system}/check_not.s (100%)
 rename tests/tcg/cris/{ => system}/check_orc.s (100%)
 rename tests/tcg/cris/{ => system}/check_orm.s (100%)
 rename tests/tcg/cris/{ => system}/check_orq.s (100%)
 rename tests/tcg/cris/{ => system}/check_orr.s (100%)
 rename tests/tcg/cris/{ => system}/check_ret.s (100%)
 rename tests/tcg/cris/{ => system}/check_scc.s (100%)
 rename tests/tcg/cris/{ => system}/check_subc.s (100%)
 rename tests/tcg/cris/{ => system}/check_subm.s (100%)
 rename tests/tcg/cris/{ => system}/check_subq.s (100%)
 rename tests/tcg/cris/{ => system}/check_subr.s (100%)
 rename tests/tcg/cris/{ => system}/check_xarith.s (100%)
 rename tests/tcg/cris/{ => system}/crt.s (100%)
 rename tests/tcg/cris/{ => system}/sys.c (100%)
 rename tests/tcg/cris/{ => system}/testutils.inc (100%)
 rename tests/tcg/cris/{ => user}/check_abs.c (100%)
 rename tests/tcg/cris/{ => user}/check_addc.c (100%)
 rename tests/tcg/cris/{ => user}/check_addcm.c (100%)
 rename tests/tcg/cris/{ => user}/check_addo.c (100%)
 rename tests/tcg/cris/{ => user}/check_addoq.c (100%)
 rename tests/tcg/cris/{ => user}/check_bound.c (100%)
 rename tests/tcg/cris/{ => user}/check_ftag.c (100%)
 rename tests/tcg/cris/{ => user}/check_glibc_kernelversion.c (100%)
 rename tests/tcg/cris/{ => user}/check_hello.c (100%)
 rename tests/tcg/cris/{ => user}/check_int64.c (100%)
 rename tests/tcg/cris/{ => user}/check_lz.c (100%)
 rename tests/tcg/cris/{ => user}/check_mapbrk.c (100%)
 rename tests/tcg/cris/{ => user}/check_mmap1.c (100%)
 rename tests/tcg/cris/{ => user}/check_mmap2.c (100%)
 rename tests/tcg/cris/{ => user}/check_mmap3.c (100%)
 rename tests/tcg/cris/{ => user}/check_moveq.c (100%)
 rename tests/tcg/cris/{ => user}/check_openpf1.c (100%)
 rename tests/tcg/cris/{ => user}/check_openpf2.c (100%)
 rename tests/tcg/cris/{ => user}/check_openpf3.c (100%)
 rename tests/tcg/cris/{ => user}/check_openpf5.c (100%)
 rename tests/tcg/cris/{ => user}/check_settls1.c (100%)
 rename tests/tcg/cris/{ => user}/check_sigalrm.c (100%)
 rename tests/tcg/cris/{ => user}/check_stat1.c (100%)
 rename tests/tcg/cris/{ => user}/check_stat2.c (100%)
 rename tests/tcg/cris/{ => user}/check_stat3.c (100%)
 rename tests/tcg/cris/{ => user}/check_stat4.c (100%)
 rename tests/tcg/cris/{ => user}/check_swap.c (100%)
 rename tests/tcg/cris/{ => user}/check_time2.c (100%)
 rename tests/tcg/cris/{ => user}/crisutils.h (100%)
 rename tests/tcg/cris/{ => user}/sys.h (100%)

diff --git a/tests/tcg/cris/check_addcv17.s b/tests/tcg/cris/system/check_addcv17.s
similarity index 100%
rename from tests/tcg/cris/check_addcv17.s
rename to tests/tcg/cris/system/check_addcv17.s
diff --git a/tests/tcg/cris/check_addi.s b/tests/tcg/cris/system/check_addi.s
similarity index 100%
rename from tests/tcg/cris/check_addi.s
rename to tests/tcg/cris/system/check_addi.s
diff --git a/tests/tcg/cris/check_addiv32.s b/tests/tcg/cris/system/check_addiv32.s
similarity index 100%
rename from tests/tcg/cris/check_addiv32.s
rename to tests/tcg/cris/system/check_addiv32.s
diff --git a/tests/tcg/cris/check_addm.s b/tests/tcg/cris/system/check_addm.s
similarity index 100%
rename from tests/tcg/cris/check_addm.s
rename to tests/tcg/cris/system/check_addm.s
diff --git a/tests/tcg/cris/check_addq.s b/tests/tcg/cris/system/check_addq.s
similarity index 100%
rename from tests/tcg/cris/check_addq.s
rename to tests/tcg/cris/system/check_addq.s
diff --git a/tests/tcg/cris/check_addr.s b/tests/tcg/cris/system/check_addr.s
similarity index 100%
rename from tests/tcg/cris/check_addr.s
rename to tests/tcg/cris/system/check_addr.s
diff --git a/tests/tcg/cris/check_addxc.s b/tests/tcg/cris/system/check_addxc.s
similarity index 100%
rename from tests/tcg/cris/check_addxc.s
rename to tests/tcg/cris/system/check_addxc.s
diff --git a/tests/tcg/cris/check_addxm.s b/tests/tcg/cris/system/check_addxm.s
similarity index 100%
rename from tests/tcg/cris/check_addxm.s
rename to tests/tcg/cris/system/check_addxm.s
diff --git a/tests/tcg/cris/check_addxr.s b/tests/tcg/cris/system/check_addxr.s
similarity index 100%
rename from tests/tcg/cris/check_addxr.s
rename to tests/tcg/cris/system/check_addxr.s
diff --git a/tests/tcg/cris/check_andc.s b/tests/tcg/cris/system/check_andc.s
similarity index 100%
rename from tests/tcg/cris/check_andc.s
rename to tests/tcg/cris/system/check_andc.s
diff --git a/tests/tcg/cris/check_andm.s b/tests/tcg/cris/system/check_andm.s
similarity index 100%
rename from tests/tcg/cris/check_andm.s
rename to tests/tcg/cris/system/check_andm.s
diff --git a/tests/tcg/cris/check_andq.s b/tests/tcg/cris/system/check_andq.s
similarity index 100%
rename from tests/tcg/cris/check_andq.s
rename to tests/tcg/cris/system/check_andq.s
diff --git a/tests/tcg/cris/check_andr.s b/tests/tcg/cris/system/check_andr.s
similarity index 100%
rename from tests/tcg/cris/check_andr.s
rename to tests/tcg/cris/system/check_andr.s
diff --git a/tests/tcg/cris/check_asr.s b/tests/tcg/cris/system/check_asr.s
similarity index 100%
rename from tests/tcg/cris/check_asr.s
rename to tests/tcg/cris/system/check_asr.s
diff --git a/tests/tcg/cris/check_ba.s b/tests/tcg/cris/system/check_ba.s
similarity index 100%
rename from tests/tcg/cris/check_ba.s
rename to tests/tcg/cris/system/check_ba.s
diff --git a/tests/tcg/cris/check_bas.s b/tests/tcg/cris/system/check_bas.s
similarity index 100%
rename from tests/tcg/cris/check_bas.s
rename to tests/tcg/cris/system/check_bas.s
diff --git a/tests/tcg/cris/check_bcc.s b/tests/tcg/cris/system/check_bcc.s
similarity index 100%
rename from tests/tcg/cris/check_bcc.s
rename to tests/tcg/cris/system/check_bcc.s
diff --git a/tests/tcg/cris/check_boundc.s b/tests/tcg/cris/system/check_boundc.s
similarity index 100%
rename from tests/tcg/cris/check_boundc.s
rename to tests/tcg/cris/system/check_boundc.s
diff --git a/tests/tcg/cris/check_boundr.s b/tests/tcg/cris/system/check_boundr.s
similarity index 100%
rename from tests/tcg/cris/check_boundr.s
rename to tests/tcg/cris/system/check_boundr.s
diff --git a/tests/tcg/cris/check_btst.s b/tests/tcg/cris/system/check_btst.s
similarity index 100%
rename from tests/tcg/cris/check_btst.s
rename to tests/tcg/cris/system/check_btst.s
diff --git a/tests/tcg/cris/check_clearfv32.s b/tests/tcg/cris/system/check_clearfv32.s
similarity index 100%
rename from tests/tcg/cris/check_clearfv32.s
rename to tests/tcg/cris/system/check_clearfv32.s
diff --git a/tests/tcg/cris/check_clrjmp1.s b/tests/tcg/cris/system/check_clrjmp1.s
similarity index 100%
rename from tests/tcg/cris/check_clrjmp1.s
rename to tests/tcg/cris/system/check_clrjmp1.s
diff --git a/tests/tcg/cris/check_cmp-2.s b/tests/tcg/cris/system/check_cmp-2.s
similarity index 100%
rename from tests/tcg/cris/check_cmp-2.s
rename to tests/tcg/cris/system/check_cmp-2.s
diff --git a/tests/tcg/cris/check_cmpc.s b/tests/tcg/cris/system/check_cmpc.s
similarity index 100%
rename from tests/tcg/cris/check_cmpc.s
rename to tests/tcg/cris/system/check_cmpc.s
diff --git a/tests/tcg/cris/check_cmpm.s b/tests/tcg/cris/system/check_cmpm.s
similarity index 100%
rename from tests/tcg/cris/check_cmpm.s
rename to tests/tcg/cris/system/check_cmpm.s
diff --git a/tests/tcg/cris/check_cmpq.s b/tests/tcg/cris/system/check_cmpq.s
similarity index 100%
rename from tests/tcg/cris/check_cmpq.s
rename to tests/tcg/cris/system/check_cmpq.s
diff --git a/tests/tcg/cris/check_cmpr.s b/tests/tcg/cris/system/check_cmpr.s
similarity index 100%
rename from tests/tcg/cris/check_cmpr.s
rename to tests/tcg/cris/system/check_cmpr.s
diff --git a/tests/tcg/cris/check_cmpxc.s b/tests/tcg/cris/system/check_cmpxc.s
similarity index 100%
rename from tests/tcg/cris/check_cmpxc.s
rename to tests/tcg/cris/system/check_cmpxc.s
diff --git a/tests/tcg/cris/check_cmpxm.s b/tests/tcg/cris/system/check_cmpxm.s
similarity index 100%
rename from tests/tcg/cris/check_cmpxm.s
rename to tests/tcg/cris/system/check_cmpxm.s
diff --git a/tests/tcg/cris/check_dstep.s b/tests/tcg/cris/system/check_dstep.s
similarity index 100%
rename from tests/tcg/cris/check_dstep.s
rename to tests/tcg/cris/system/check_dstep.s
diff --git a/tests/tcg/cris/check_jsr.s b/tests/tcg/cris/system/check_jsr.s
similarity index 100%
rename from tests/tcg/cris/check_jsr.s
rename to tests/tcg/cris/system/check_jsr.s
diff --git a/tests/tcg/cris/check_lapc.s b/tests/tcg/cris/system/check_lapc.s
similarity index 100%
rename from tests/tcg/cris/check_lapc.s
rename to tests/tcg/cris/system/check_lapc.s
diff --git a/tests/tcg/cris/check_lsl.s b/tests/tcg/cris/system/check_lsl.s
similarity index 100%
rename from tests/tcg/cris/check_lsl.s
rename to tests/tcg/cris/system/check_lsl.s
diff --git a/tests/tcg/cris/check_lsr.s b/tests/tcg/cris/system/check_lsr.s
similarity index 100%
rename from tests/tcg/cris/check_lsr.s
rename to tests/tcg/cris/system/check_lsr.s
diff --git a/tests/tcg/cris/check_mcp.s b/tests/tcg/cris/system/check_mcp.s
similarity index 100%
rename from tests/tcg/cris/check_mcp.s
rename to tests/tcg/cris/system/check_mcp.s
diff --git a/tests/tcg/cris/check_movdelsr1.s b/tests/tcg/cris/system/check_movdelsr1.s
similarity index 100%
rename from tests/tcg/cris/check_movdelsr1.s
rename to tests/tcg/cris/system/check_movdelsr1.s
diff --git a/tests/tcg/cris/check_movecr.s b/tests/tcg/cris/system/check_movecr.s
similarity index 100%
rename from tests/tcg/cris/check_movecr.s
rename to tests/tcg/cris/system/check_movecr.s
diff --git a/tests/tcg/cris/check_movei.s b/tests/tcg/cris/system/check_movei.s
similarity index 100%
rename from tests/tcg/cris/check_movei.s
rename to tests/tcg/cris/system/check_movei.s
diff --git a/tests/tcg/cris/check_movemr.s b/tests/tcg/cris/system/check_movemr.s
similarity index 100%
rename from tests/tcg/cris/check_movemr.s
rename to tests/tcg/cris/system/check_movemr.s
diff --git a/tests/tcg/cris/check_movemrv32.s b/tests/tcg/cris/system/check_movemrv32.s
similarity index 100%
rename from tests/tcg/cris/check_movemrv32.s
rename to tests/tcg/cris/system/check_movemrv32.s
diff --git a/tests/tcg/cris/check_mover.s b/tests/tcg/cris/system/check_mover.s
similarity index 100%
rename from tests/tcg/cris/check_mover.s
rename to tests/tcg/cris/system/check_mover.s
diff --git a/tests/tcg/cris/check_moverm.s b/tests/tcg/cris/system/check_moverm.s
similarity index 100%
rename from tests/tcg/cris/check_moverm.s
rename to tests/tcg/cris/system/check_moverm.s
diff --git a/tests/tcg/cris/check_movmp.s b/tests/tcg/cris/system/check_movmp.s
similarity index 100%
rename from tests/tcg/cris/check_movmp.s
rename to tests/tcg/cris/system/check_movmp.s
diff --git a/tests/tcg/cris/check_movpmv32.s b/tests/tcg/cris/system/check_movpmv32.s
similarity index 100%
rename from tests/tcg/cris/check_movpmv32.s
rename to tests/tcg/cris/system/check_movpmv32.s
diff --git a/tests/tcg/cris/check_movpr.s b/tests/tcg/cris/system/check_movpr.s
similarity index 100%
rename from tests/tcg/cris/check_movpr.s
rename to tests/tcg/cris/system/check_movpr.s
diff --git a/tests/tcg/cris/check_movprv32.s b/tests/tcg/cris/system/check_movprv32.s
similarity index 100%
rename from tests/tcg/cris/check_movprv32.s
rename to tests/tcg/cris/system/check_movprv32.s
diff --git a/tests/tcg/cris/check_movscr.s b/tests/tcg/cris/system/check_movscr.s
similarity index 100%
rename from tests/tcg/cris/check_movscr.s
rename to tests/tcg/cris/system/check_movscr.s
diff --git a/tests/tcg/cris/check_movsm.s b/tests/tcg/cris/system/check_movsm.s
similarity index 100%
rename from tests/tcg/cris/check_movsm.s
rename to tests/tcg/cris/system/check_movsm.s
diff --git a/tests/tcg/cris/check_movsr.s b/tests/tcg/cris/system/check_movsr.s
similarity index 100%
rename from tests/tcg/cris/check_movsr.s
rename to tests/tcg/cris/system/check_movsr.s
diff --git a/tests/tcg/cris/check_movucr.s b/tests/tcg/cris/system/check_movucr.s
similarity index 100%
rename from tests/tcg/cris/check_movucr.s
rename to tests/tcg/cris/system/check_movucr.s
diff --git a/tests/tcg/cris/check_movum.s b/tests/tcg/cris/system/check_movum.s
similarity index 100%
rename from tests/tcg/cris/check_movum.s
rename to tests/tcg/cris/system/check_movum.s
diff --git a/tests/tcg/cris/check_movur.s b/tests/tcg/cris/system/check_movur.s
similarity index 100%
rename from tests/tcg/cris/check_movur.s
rename to tests/tcg/cris/system/check_movur.s
diff --git a/tests/tcg/cris/check_mulv32.s b/tests/tcg/cris/system/check_mulv32.s
similarity index 100%
rename from tests/tcg/cris/check_mulv32.s
rename to tests/tcg/cris/system/check_mulv32.s
diff --git a/tests/tcg/cris/check_mulx.s b/tests/tcg/cris/system/check_mulx.s
similarity index 100%
rename from tests/tcg/cris/check_mulx.s
rename to tests/tcg/cris/system/check_mulx.s
diff --git a/tests/tcg/cris/check_neg.s b/tests/tcg/cris/system/check_neg.s
similarity index 100%
rename from tests/tcg/cris/check_neg.s
rename to tests/tcg/cris/system/check_neg.s
diff --git a/tests/tcg/cris/check_not.s b/tests/tcg/cris/system/check_not.s
similarity index 100%
rename from tests/tcg/cris/check_not.s
rename to tests/tcg/cris/system/check_not.s
diff --git a/tests/tcg/cris/check_orc.s b/tests/tcg/cris/system/check_orc.s
similarity index 100%
rename from tests/tcg/cris/check_orc.s
rename to tests/tcg/cris/system/check_orc.s
diff --git a/tests/tcg/cris/check_orm.s b/tests/tcg/cris/system/check_orm.s
similarity index 100%
rename from tests/tcg/cris/check_orm.s
rename to tests/tcg/cris/system/check_orm.s
diff --git a/tests/tcg/cris/check_orq.s b/tests/tcg/cris/system/check_orq.s
similarity index 100%
rename from tests/tcg/cris/check_orq.s
rename to tests/tcg/cris/system/check_orq.s
diff --git a/tests/tcg/cris/check_orr.s b/tests/tcg/cris/system/check_orr.s
similarity index 100%
rename from tests/tcg/cris/check_orr.s
rename to tests/tcg/cris/system/check_orr.s
diff --git a/tests/tcg/cris/check_ret.s b/tests/tcg/cris/system/check_ret.s
similarity index 100%
rename from tests/tcg/cris/check_ret.s
rename to tests/tcg/cris/system/check_ret.s
diff --git a/tests/tcg/cris/check_scc.s b/tests/tcg/cris/system/check_scc.s
similarity index 100%
rename from tests/tcg/cris/check_scc.s
rename to tests/tcg/cris/system/check_scc.s
diff --git a/tests/tcg/cris/check_subc.s b/tests/tcg/cris/system/check_subc.s
similarity index 100%
rename from tests/tcg/cris/check_subc.s
rename to tests/tcg/cris/system/check_subc.s
diff --git a/tests/tcg/cris/check_subm.s b/tests/tcg/cris/system/check_subm.s
similarity index 100%
rename from tests/tcg/cris/check_subm.s
rename to tests/tcg/cris/system/check_subm.s
diff --git a/tests/tcg/cris/check_subq.s b/tests/tcg/cris/system/check_subq.s
similarity index 100%
rename from tests/tcg/cris/check_subq.s
rename to tests/tcg/cris/system/check_subq.s
diff --git a/tests/tcg/cris/check_subr.s b/tests/tcg/cris/system/check_subr.s
similarity index 100%
rename from tests/tcg/cris/check_subr.s
rename to tests/tcg/cris/system/check_subr.s
diff --git a/tests/tcg/cris/check_xarith.s b/tests/tcg/cris/system/check_xarith.s
similarity index 100%
rename from tests/tcg/cris/check_xarith.s
rename to tests/tcg/cris/system/check_xarith.s
diff --git a/tests/tcg/cris/crt.s b/tests/tcg/cris/system/crt.s
similarity index 100%
rename from tests/tcg/cris/crt.s
rename to tests/tcg/cris/system/crt.s
diff --git a/tests/tcg/cris/sys.c b/tests/tcg/cris/system/sys.c
similarity index 100%
rename from tests/tcg/cris/sys.c
rename to tests/tcg/cris/system/sys.c
diff --git a/tests/tcg/cris/testutils.inc b/tests/tcg/cris/system/testutils.inc
similarity index 100%
rename from tests/tcg/cris/testutils.inc
rename to tests/tcg/cris/system/testutils.inc
diff --git a/tests/tcg/cris/check_abs.c b/tests/tcg/cris/user/check_abs.c
similarity index 100%
rename from tests/tcg/cris/check_abs.c
rename to tests/tcg/cris/user/check_abs.c
diff --git a/tests/tcg/cris/check_addc.c b/tests/tcg/cris/user/check_addc.c
similarity index 100%
rename from tests/tcg/cris/check_addc.c
rename to tests/tcg/cris/user/check_addc.c
diff --git a/tests/tcg/cris/check_addcm.c b/tests/tcg/cris/user/check_addcm.c
similarity index 100%
rename from tests/tcg/cris/check_addcm.c
rename to tests/tcg/cris/user/check_addcm.c
diff --git a/tests/tcg/cris/check_addo.c b/tests/tcg/cris/user/check_addo.c
similarity index 100%
rename from tests/tcg/cris/check_addo.c
rename to tests/tcg/cris/user/check_addo.c
diff --git a/tests/tcg/cris/check_addoq.c b/tests/tcg/cris/user/check_addoq.c
similarity index 100%
rename from tests/tcg/cris/check_addoq.c
rename to tests/tcg/cris/user/check_addoq.c
diff --git a/tests/tcg/cris/check_bound.c b/tests/tcg/cris/user/check_bound.c
similarity index 100%
rename from tests/tcg/cris/check_bound.c
rename to tests/tcg/cris/user/check_bound.c
diff --git a/tests/tcg/cris/check_ftag.c b/tests/tcg/cris/user/check_ftag.c
similarity index 100%
rename from tests/tcg/cris/check_ftag.c
rename to tests/tcg/cris/user/check_ftag.c
diff --git a/tests/tcg/cris/check_glibc_kernelversion.c b/tests/tcg/cris/user/check_glibc_kernelversion.c
similarity index 100%
rename from tests/tcg/cris/check_glibc_kernelversion.c
rename to tests/tcg/cris/user/check_glibc_kernelversion.c
diff --git a/tests/tcg/cris/check_hello.c b/tests/tcg/cris/user/check_hello.c
similarity index 100%
rename from tests/tcg/cris/check_hello.c
rename to tests/tcg/cris/user/check_hello.c
diff --git a/tests/tcg/cris/check_int64.c b/tests/tcg/cris/user/check_int64.c
similarity index 100%
rename from tests/tcg/cris/check_int64.c
rename to tests/tcg/cris/user/check_int64.c
diff --git a/tests/tcg/cris/check_lz.c b/tests/tcg/cris/user/check_lz.c
similarity index 100%
rename from tests/tcg/cris/check_lz.c
rename to tests/tcg/cris/user/check_lz.c
diff --git a/tests/tcg/cris/check_mapbrk.c b/tests/tcg/cris/user/check_mapbrk.c
similarity index 100%
rename from tests/tcg/cris/check_mapbrk.c
rename to tests/tcg/cris/user/check_mapbrk.c
diff --git a/tests/tcg/cris/check_mmap1.c b/tests/tcg/cris/user/check_mmap1.c
similarity index 100%
rename from tests/tcg/cris/check_mmap1.c
rename to tests/tcg/cris/user/check_mmap1.c
diff --git a/tests/tcg/cris/check_mmap2.c b/tests/tcg/cris/user/check_mmap2.c
similarity index 100%
rename from tests/tcg/cris/check_mmap2.c
rename to tests/tcg/cris/user/check_mmap2.c
diff --git a/tests/tcg/cris/check_mmap3.c b/tests/tcg/cris/user/check_mmap3.c
similarity index 100%
rename from tests/tcg/cris/check_mmap3.c
rename to tests/tcg/cris/user/check_mmap3.c
diff --git a/tests/tcg/cris/check_moveq.c b/tests/tcg/cris/user/check_moveq.c
similarity index 100%
rename from tests/tcg/cris/check_moveq.c
rename to tests/tcg/cris/user/check_moveq.c
diff --git a/tests/tcg/cris/check_openpf1.c b/tests/tcg/cris/user/check_openpf1.c
similarity index 100%
rename from tests/tcg/cris/check_openpf1.c
rename to tests/tcg/cris/user/check_openpf1.c
diff --git a/tests/tcg/cris/check_openpf2.c b/tests/tcg/cris/user/check_openpf2.c
similarity index 100%
rename from tests/tcg/cris/check_openpf2.c
rename to tests/tcg/cris/user/check_openpf2.c
diff --git a/tests/tcg/cris/check_openpf3.c b/tests/tcg/cris/user/check_openpf3.c
similarity index 100%
rename from tests/tcg/cris/check_openpf3.c
rename to tests/tcg/cris/user/check_openpf3.c
diff --git a/tests/tcg/cris/check_openpf5.c b/tests/tcg/cris/user/check_openpf5.c
similarity index 100%
rename from tests/tcg/cris/check_openpf5.c
rename to tests/tcg/cris/user/check_openpf5.c
diff --git a/tests/tcg/cris/check_settls1.c b/tests/tcg/cris/user/check_settls1.c
similarity index 100%
rename from tests/tcg/cris/check_settls1.c
rename to tests/tcg/cris/user/check_settls1.c
diff --git a/tests/tcg/cris/check_sigalrm.c b/tests/tcg/cris/user/check_sigalrm.c
similarity index 100%
rename from tests/tcg/cris/check_sigalrm.c
rename to tests/tcg/cris/user/check_sigalrm.c
diff --git a/tests/tcg/cris/check_stat1.c b/tests/tcg/cris/user/check_stat1.c
similarity index 100%
rename from tests/tcg/cris/check_stat1.c
rename to tests/tcg/cris/user/check_stat1.c
diff --git a/tests/tcg/cris/check_stat2.c b/tests/tcg/cris/user/check_stat2.c
similarity index 100%
rename from tests/tcg/cris/check_stat2.c
rename to tests/tcg/cris/user/check_stat2.c
diff --git a/tests/tcg/cris/check_stat3.c b/tests/tcg/cris/user/check_stat3.c
similarity index 100%
rename from tests/tcg/cris/check_stat3.c
rename to tests/tcg/cris/user/check_stat3.c
diff --git a/tests/tcg/cris/check_stat4.c b/tests/tcg/cris/user/check_stat4.c
similarity index 100%
rename from tests/tcg/cris/check_stat4.c
rename to tests/tcg/cris/user/check_stat4.c
diff --git a/tests/tcg/cris/check_swap.c b/tests/tcg/cris/user/check_swap.c
similarity index 100%
rename from tests/tcg/cris/check_swap.c
rename to tests/tcg/cris/user/check_swap.c
diff --git a/tests/tcg/cris/check_time2.c b/tests/tcg/cris/user/check_time2.c
similarity index 100%
rename from tests/tcg/cris/check_time2.c
rename to tests/tcg/cris/user/check_time2.c
diff --git a/tests/tcg/cris/crisutils.h b/tests/tcg/cris/user/crisutils.h
similarity index 100%
rename from tests/tcg/cris/crisutils.h
rename to tests/tcg/cris/user/crisutils.h
diff --git a/tests/tcg/cris/sys.h b/tests/tcg/cris/user/sys.h
similarity index 100%
rename from tests/tcg/cris/sys.h
rename to tests/tcg/cris/user/sys.h
-- 
2.17.1

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH  10/13] tests/tcg/cris: cleanup sys.c
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
                   ` (8 preceding siblings ...)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 09/13] tests/tcg: split cris tests into system and user mode Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 11/13] tests/tcg/cris: comment out the ccs test Alex Bennée
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée

This is a mini library which provides helper functions to the tests
which are all currently written in assembly. A bunch of minor changes:

      - removed libc related headers (fedora-cris-cross is a system compiler)
      - re-organised the functions to avoid forward declarations
      - cleaned up brace usage
      - restored exit for _fail case
      - removed tabs and fixed indentation

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/cris/system/sys.c | 96 ++++++++++++++++++-------------------
 1 file changed, 48 insertions(+), 48 deletions(-)

diff --git a/tests/tcg/cris/system/sys.c b/tests/tcg/cris/system/sys.c
index 21f08c0747..aa342335d6 100644
--- a/tests/tcg/cris/system/sys.c
+++ b/tests/tcg/cris/system/sys.c
@@ -1,59 +1,59 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-static inline int mystrlen(char *s) {
-	int i = 0;
-	while (s[i])
-		i++;
-	return i;
+/*
+ * Helper functions for CRIS system tests
+ *
+ * There is no libc and only a limited set of headers.
+ */
+
+#include <stddef.h>
+
+void exit(int status)
+{
+    register unsigned int callno asm ("r9") = 1; /* NR_exit */
+
+    asm volatile ("break 13\n"
+                  : /* no outputs */
+                  : "r" (callno)
+                  : "memory" );
+    while(1);
 }
 
-void pass(void) {
-	char s[] = "passed.\n";
-	write (1, s, sizeof (s) - 1);
-	exit (0);
-}
+size_t write(int fd, const void *buf, size_t count)
+{
+    register unsigned int callno asm ("r9") = 4; /* NR_write */
+    register unsigned int r10 asm ("r10") = fd;
+    register const void *r11 asm ("r11") = buf;
+    register size_t r12 asm ("r12") = count;
+    register unsigned int r asm ("r10");
 
-void _fail(char *reason) {
-	char s[] = "\nfailed: ";
-	int len = mystrlen(reason);
-	write (1, s, sizeof (s) - 1);
-	write (1, reason, len);
-	write (1, "\n", 1);
-//	exit (1);
-}
+    asm volatile ("break 13\n"
+                  : "=r" (r)
+                  : "r" (callno), "0" (r10), "r" (r11), "r" (r12)
+                  : "memory");
 
-void *memset (void *s, int c, size_t n) {
-	char *p = s;
-	int i;
-	for (i = 0; i < n; i++)
-		p[i] = c;
-	return p;
+    return r;
 }
 
-void exit (int status) {
-	register unsigned int callno asm ("r9") = 1; /* NR_exit */
-
-	asm volatile ("break 13\n"
-		      :
-		      : "r" (callno)
-		      : "memory" );
-	while(1)
-		;
+static inline int mystrlen(char *s)
+{
+    int i = 0;
+    while (s[i]) {
+        i++;
+    }
+    return i;
 }
 
-ssize_t write (int fd, const void *buf, size_t count) {
-	register unsigned int callno asm ("r9") = 4; /* NR_write */
-	register unsigned int r10 asm ("r10") = fd;
-	register const void *r11 asm ("r11") = buf;
-	register size_t r12 asm ("r12") = count;
-	register unsigned int r asm ("r10");
 
-	asm volatile ("break 13\n"
-	     : "=r" (r)
-	     : "r" (callno), "0" (r10), "r" (r11), "r" (r12)
-	     : "memory");
+void pass(void) {
+    char s[] = "passed.\n";
+    write(1, s, sizeof (s) - 1);
+    exit(0);
+}
 
-	return r;
+void _fail(char *reason) {
+    char s[] = "\nfailed: ";
+    int len = mystrlen(reason);
+    write(1, s, sizeof (s) - 1);
+    write(1, reason, len);
+    write(1, "\n", 1);
+    exit(1);
 }
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH 11/13] tests/tcg/cris: comment out the ccs test
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
                   ` (9 preceding siblings ...)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 10/13] tests/tcg/cris: cleanup sys.c Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2019-01-04 14:00   ` Edgar E. Iglesias
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 12/13] tests/tcg/cris: align mul operations Alex Bennée
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée

Evidently upstream gcc doesn't like this opcode.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/cris/system/check_btst.s | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/tcg/cris/system/check_btst.s b/tests/tcg/cris/system/check_btst.s
index e39fc8f4d6..485deb2006 100644
--- a/tests/tcg/cris/system/check_btst.s
+++ b/tests/tcg/cris/system/check_btst.s
@@ -85,12 +85,12 @@
  checkr3 1111
 
  ; check that X gets cleared and that only the NZ flags are touched.
- move.d	0xff, $r0
- move $r0, $ccs
- btst r3,r3
- move $ccs, $r0
- and.d 0xff, $r0
- cmp.d	0xe3, $r0
- test_cc 0 1 0 0
+ ;; move.d	0xff, $r0
+ ;; move $r0, $ccs
+ ;; btst r3,r3
+ ;; move $ccs, $r0
+ ;; and.d 0xff, $r0
+ ;; cmp.d	0xe3, $r0
+ ;; test_cc 0 1 0 0
 
  quit
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH 12/13] tests/tcg/cris: align mul operations
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
                   ` (10 preceding siblings ...)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 11/13] tests/tcg/cris: comment out the ccs test Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 13/13] tests/tcg: enable cris system tests Alex Bennée
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée

To avoid:

  Error: dangerous MULS/MULU location; give it higher alignment

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/cris/system/check_mulx.s | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/tcg/cris/system/check_mulx.s b/tests/tcg/cris/system/check_mulx.s
index d43241a6f5..a7a1f82a82 100644
--- a/tests/tcg/cris/system/check_mulx.s
+++ b/tests/tcg/cris/system/check_mulx.s
@@ -3,6 +3,8 @@
 
  .include "testutils.inc"
  start
+
+ .align 4
  moveq -1,r3
  moveq 2,r4
  muls.d r4,r3
@@ -11,6 +13,7 @@
  move mof,r3
  checkr3 ffffffff
 
+ .align 4
  moveq -1,r3
  moveq 2,r4
  mulu.d r4,r3
@@ -19,6 +22,7 @@
  move mof,r3
  checkr3 1
 
+ .align 4
  moveq 2,r3
  moveq -1,r4
  muls.d r4,r3
@@ -27,6 +31,7 @@
  move mof,r3
  checkr3 ffffffff
 
+ .align 4
  moveq 2,r3
  moveq -1,r4
  mulu.d r4,r3
@@ -98,6 +103,7 @@
  checkr3 1fffe
  move mof,r3
  checkr3 0
+ nop
 
  moveq 2,r3
  move.d 0xffff,r4
@@ -138,6 +144,7 @@
  checkr3 fdbdade2
  move mof,r3
  checkr3 ffffffff
+ nop
 
  move.d 0x5432f789,r4
  move.d 0x78134452,r3
@@ -146,6 +153,7 @@
  checkr3 420fade2
  move mof,r3
  checkr3 0
+ nop
 
  move.d 0xff,r3
  moveq 2,r4
@@ -186,6 +194,7 @@
  checkr3 1
  move mof,r3
  checkr3 0
+ nop
 
  moveq -1,r4
  move.d r4,r3
@@ -194,6 +203,7 @@
  checkr3 fe01
  move mof,r3
  checkr3 0
+ nop
 
  move.d 0xfeda49ff,r4
  move.d r4,r3
@@ -202,6 +212,7 @@
  checkr3 1
  move mof,r3
  checkr3 0
+ nop
 
  move.d 0xfeda49ff,r4
  move.d r4,r3
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [RFC PATCH 13/13] tests/tcg: enable cris system tests
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
                   ` (11 preceding siblings ...)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 12/13] tests/tcg/cris: align mul operations Alex Bennée
@ 2018-12-10 15:28 ` Alex Bennée
  2019-01-04 13:58 ` [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Edgar E. Iglesias
  2019-01-04 14:03 ` Edgar E. Iglesias
  14 siblings, 0 replies; 35+ messages in thread
From: Alex Bennée @ 2018-12-10 15:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc,
	Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

Currently we don't actually run them.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include          |   1 +
 tests/tcg/cris/Makefile                | 168 -------------------------
 tests/tcg/cris/Makefile.include        |   6 +
 tests/tcg/cris/Makefile.softmmu-target |  50 ++++++++
 4 files changed, 57 insertions(+), 168 deletions(-)
 delete mode 100644 tests/tcg/cris/Makefile
 create mode 100644 tests/tcg/cris/Makefile.include
 create mode 100644 tests/tcg/cris/Makefile.softmmu-target

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 9467e9d088..e1ed0df5f9 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -128,6 +128,7 @@ docker-image-tricore-cross: docker-image-debian9
 DOCKER_PARTIAL_IMAGES += debian-alpha-cross debian-hppa-cross debian-m68k-cross debian-sh4-cross
 DOCKER_PARTIAL_IMAGES += debian-sparc64-cross debian-mips64-cross debian-riscv64-cross
 DOCKER_PARTIAL_IMAGES += debian-tricore-cross debian-powerpc-cross fedora-i386-cross
+DOCKER_PARTIAL_IMAGES += fedora-cris-cross
 
 # Rules for building linux-user powered images
 #
diff --git a/tests/tcg/cris/Makefile b/tests/tcg/cris/Makefile
deleted file mode 100644
index 664b30ce81..0000000000
--- a/tests/tcg/cris/Makefile
+++ /dev/null
@@ -1,168 +0,0 @@
--include ../../../config-host.mak
-
-CROSS=crisv32-axis-linux-gnu-
-SIM=../../../cris-linux-user/qemu-cris -L ./
-SIMG=cris-axis-linux-gnu-run --sysroot=./
-
-CC      = $(CROSS)gcc
-#AS      = $(CROSS)as
-AS	= $(CC) -x assembler-with-cpp
-SIZE    = $(CROSS)size
-LD      = $(CC)
-OBJCOPY = $(CROSS)objcopy
-
-# we rely on GCC inline:ing the stuff we tell it to in many places here.
-CFLAGS  = -Winline -Wall -g -O2 -static
-NOSTDFLAGS = -nostartfiles -nostdlib
-ASFLAGS += -g -Wa,-I,$(SRC_PATH)/tests/tcg/cris/
-LDLIBS  =
-NOSTDLIBS = -lgcc
-
-CRT        = crt.o
-SYS        = sys.o
-TESTCASES += check_abs.tst
-TESTCASES += check_addc.tst
-TESTCASES += check_addcm.tst
-TESTCASES += check_addcv17.tst
-TESTCASES += check_addo.tst
-TESTCASES += check_addoq.tst
-TESTCASES += check_addi.tst
-TESTCASES += check_addiv32.tst
-TESTCASES += check_addm.tst
-TESTCASES += check_addr.tst
-TESTCASES += check_addq.tst
-TESTCASES += check_addxc.tst
-TESTCASES += check_addxm.tst
-TESTCASES += check_addxr.tst
-TESTCASES += check_andc.tst
-TESTCASES += check_andm.tst
-TESTCASES += check_andr.tst
-TESTCASES += check_andq.tst
-TESTCASES += check_asr.tst
-TESTCASES += check_ba.tst
-TESTCASES += check_bas.tst
-TESTCASES += check_bcc.tst
-TESTCASES += check_bound.tst
-TESTCASES += check_boundc.tst
-TESTCASES += check_boundr.tst
-TESTCASES += check_btst.tst
-TESTCASES += check_clearfv32.tst
-TESTCASES += check_cmpc.tst
-TESTCASES += check_cmpr.tst
-TESTCASES += check_cmpq.tst
-TESTCASES += check_cmpm.tst
-TESTCASES += check_cmpxc.tst
-TESTCASES += check_cmpxm.tst
-TESTCASES += check_cmp-2.tst
-TESTCASES += check_clrjmp1.tst
-TESTCASES += check_dstep.tst
-TESTCASES += check_ftag.tst
-TESTCASES += check_int64.tst
-# check_jsr is broken.
-#TESTCASES += check_jsr.tst
-TESTCASES += check_mcp.tst
-TESTCASES += check_movei.tst
-TESTCASES += check_mover.tst
-TESTCASES += check_moverm.tst
-TESTCASES += check_moveq.tst
-TESTCASES += check_movemr.tst
-TESTCASES += check_movemrv32.tst
-TESTCASES += check_movecr.tst
-TESTCASES += check_movmp.tst
-TESTCASES += check_movpr.tst
-TESTCASES += check_movprv32.tst
-TESTCASES += check_movdelsr1.tst
-TESTCASES += check_movpmv32.tst
-TESTCASES += check_movsr.tst
-TESTCASES += check_movsm.tst
-TESTCASES += check_movscr.tst
-TESTCASES += check_movur.tst
-TESTCASES += check_movum.tst
-TESTCASES += check_movucr.tst
-TESTCASES += check_mulx.tst
-TESTCASES += check_mulv32.tst
-TESTCASES += check_neg.tst
-TESTCASES += check_not.tst
-TESTCASES += check_lz.tst
-TESTCASES += check_lapc.tst
-TESTCASES += check_lsl.tst
-TESTCASES += check_lsr.tst
-TESTCASES += check_orc.tst
-TESTCASES += check_orm.tst
-TESTCASES += check_orr.tst
-TESTCASES += check_orq.tst
-TESTCASES += check_ret.tst
-TESTCASES += check_swap.tst
-TESTCASES += check_scc.tst
-TESTCASES += check_subc.tst
-TESTCASES += check_subq.tst
-TESTCASES += check_subr.tst
-TESTCASES += check_subm.tst
-TESTCASES += check_glibc_kernelversion.tst
-TESTCASES += check_xarith.tst
-
-TESTCASES += check_hello.ctst
-TESTCASES += check_stat1.ctst
-TESTCASES += check_stat2.ctst
-TESTCASES += check_stat3.ctst
-TESTCASES += check_stat4.ctst
-TESTCASES += check_openpf1.ctst
-TESTCASES += check_openpf2.ctst
-TESTCASES += check_openpf3.ctst
-TESTCASES += check_openpf5.ctst
-TESTCASES += check_mapbrk.ctst
-TESTCASES += check_mmap1.ctst
-TESTCASES += check_mmap2.ctst
-TESTCASES += check_mmap3.ctst
-TESTCASES += check_sigalrm.ctst
-TESTCASES += check_time2.ctst
-TESTCASES += check_settls1.ctst
-
-TESTCASES += check_gcctorture_pr28634-1.ctst
-#TESTCASES += check_gcctorture_pr28634.ctst
-
-all: build
-
-%.o: $(SRC_PATH)/tests/tcg/cris/%.c
-	$(CC) $(CFLAGS) -c $< -o $@
-
-%.o: $(SRC_PATH)/tests/tcg/cris/%.s
-	$(AS) $(ASFLAGS) -c $< -o $@
-
-%.tst: %.o
-	$(CC) $(CFLAGS) $(NOSTDFLAGS) $(LDLIBS) $(NOSTDLIBS) $(CRT) $< $(SYS) -o $@
-
-%.ctst: %.o
-	$(CC) $(CFLAGS) $(LDLIBS) $< -o $@
-
-
-sysv10.o: sys.c
-	$(CC) $(CFLAGS) -mcpu=v10 -c $< -o $@
-
-crtv10.o: crt.s
-	$(AS) $(ASFLAGS) -mcpu=v10 -c $< -o $@
-
-check_addcv17.tst: ASFLAGS += -mcpu=v10
-check_addcv17.tst: CRT := crtv10.o
-check_addcv17.tst: SYS := sysv10.o
-check_addcv17.tst: crtv10.o sysv10.o
-
-build: $(CRT) $(SYS) $(TESTCASES)
-
-check: $(CRT) $(SYS) $(TESTCASES)
-	@printf "\nQEMU simulator.\n"
-	for case in $(TESTCASES); do \
-		printf %s "$$case "; \
-		SIMARGS=; \
-		case $$case in *v17*) SIMARGS="-cpu crisv17";; esac; \
-		$(SIM) $$SIMARGS ./$$case; \
-	done
-check-g: $(CRT) $(SYS) $(TESTCASES)
-	@printf "\nGDB simulator.\n"
-	@for case in $(TESTCASES); do \
-		printf %s "$$case "; \
-		$(SIMG) $$case; \
-	done
-
-clean:
-	$(RM) -fr $(TESTCASES) *.o
diff --git a/tests/tcg/cris/Makefile.include b/tests/tcg/cris/Makefile.include
new file mode 100644
index 0000000000..1c037824bf
--- /dev/null
+++ b/tests/tcg/cris/Makefile.include
@@ -0,0 +1,6 @@
+#
+# Makefile.include for all CRIS targets
+#
+
+DOCKER_IMAGE=fedora-cris-cross
+DOCKER_CROSS_COMPILER=cris-linux-gnu-gcc
diff --git a/tests/tcg/cris/Makefile.softmmu-target b/tests/tcg/cris/Makefile.softmmu-target
new file mode 100644
index 0000000000..988741f1b3
--- /dev/null
+++ b/tests/tcg/cris/Makefile.softmmu-target
@@ -0,0 +1,50 @@
+# -*- Mode: makefile -*-
+#
+# Cris softmmu tests
+#
+
+CRIS_SRC = $(SRC_PATH)/tests/tcg/cris/system
+CRIS_ALL = $(wildcard $(CRIS_SRC)/*.s)
+CRIS_TESTS = $(patsubst $(CRIS_SRC)/%.s, %, $(CRIS_ALL))
+# Filter out common blobs and broken tests
+CRIS_BROKEN_TESTS  = crt check_jsr
+# upstream GCC doesn't support v32
+CRIS_BROKEN_TESTS += check_mcp check_mulv32 check_addiv32 check_movpmv32
+CRIS_BROKEN_TESTS += check_movprv32 check_clearfv32 check_movemrv32 check_bas
+CRIS_BROKEN_TESTS += check_lapc check_movei
+# no sure why
+CRIS_BROKEN_TESTS += check_scc check_xarith
+
+CRIS_USABLE_TESTS = $(filter-out $(CRIS_BROKEN_TESTS), $(CRIS_TESTS))
+CRIS_RUNS = $(patsubst %, run-%, $(CRIS_USABLE_TESTS))
+
+# add to the list of tests
+TESTS += $(CRIS_USABLE_TESTS)
+VPATH += $(CRIS_SRC)
+
+AS	= $(CC) -x assembler-with-cpp
+LD      = $(CC)
+
+# we rely on GCC inline:ing the stuff we tell it to in many places here.
+CFLAGS  = -Winline -Wall -g -O2 -static
+NOSTDFLAGS = -nostartfiles -nostdlib
+ASFLAGS += -mcpu=v10 -g -Wa,-I,$(SRC_PATH)/tests/tcg/cris/system
+CRT_FILES = crt.o sys.o
+
+# stop make deleting crt files if build fails
+.PRECIOUS: $(CRT_FILES)
+
+%.o: %.c
+	$(CC) -c $< -o $@
+
+%.o: %.s
+	$(AS) $(ASFLAGS) -c $< -o $@
+
+%: %.s $(CRT_FILES)
+	$(CC) $(ASFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT_FILES)
+
+# Currently we skip these as the system tests originally targeted the
+# GNU Simulator and probably need some crafting to load as a kernel
+# into QEMU
+$(CRIS_RUNS):
+	$(call skip-test, $@, "NEEDS MAGIC INVOCATION")
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 07/13] tests/tcg/xtensa: enable system tests
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 07/13] tests/tcg/xtensa: enable system tests Alex Bennée
@ 2018-12-11  0:25   ` Max Filippov
  2018-12-11 11:58     ` Alex Bennée
  0 siblings, 1 reply; 35+ messages in thread
From: Max Filippov @ 2018-12-11  0:25 UTC (permalink / raw)
  To: Alex Bennée
  Cc: qemu-devel, Edgar E. Iglesias, Michael Walle, Aurelien Jarno,
	amarkovic, Stafford Horne

On Mon, Dec 10, 2018 at 7:28 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/tcg/xtensa/Makefile                | 93 ------------------------
>  tests/tcg/xtensa/Makefile.softmmu-target | 43 +++++++++++
>  2 files changed, 43 insertions(+), 93 deletions(-)
>  delete mode 100644 tests/tcg/xtensa/Makefile

That Makefile provides a few nice goals for guest and host debugging
and a way to run tests on Tensilica ISS, it would be nice to keep it.

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP) Alex Bennée
@ 2018-12-11  9:54   ` Aleksandar Markovic
  2018-12-11 10:16     ` Aleksandar Markovic
  2018-12-11 12:17     ` Alex Bennée
  2018-12-11 13:45   ` Richard Henderson
  2018-12-19 14:39   ` Aleksandar Markovic
  2 siblings, 2 replies; 35+ messages in thread
From: Aleksandar Markovic @ 2018-12-11  9:54 UTC (permalink / raw)
  To: Alex Bennée
  Cc: shorne, amarkovic, qemu-devel, aurelien, edgar.iglesias,
	jcmvbkbc, michael, Stefan Markovic

On Dec 10, 2018 4:29 PM, "Alex Bennée" <alex.bennee@linaro.org> wrote:
>
> Convert the existing tests to use our common cross build
> infrastructure.
>
> [WIP: mips32r2 disabled to avoid name clash]
> [WIP: mipsr5900 disabled due to clashing build flags]
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/tcg/mips/Makefile.target       |  15 ++-
>  tests/tcg/mips/mips32-dsp/Makefile   | 166 +++++----------------------
>  tests/tcg/mips/mips32-dspr2/Makefile |  83 +++-----------
>  tests/tcg/mips/mipsr5900/Makefile    |  40 +++----
>  4 files changed, 75 insertions(+), 229 deletions(-)
>

Thank you Alex for this initiative.

For DSP, following MIPS CPUs in QEMU support DSP:

DSP: 24KEc (MIPS32R2),  34Kf (MIPS32R2), 74Kf (MIPS32R2), mips64dspr2
(MIPS64R2),

DSP R2: mips64dspr2 (MIPS64R2),

(For simplicity, I didn't mention new nanoMIPS architecture, since your gcc
for sure don't support it yet)

In brackets, those are architectures that are usually required to be passed
to gcc as its option, and that explains the switch involving MIPS64R2 for
DSP R2.

Whereas while starting QEMU, CPU name should be specified in -cpu switch.

mips64dspr2 is a virtual cpu (doesn't model any real cpu) made specifically
for DSP R2 testings, hence such odd name.

Hopefully this clarifies some of your dilemmas.

What are name clashes that you mention? Are they just related to filenames?

CHEERS,
Aleksandar

> diff --git a/tests/tcg/mips/Makefile.target
b/tests/tcg/mips/Makefile.target
> index 086625f533..33bb25bf8d 100644
> --- a/tests/tcg/mips/Makefile.target
> +++ b/tests/tcg/mips/Makefile.target
> @@ -15,8 +15,17 @@ TESTS += $(MIPS_TESTS)
>  hello-mips: CFLAGS+=-ffreestanding
>  hello-mips: LDFLAGS+=-nostdlib
>
> -# For MIPS32 and 64 we have a bunch of extra tests in sub-directories
> -# however they are intended for system tests.
> -
>  run-hello-mips: hello-mips
>         $(call skip-test, $<, "BROKEN")
> +
> +# For MIPS32 and mipsr5900 we have a bunch of extra tests in
sub-directories
> +
> +ifeq ($(TARGET_NAME),mipsel)
> +-include $(MIPS_SRC)/mips32-dsp/Makefile
> +
> +# FIXME: doesn't build - names clash with mips32-dsp
> +#-include $(MIPS_SRC)/mips32-dspr2/Makefile
> +
> +# FIXME: the docker compiler can't build the binaries
> +#-include $(MIPS_SRC)/mipsr5900/Makefile
> +endif
> diff --git a/tests/tcg/mips/mips32-dsp/Makefile
b/tests/tcg/mips/mips32-dsp/Makefile
> index c3a0a00944..df2dddceaa 100644
> --- a/tests/tcg/mips/mips32-dsp/Makefile
> +++ b/tests/tcg/mips/mips32-dsp/Makefile
> @@ -1,136 +1,30 @@
> --include ../../config-host.mak
> -
> -CROSS=mips64el-unknown-linux-gnu-
> -
> -SIM=qemu-mipsel
> -SIM_FLAGS=-cpu 74Kf
> -
> -CC      = $(CROSS)gcc
> -CFLAGS  = -mabi=32 -march=mips32r2 -mgp32 -mdsp -static
> -
> -TESTCASES = absq_s_ph.tst
> -TESTCASES += absq_s_w.tst
> -TESTCASES += addq_ph.tst
> -TESTCASES += addq_s_ph.tst
> -TESTCASES += addq_s_w.tst
> -TESTCASES += addsc.tst
> -TESTCASES += addu_qb.tst
> -TESTCASES += addu_s_qb.tst
> -TESTCASES += addwc.tst
> -TESTCASES += bitrev.tst
> -TESTCASES += bposge32.tst
> -TESTCASES += cmp_eq_ph.tst
> -TESTCASES += cmpgu_eq_qb.tst
> -TESTCASES += cmpgu_le_qb.tst
> -TESTCASES += cmpgu_lt_qb.tst
> -TESTCASES += cmp_le_ph.tst
> -TESTCASES += cmp_lt_ph.tst
> -TESTCASES += cmpu_eq_qb.tst
> -TESTCASES += cmpu_le_qb.tst
> -TESTCASES += cmpu_lt_qb.tst
> -TESTCASES += dpaq_sa_l_w.tst
> -TESTCASES += dpaq_s_w_ph.tst
> -TESTCASES += dpau_h_qbl.tst
> -TESTCASES += dpau_h_qbr.tst
> -TESTCASES += dpsq_sa_l_w.tst
> -TESTCASES += dpsq_s_w_ph.tst
> -TESTCASES += dpsu_h_qbl.tst
> -TESTCASES += dpsu_h_qbr.tst
> -TESTCASES += extp.tst
> -TESTCASES += extpdp.tst
> -TESTCASES += extpdpv.tst
> -TESTCASES += extpv.tst
> -TESTCASES += extr_rs_w.tst
> -TESTCASES += extr_r_w.tst
> -TESTCASES += extr_s_h.tst
> -TESTCASES += extrv_rs_w.tst
> -TESTCASES += extrv_r_w.tst
> -TESTCASES += extrv_s_h.tst
> -TESTCASES += extrv_w.tst
> -TESTCASES += extr_w.tst
> -TESTCASES += insv.tst
> -TESTCASES += lbux.tst
> -TESTCASES += lhx.tst
> -TESTCASES += lwx.tst
> -TESTCASES += madd.tst
> -TESTCASES += maddu.tst
> -TESTCASES += maq_sa_w_phl.tst
> -TESTCASES += maq_sa_w_phr.tst
> -TESTCASES += maq_s_w_phl.tst
> -TESTCASES += maq_s_w_phr.tst
> -TESTCASES += mfhi.tst
> -TESTCASES += mflo.tst
> -TESTCASES += modsub.tst
> -TESTCASES += msub.tst
> -TESTCASES += msubu.tst
> -TESTCASES += mthi.tst
> -TESTCASES += mthlip.tst
> -TESTCASES += mtlo.tst
> -TESTCASES += muleq_s_w_phl.tst
> -TESTCASES += muleq_s_w_phr.tst
> -TESTCASES += muleu_s_ph_qbl.tst
> -TESTCASES += muleu_s_ph_qbr.tst
> -TESTCASES += mulq_rs_ph.tst
> -TESTCASES += mult.tst
> -TESTCASES += multu.tst
> -TESTCASES += packrl_ph.tst
> -TESTCASES += pick_ph.tst
> -TESTCASES += pick_qb.tst
> -TESTCASES += precequ_ph_qbla.tst
> -TESTCASES += precequ_ph_qbl.tst
> -TESTCASES += precequ_ph_qbra.tst
> -TESTCASES += precequ_ph_qbr.tst
> -TESTCASES += preceq_w_phl.tst
> -TESTCASES += preceq_w_phr.tst
> -TESTCASES += preceu_ph_qbla.tst
> -TESTCASES += preceu_ph_qbl.tst
> -TESTCASES += preceu_ph_qbra.tst
> -TESTCASES += preceu_ph_qbr.tst
> -TESTCASES += precrq_ph_w.tst
> -TESTCASES += precrq_qb_ph.tst
> -TESTCASES += precrq_rs_ph_w.tst
> -TESTCASES += precrqu_s_qb_ph.tst
> -TESTCASES += raddu_w_qb.tst
> -TESTCASES += rddsp.tst
> -TESTCASES += repl_ph.tst
> -TESTCASES += repl_qb.tst
> -TESTCASES += replv_ph.tst
> -TESTCASES += replv_qb.tst
> -TESTCASES += shilo.tst
> -TESTCASES += shilov.tst
> -TESTCASES += shll_ph.tst
> -TESTCASES += shll_qb.tst
> -TESTCASES += shll_s_ph.tst
> -TESTCASES += shll_s_w.tst
> -TESTCASES += shllv_ph.tst
> -TESTCASES += shllv_qb.tst
> -TESTCASES += shllv_s_ph.tst
> -TESTCASES += shllv_s_w.tst
> -TESTCASES += shra_ph.tst
> -TESTCASES += shra_r_ph.tst
> -TESTCASES += shra_r_w.tst
> -TESTCASES += shrav_ph.tst
> -TESTCASES += shrav_r_ph.tst
> -TESTCASES += shrav_r_w.tst
> -TESTCASES += shrl_qb.tst
> -TESTCASES += shrlv_qb.tst
> -TESTCASES += subq_ph.tst
> -TESTCASES += subq_s_ph.tst
> -TESTCASES += subq_s_w.tst
> -TESTCASES += subu_qb.tst
> -TESTCASES += subu_s_qb.tst
> -TESTCASES += wrdsp.tst
> -
> -all: $(TESTCASES)
> -
> -%.tst: %.c
> -       $(CC) $(CFLAGS) $< -o $@
> -
> -check: $(TESTCASES)
> -       @for case in $(TESTCASES); do \
> -        echo $(SIM) $(SIM_FLAGS) ./$$case;\
> -        $(SIM) $(SIM_FLAGS) ./$$case; \
> -       done
> -
> -clean:
> -       $(RM) -rf $(TESTCASES)
> +#
> +# MIPS32-DSP linux-user tests
> +#
> +# We don't set the VPATH for these tests as we re-use the VPATH from
> +# ../Makefile and add explicit paths for the source to avoid name clashes
> +# between the various sub-dirs.
> +#
> +
> +MIPS32DSP_SRC = $(SRC_PATH)/tests/tcg/mips/mips32-dsp
> +MIPS32DSP_ALL = $(wildcard $(MIPS32DSP_SRC)/*.c)
> +MIPS32DSP_TESTS = $(patsubst $(MIPS32DSP_SRC)/%.c, mips32-dsp/%,
$(MIPS32DSP_ALL))
> +MIPS32DSP_RUNS = $(patsubst %, run-%, $(MIPS32DSP_TESTS))
> +
> +# add to the list of tests
> +TESTS += $(MIPS32DSP_TESTS)
> +
> +# We need a rule to ensure we create a sub-directory to build in
> +# It is a PHONY target to prevent confusion with MIPS32DSP_SRC
> +.PHONY: mips32-dsp.build
> +mips32-dsp.build:
> +       mkdir -p mips32-dsp
> +
> +$(MIPS32DSP_TESTS): | mips32-dsp.build
> +$(MIPS32DSP_TESTS): CFLAGS+=-mabi=32 -march=mips32r2 -mgp32 -mdsp
> +
> +$(MIPS32DSP_RUNS): QEMU_OPTS=-cpu 74Kf
> +
> +# FIXME: I don't know why the general rule in tests/tcg/Makefile isn't
enough
> +run-mips32-dsp/%: mips32-dsp/%
> +       $(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on
$(TARGET_NAME) $(QEMU_OPTS)")
> diff --git a/tests/tcg/mips/mips32-dspr2/Makefile
b/tests/tcg/mips/mips32-dspr2/Makefile
> index ed19581c7e..6da966abb6 100644
> --- a/tests/tcg/mips/mips32-dspr2/Makefile
> +++ b/tests/tcg/mips/mips32-dspr2/Makefile
> @@ -1,71 +1,24 @@
> --include ../../config-host.mak
> +#
> +# MIPS32-DSPR2 linux-user tests
> +#
>
> -CROSS=mips64el-unknown-linux-gnu-
> +MIPS32_DSPR2_SRC = $(SRC_PATH)/tests/tcg/mips/mips32-dsp
> +MIPS32_DSPR2_ALL = $(wildcard $(MIPS32_DSPR2_SRC)/*.c)
> +MIPS32_DSPR2_TESTS = $(patsubst $(MIPS32_DSPR2_SRC)/%.c, mips32-dspr2/%,
$(MIPS32_DSPR2_ALL))
> +MIPS32_DSPR2_RUNS = $(patsubst %, run-%, $(MIPS32_DSPR2_TESTS))
>
> -SIM=qemu-mipsel
> -SIM_FLAGS=-cpu 74Kf
> +# add to the list of tests
> +TESTS += $(MIPS32_DSPR2_TESTS)
>
> -CC      = $(CROSS)gcc
> -CFLAGS  = -mabi=32 -march=mips32r2 -mgp32 -mdspr2 -static
> +.PHONY: mips32-dspr2.build
> +mips32-dspr2.build:
> +       mkdir -p mips32-dspr2
>
> -TESTCASES = absq_s_qb.tst
> -TESTCASES += addqh_ph.tst
> -TESTCASES += addqh_r_ph.tst
> -TESTCASES += addqh_r_w.tst
> -TESTCASES += addqh_w.tst
> -TESTCASES += adduh_qb.tst
> -TESTCASES += adduh_r_qb.tst
> -TESTCASES += addu_ph.tst
> -TESTCASES += addu_s_ph.tst
> -TESTCASES += append.tst
> -TESTCASES += balign.tst
> -TESTCASES += cmpgdu_eq_qb.tst
> -TESTCASES += cmpgdu_le_qb.tst
> -TESTCASES += cmpgdu_lt_qb.tst
> -TESTCASES += dpaqx_sa_w_ph.tst
> -TESTCASES += dpa_w_ph.tst
> -TESTCASES += dpax_w_ph.tst
> -TESTCASES += dpaqx_s_w_ph.tst
> -TESTCASES += dpsqx_sa_w_ph.tst
> -TESTCASES += dpsqx_s_w_ph.tst
> -TESTCASES += dps_w_ph.tst
> -TESTCASES += dpsx_w_ph.tst
> -TESTCASES += mul_ph.tst
> -TESTCASES += mulq_rs_w.tst
> -TESTCASES += mulq_s_ph.tst
> -TESTCASES += mulq_s_w.tst
> -TESTCASES += mulsaq_s_w_ph.tst
> -TESTCASES += mulsa_w_ph.tst
> -TESTCASES += mul_s_ph.tst
> -TESTCASES += precr_qb_ph.tst
> -TESTCASES += precr_sra_ph_w.tst
> -TESTCASES += precr_sra_r_ph_w.tst
> -TESTCASES += prepend.tst
> -TESTCASES += shra_qb.tst
> -TESTCASES += shra_r_qb.tst
> -TESTCASES += shrav_qb.tst
> -TESTCASES += shrav_r_qb.tst
> -TESTCASES += shrl_ph.tst
> -TESTCASES += shrlv_ph.tst
> -TESTCASES += subqh_ph.tst
> -TESTCASES += subqh_r_ph.tst
> -TESTCASES += subqh_r_w.tst
> -TESTCASES += subqh_w.tst
> -TESTCASES += subuh_qb.tst
> -TESTCASES += subuh_r_qb.tst
> -TESTCASES += subu_ph.tst
> -TESTCASES += subu_s_ph.tst
> +$(MIPS32_DSPR2_TESTS): | mips32-dspr2.build
> +$(MIPS32_DSPR2_TESTS): CFLAGS+=-mabi=32 -march=mips32r2 -mgp32 -mdspr2
>
> -all: $(TESTCASES)
> +$(MIPS32_DSPR2_RUNS): QEMU_OPTS=-cpu 74Kf
>
> -%.tst: %.c
> -       $(CC) $(CFLAGS) $< -o $@
> -
> -check: $(TESTCASES)
> -       @for case in $(TESTCASES); do \
> -        echo $(SIM) $(SIM_FLAGS) ./$$case;\
> -               $(SIM) $(SIM_FLAGS) ./$$case; \
> -       done
> -
> -clean:
> -       $(RM) -rf $(TESTCASES)
> +# FIXME: I don't know why the general rule in tests/tcg/Makefile isn't
enough
> +run-mips32-dspr2/%: mips32-dspr2/%
> +       $(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on
$(TARGET_NAME) $(QEMU_OPTS)")
> diff --git a/tests/tcg/mips/mipsr5900/Makefile
b/tests/tcg/mips/mipsr5900/Makefile
> index a1c388bc3c..7880e76986 100644
> --- a/tests/tcg/mips/mipsr5900/Makefile
> +++ b/tests/tcg/mips/mipsr5900/Makefile
> @@ -1,30 +1,20 @@
> --include ../../config-host.mak
> +#
> +# MIPSR5900 linux-user tests
> +#
>
> -CROSS=mipsr5900el-unknown-linux-gnu-
> +MIPSR5900_SRC = $(SRC_PATH)/tests/tcg/mips/mipsr5900
> +MIPSR5900_ALL = $(wildcard $(MIPSR5900_SRC)/*.c)
> +MIPSR5900_TESTS = $(patsubst $(MIPSR5900_SRC)/%.c, %, $(MIPSR5900_ALL))
> +MIPSR5900_RUNS = $(patsubst %, run-%, $(MIPSR5900_TESTS))
>
> -SIM=qemu-mipsel
> -SIM_FLAGS=-cpu R5900
> +# add to the list of tests
> +TESTS += $(MIPSR5900_TESTS)
>
> -CC      = $(CROSS)gcc
> -CFLAGS  = -Wall -mabi=32 -march=r5900 -static
> +.PHONY: mipsr5900.build
> +mipsr5900.build:
> +       mkdir -p mipsr5900
>
> -TESTCASES = div1.tst
> -TESTCASES += divu1.tst
> -TESTCASES += mflohi1.tst
> -TESTCASES += mtlohi1.tst
> -TESTCASES += mult.tst
> -TESTCASES += multu.tst
> +$(MIPS32DSP_TESTS): | mipsr5900.build
> +$(MIPSR5900_TESTS): CFLAGS+=-mabi=32 -march=r5900 -msingle-float
>
> -all: $(TESTCASES)
> -
> -%.tst: %.c
> -       $(CC) $(CFLAGS) $< -o $@
> -
> -check: $(TESTCASES)
> -       @for case in $(TESTCASES); do \
> -        echo $(SIM) $(SIM_FLAGS) ./$$case;\
> -        $(SIM) $(SIM_FLAGS) ./$$case; \
> -       done
> -
> -clean:
> -       $(RM) -rf $(TESTCASES)
> +$(MIPSR5900_RUNS): QEMU_OPTS=-cpu R5900
> --
> 2.17.1
>
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP)
  2018-12-11  9:54   ` Aleksandar Markovic
@ 2018-12-11 10:16     ` Aleksandar Markovic
  2018-12-11 12:17     ` Alex Bennée
  1 sibling, 0 replies; 35+ messages in thread
From: Aleksandar Markovic @ 2018-12-11 10:16 UTC (permalink / raw)
  To: Alex Bennée
  Cc: qemu-devel, amarkovic, shorne, aurelien, edgar.iglesias,
	jcmvbkbc, Stefan Markovic, michael

On Dec 11, 2018 10:54 AM, "Aleksandar Markovic" <aleksandar.m.mail@gmail.com>
wrote:
>
>
> On Dec 10, 2018 4:29 PM, "Alex Bennée" <alex.bennee@linaro.org> wrote:
> >
> > Convert the existing tests to use our common cross build
> > infrastructure.
> >
> > [WIP: mips32r2 disabled to avoid name clash]
> > [WIP: mipsr5900 disabled due to clashing build flags]
> >
> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> > ---
> >  tests/tcg/mips/Makefile.target       |  15 ++-
> >  tests/tcg/mips/mips32-dsp/Makefile   | 166 +++++----------------------
> >  tests/tcg/mips/mips32-dspr2/Makefile |  83 +++-----------
> >  tests/tcg/mips/mipsr5900/Makefile    |  40 +++----
> >  4 files changed, 75 insertions(+), 229 deletions(-)
> >
>
> Thank you Alex for this initiative.
>
> For DSP, following MIPS CPUs in QEMU support DSP:
>
> DSP: 24KEc (MIPS32R2),  34Kf (MIPS32R2), 74Kf (MIPS32R2), mips64dspr2
(MIPS64R2),
>
> DSP R2: mips64dspr2 (MIPS64R2),
>

Correction: 74Kf supports DSP R2 too. So this is the only MIPS32R2 cpu with
DSP R2 support. While mips64dspr2 is the only MIPS64R2 cpu with DSP R2
support.

> (For simplicity, I didn't mention new nanoMIPS architecture, since your
gcc for sure don't support it yet)
>
> In brackets, those are architectures that are usually required to be
passed to gcc as its option, and that explains the switch involving
MIPS64R2 for DSP R2.
>
> Whereas while starting QEMU, CPU name should be specified in -cpu switch.
>
> mips64dspr2 is a virtual cpu (doesn't model any real cpu) made
specifically for DSP R2 testings, hence such odd name.
>
> Hopefully this clarifies some of your dilemmas.
>
> What are name clashes that you mention? Are they just related to
filenames?
>
> CHEERS,
> Aleksandar
>
> > diff --git a/tests/tcg/mips/Makefile.target
b/tests/tcg/mips/Makefile.target
> > index 086625f533..33bb25bf8d 100644
> > --- a/tests/tcg/mips/Makefile.target
> > +++ b/tests/tcg/mips/Makefile.target
> > @@ -15,8 +15,17 @@ TESTS += $(MIPS_TESTS)
> >  hello-mips: CFLAGS+=-ffreestanding
> >  hello-mips: LDFLAGS+=-nostdlib
> >
> > -# For MIPS32 and 64 we have a bunch of extra tests in sub-directories
> > -# however they are intended for system tests.
> > -
> >  run-hello-mips: hello-mips
> >         $(call skip-test, $<, "BROKEN")
> > +
> > +# For MIPS32 and mipsr5900 we have a bunch of extra tests in
sub-directories
> > +
> > +ifeq ($(TARGET_NAME),mipsel)
> > +-include $(MIPS_SRC)/mips32-dsp/Makefile
> > +
> > +# FIXME: doesn't build - names clash with mips32-dsp
> > +#-include $(MIPS_SRC)/mips32-dspr2/Makefile
> > +
> > +# FIXME: the docker compiler can't build the binaries
> > +#-include $(MIPS_SRC)/mipsr5900/Makefile
> > +endif
> > diff --git a/tests/tcg/mips/mips32-dsp/Makefile
b/tests/tcg/mips/mips32-dsp/Makefile
> > index c3a0a00944..df2dddceaa 100644
> > --- a/tests/tcg/mips/mips32-dsp/Makefile
> > +++ b/tests/tcg/mips/mips32-dsp/Makefile
> > @@ -1,136 +1,30 @@
> > --include ../../config-host.mak
> > -
> > -CROSS=mips64el-unknown-linux-gnu-
> > -
> > -SIM=qemu-mipsel
> > -SIM_FLAGS=-cpu 74Kf
> > -
> > -CC      = $(CROSS)gcc
> > -CFLAGS  = -mabi=32 -march=mips32r2 -mgp32 -mdsp -static
> > -
> > -TESTCASES = absq_s_ph.tst
> > -TESTCASES += absq_s_w.tst
> > -TESTCASES += addq_ph.tst
> > -TESTCASES += addq_s_ph.tst
> > -TESTCASES += addq_s_w.tst
> > -TESTCASES += addsc.tst
> > -TESTCASES += addu_qb.tst
> > -TESTCASES += addu_s_qb.tst
> > -TESTCASES += addwc.tst
> > -TESTCASES += bitrev.tst
> > -TESTCASES += bposge32.tst
> > -TESTCASES += cmp_eq_ph.tst
> > -TESTCASES += cmpgu_eq_qb.tst
> > -TESTCASES += cmpgu_le_qb.tst
> > -TESTCASES += cmpgu_lt_qb.tst
> > -TESTCASES += cmp_le_ph.tst
> > -TESTCASES += cmp_lt_ph.tst
> > -TESTCASES += cmpu_eq_qb.tst
> > -TESTCASES += cmpu_le_qb.tst
> > -TESTCASES += cmpu_lt_qb.tst
> > -TESTCASES += dpaq_sa_l_w.tst
> > -TESTCASES += dpaq_s_w_ph.tst
> > -TESTCASES += dpau_h_qbl.tst
> > -TESTCASES += dpau_h_qbr.tst
> > -TESTCASES += dpsq_sa_l_w.tst
> > -TESTCASES += dpsq_s_w_ph.tst
> > -TESTCASES += dpsu_h_qbl.tst
> > -TESTCASES += dpsu_h_qbr.tst
> > -TESTCASES += extp.tst
> > -TESTCASES += extpdp.tst
> > -TESTCASES += extpdpv.tst
> > -TESTCASES += extpv.tst
> > -TESTCASES += extr_rs_w.tst
> > -TESTCASES += extr_r_w.tst
> > -TESTCASES += extr_s_h.tst
> > -TESTCASES += extrv_rs_w.tst
> > -TESTCASES += extrv_r_w.tst
> > -TESTCASES += extrv_s_h.tst
> > -TESTCASES += extrv_w.tst
> > -TESTCASES += extr_w.tst
> > -TESTCASES += insv.tst
> > -TESTCASES += lbux.tst
> > -TESTCASES += lhx.tst
> > -TESTCASES += lwx.tst
> > -TESTCASES += madd.tst
> > -TESTCASES += maddu.tst
> > -TESTCASES += maq_sa_w_phl.tst
> > -TESTCASES += maq_sa_w_phr.tst
> > -TESTCASES += maq_s_w_phl.tst
> > -TESTCASES += maq_s_w_phr.tst
> > -TESTCASES += mfhi.tst
> > -TESTCASES += mflo.tst
> > -TESTCASES += modsub.tst
> > -TESTCASES += msub.tst
> > -TESTCASES += msubu.tst
> > -TESTCASES += mthi.tst
> > -TESTCASES += mthlip.tst
> > -TESTCASES += mtlo.tst
> > -TESTCASES += muleq_s_w_phl.tst
> > -TESTCASES += muleq_s_w_phr.tst
> > -TESTCASES += muleu_s_ph_qbl.tst
> > -TESTCASES += muleu_s_ph_qbr.tst
> > -TESTCASES += mulq_rs_ph.tst
> > -TESTCASES += mult.tst
> > -TESTCASES += multu.tst
> > -TESTCASES += packrl_ph.tst
> > -TESTCASES += pick_ph.tst
> > -TESTCASES += pick_qb.tst
> > -TESTCASES += precequ_ph_qbla.tst
> > -TESTCASES += precequ_ph_qbl.tst
> > -TESTCASES += precequ_ph_qbra.tst
> > -TESTCASES += precequ_ph_qbr.tst
> > -TESTCASES += preceq_w_phl.tst
> > -TESTCASES += preceq_w_phr.tst
> > -TESTCASES += preceu_ph_qbla.tst
> > -TESTCASES += preceu_ph_qbl.tst
> > -TESTCASES += preceu_ph_qbra.tst
> > -TESTCASES += preceu_ph_qbr.tst
> > -TESTCASES += precrq_ph_w.tst
> > -TESTCASES += precrq_qb_ph.tst
> > -TESTCASES += precrq_rs_ph_w.tst
> > -TESTCASES += precrqu_s_qb_ph.tst
> > -TESTCASES += raddu_w_qb.tst
> > -TESTCASES += rddsp.tst
> > -TESTCASES += repl_ph.tst
> > -TESTCASES += repl_qb.tst
> > -TESTCASES += replv_ph.tst
> > -TESTCASES += replv_qb.tst
> > -TESTCASES += shilo.tst
> > -TESTCASES += shilov.tst
> > -TESTCASES += shll_ph.tst
> > -TESTCASES += shll_qb.tst
> > -TESTCASES += shll_s_ph.tst
> > -TESTCASES += shll_s_w.tst
> > -TESTCASES += shllv_ph.tst
> > -TESTCASES += shllv_qb.tst
> > -TESTCASES += shllv_s_ph.tst
> > -TESTCASES += shllv_s_w.tst
> > -TESTCASES += shra_ph.tst
> > -TESTCASES += shra_r_ph.tst
> > -TESTCASES += shra_r_w.tst
> > -TESTCASES += shrav_ph.tst
> > -TESTCASES += shrav_r_ph.tst
> > -TESTCASES += shrav_r_w.tst
> > -TESTCASES += shrl_qb.tst
> > -TESTCASES += shrlv_qb.tst
> > -TESTCASES += subq_ph.tst
> > -TESTCASES += subq_s_ph.tst
> > -TESTCASES += subq_s_w.tst
> > -TESTCASES += subu_qb.tst
> > -TESTCASES += subu_s_qb.tst
> > -TESTCASES += wrdsp.tst
> > -
> > -all: $(TESTCASES)
> > -
> > -%.tst: %.c
> > -       $(CC) $(CFLAGS) $< -o $@
> > -
> > -check: $(TESTCASES)
> > -       @for case in $(TESTCASES); do \
> > -        echo $(SIM) $(SIM_FLAGS) ./$$case;\
> > -        $(SIM) $(SIM_FLAGS) ./$$case; \
> > -       done
> > -
> > -clean:
> > -       $(RM) -rf $(TESTCASES)
> > +#
> > +# MIPS32-DSP linux-user tests
> > +#
> > +# We don't set the VPATH for these tests as we re-use the VPATH from
> > +# ../Makefile and add explicit paths for the source to avoid name
clashes
> > +# between the various sub-dirs.
> > +#
> > +
> > +MIPS32DSP_SRC = $(SRC_PATH)/tests/tcg/mips/mips32-dsp
> > +MIPS32DSP_ALL = $(wildcard $(MIPS32DSP_SRC)/*.c)
> > +MIPS32DSP_TESTS = $(patsubst $(MIPS32DSP_SRC)/%.c, mips32-dsp/%,
$(MIPS32DSP_ALL))
> > +MIPS32DSP_RUNS = $(patsubst %, run-%, $(MIPS32DSP_TESTS))
> > +
> > +# add to the list of tests
> > +TESTS += $(MIPS32DSP_TESTS)
> > +
> > +# We need a rule to ensure we create a sub-directory to build in
> > +# It is a PHONY target to prevent confusion with MIPS32DSP_SRC
> > +.PHONY: mips32-dsp.build
> > +mips32-dsp.build:
> > +       mkdir -p mips32-dsp
> > +
> > +$(MIPS32DSP_TESTS): | mips32-dsp.build
> > +$(MIPS32DSP_TESTS): CFLAGS+=-mabi=32 -march=mips32r2 -mgp32 -mdsp
> > +
> > +$(MIPS32DSP_RUNS): QEMU_OPTS=-cpu 74Kf
> > +
> > +# FIXME: I don't know why the general rule in tests/tcg/Makefile isn't
enough
> > +run-mips32-dsp/%: mips32-dsp/%
> > +       $(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on
$(TARGET_NAME) $(QEMU_OPTS)")
> > diff --git a/tests/tcg/mips/mips32-dspr2/Makefile
b/tests/tcg/mips/mips32-dspr2/Makefile
> > index ed19581c7e..6da966abb6 100644
> > --- a/tests/tcg/mips/mips32-dspr2/Makefile
> > +++ b/tests/tcg/mips/mips32-dspr2/Makefile
> > @@ -1,71 +1,24 @@
> > --include ../../config-host.mak
> > +#
> > +# MIPS32-DSPR2 linux-user tests
> > +#
> >
> > -CROSS=mips64el-unknown-linux-gnu-
> > +MIPS32_DSPR2_SRC = $(SRC_PATH)/tests/tcg/mips/mips32-dsp
> > +MIPS32_DSPR2_ALL = $(wildcard $(MIPS32_DSPR2_SRC)/*.c)
> > +MIPS32_DSPR2_TESTS = $(patsubst $(MIPS32_DSPR2_SRC)/%.c,
mips32-dspr2/%, $(MIPS32_DSPR2_ALL))
> > +MIPS32_DSPR2_RUNS = $(patsubst %, run-%, $(MIPS32_DSPR2_TESTS))
> >
> > -SIM=qemu-mipsel
> > -SIM_FLAGS=-cpu 74Kf
> > +# add to the list of tests
> > +TESTS += $(MIPS32_DSPR2_TESTS)
> >
> > -CC      = $(CROSS)gcc
> > -CFLAGS  = -mabi=32 -march=mips32r2 -mgp32 -mdspr2 -static
> > +.PHONY: mips32-dspr2.build
> > +mips32-dspr2.build:
> > +       mkdir -p mips32-dspr2
> >
> > -TESTCASES = absq_s_qb.tst
> > -TESTCASES += addqh_ph.tst
> > -TESTCASES += addqh_r_ph.tst
> > -TESTCASES += addqh_r_w.tst
> > -TESTCASES += addqh_w.tst
> > -TESTCASES += adduh_qb.tst
> > -TESTCASES += adduh_r_qb.tst
> > -TESTCASES += addu_ph.tst
> > -TESTCASES += addu_s_ph.tst
> > -TESTCASES += append.tst
> > -TESTCASES += balign.tst
> > -TESTCASES += cmpgdu_eq_qb.tst
> > -TESTCASES += cmpgdu_le_qb.tst
> > -TESTCASES += cmpgdu_lt_qb.tst
> > -TESTCASES += dpaqx_sa_w_ph.tst
> > -TESTCASES += dpa_w_ph.tst
> > -TESTCASES += dpax_w_ph.tst
> > -TESTCASES += dpaqx_s_w_ph.tst
> > -TESTCASES += dpsqx_sa_w_ph.tst
> > -TESTCASES += dpsqx_s_w_ph.tst
> > -TESTCASES += dps_w_ph.tst
> > -TESTCASES += dpsx_w_ph.tst
> > -TESTCASES += mul_ph.tst
> > -TESTCASES += mulq_rs_w.tst
> > -TESTCASES += mulq_s_ph.tst
> > -TESTCASES += mulq_s_w.tst
> > -TESTCASES += mulsaq_s_w_ph.tst
> > -TESTCASES += mulsa_w_ph.tst
> > -TESTCASES += mul_s_ph.tst
> > -TESTCASES += precr_qb_ph.tst
> > -TESTCASES += precr_sra_ph_w.tst
> > -TESTCASES += precr_sra_r_ph_w.tst
> > -TESTCASES += prepend.tst
> > -TESTCASES += shra_qb.tst
> > -TESTCASES += shra_r_qb.tst
> > -TESTCASES += shrav_qb.tst
> > -TESTCASES += shrav_r_qb.tst
> > -TESTCASES += shrl_ph.tst
> > -TESTCASES += shrlv_ph.tst
> > -TESTCASES += subqh_ph.tst
> > -TESTCASES += subqh_r_ph.tst
> > -TESTCASES += subqh_r_w.tst
> > -TESTCASES += subqh_w.tst
> > -TESTCASES += subuh_qb.tst
> > -TESTCASES += subuh_r_qb.tst
> > -TESTCASES += subu_ph.tst
> > -TESTCASES += subu_s_ph.tst
> > +$(MIPS32_DSPR2_TESTS): | mips32-dspr2.build
> > +$(MIPS32_DSPR2_TESTS): CFLAGS+=-mabi=32 -march=mips32r2 -mgp32 -mdspr2
> >
> > -all: $(TESTCASES)
> > +$(MIPS32_DSPR2_RUNS): QEMU_OPTS=-cpu 74Kf
> >
> > -%.tst: %.c
> > -       $(CC) $(CFLAGS) $< -o $@
> > -
> > -check: $(TESTCASES)
> > -       @for case in $(TESTCASES); do \
> > -        echo $(SIM) $(SIM_FLAGS) ./$$case;\
> > -               $(SIM) $(SIM_FLAGS) ./$$case; \
> > -       done
> > -
> > -clean:
> > -       $(RM) -rf $(TESTCASES)
> > +# FIXME: I don't know why the general rule in tests/tcg/Makefile isn't
enough
> > +run-mips32-dspr2/%: mips32-dspr2/%
> > +       $(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on
$(TARGET_NAME) $(QEMU_OPTS)")
> > diff --git a/tests/tcg/mips/mipsr5900/Makefile
b/tests/tcg/mips/mipsr5900/Makefile
> > index a1c388bc3c..7880e76986 100644
> > --- a/tests/tcg/mips/mipsr5900/Makefile
> > +++ b/tests/tcg/mips/mipsr5900/Makefile
> > @@ -1,30 +1,20 @@
> > --include ../../config-host.mak
> > +#
> > +# MIPSR5900 linux-user tests
> > +#
> >
> > -CROSS=mipsr5900el-unknown-linux-gnu-
> > +MIPSR5900_SRC = $(SRC_PATH)/tests/tcg/mips/mipsr5900
> > +MIPSR5900_ALL = $(wildcard $(MIPSR5900_SRC)/*.c)
> > +MIPSR5900_TESTS = $(patsubst $(MIPSR5900_SRC)/%.c, %, $(MIPSR5900_ALL))
> > +MIPSR5900_RUNS = $(patsubst %, run-%, $(MIPSR5900_TESTS))
> >
> > -SIM=qemu-mipsel
> > -SIM_FLAGS=-cpu R5900
> > +# add to the list of tests
> > +TESTS += $(MIPSR5900_TESTS)
> >
> > -CC      = $(CROSS)gcc
> > -CFLAGS  = -Wall -mabi=32 -march=r5900 -static
> > +.PHONY: mipsr5900.build
> > +mipsr5900.build:
> > +       mkdir -p mipsr5900
> >
> > -TESTCASES = div1.tst
> > -TESTCASES += divu1.tst
> > -TESTCASES += mflohi1.tst
> > -TESTCASES += mtlohi1.tst
> > -TESTCASES += mult.tst
> > -TESTCASES += multu.tst
> > +$(MIPS32DSP_TESTS): | mipsr5900.build
> > +$(MIPSR5900_TESTS): CFLAGS+=-mabi=32 -march=r5900 -msingle-float
> >
> > -all: $(TESTCASES)
> > -
> > -%.tst: %.c
> > -       $(CC) $(CFLAGS) $< -o $@
> > -
> > -check: $(TESTCASES)
> > -       @for case in $(TESTCASES); do \
> > -        echo $(SIM) $(SIM_FLAGS) ./$$case;\
> > -        $(SIM) $(SIM_FLAGS) ./$$case; \
> > -       done
> > -
> > -clean:
> > -       $(RM) -rf $(TESTCASES)
> > +$(MIPSR5900_RUNS): QEMU_OPTS=-cpu R5900
> > --
> > 2.17.1
> >
> >

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 07/13] tests/tcg/xtensa: enable system tests
  2018-12-11  0:25   ` Max Filippov
@ 2018-12-11 11:58     ` Alex Bennée
  2018-12-11 12:32       ` Max Filippov
  0 siblings, 1 reply; 35+ messages in thread
From: Alex Bennée @ 2018-12-11 11:58 UTC (permalink / raw)
  To: Max Filippov
  Cc: qemu-devel, Edgar E. Iglesias, Michael Walle, Aurelien Jarno,
	amarkovic, Stafford Horne


Max Filippov <jcmvbkbc@gmail.com> writes:

> On Mon, Dec 10, 2018 at 7:28 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>  tests/tcg/xtensa/Makefile                | 93 ------------------------
>>  tests/tcg/xtensa/Makefile.softmmu-target | 43 +++++++++++
>>  2 files changed, 43 insertions(+), 93 deletions(-)
>>  delete mode 100644 tests/tcg/xtensa/Makefile
>
> That Makefile provides a few nice goals for guest and host debugging

I could certainly add a rule like:

gdb-%: %
	gdb --args $(QEMU) $(QEMU_OPTS) $<

> and a way to run tests on Tensilica ISS, it would be nice to keep it.

I can restore some xtensa specific rules:

xt-run-%: %
        xt-run --xtensa-core=DC_B_232L --exit_with_target_code $<

What are EXTFLAGS used for?

--
Alex Bennée

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP)
  2018-12-11  9:54   ` Aleksandar Markovic
  2018-12-11 10:16     ` Aleksandar Markovic
@ 2018-12-11 12:17     ` Alex Bennée
  1 sibling, 0 replies; 35+ messages in thread
From: Alex Bennée @ 2018-12-11 12:17 UTC (permalink / raw)
  To: Aleksandar Markovic
  Cc: shorne, amarkovic, qemu-devel, aurelien, edgar.iglesias,
	jcmvbkbc, michael, Stefan Markovic


Aleksandar Markovic <aleksandar.m.mail@gmail.com> writes:

> On Dec 10, 2018 4:29 PM, "Alex Bennée" <alex.bennee@linaro.org> wrote:
>>
>> Convert the existing tests to use our common cross build
>> infrastructure.
>>
>> [WIP: mips32r2 disabled to avoid name clash]
>> [WIP: mipsr5900 disabled due to clashing build flags]
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>  tests/tcg/mips/Makefile.target       |  15 ++-
>>  tests/tcg/mips/mips32-dsp/Makefile   | 166 +++++----------------------
>>  tests/tcg/mips/mips32-dspr2/Makefile |  83 +++-----------
>>  tests/tcg/mips/mipsr5900/Makefile    |  40 +++----
>>  4 files changed, 75 insertions(+), 229 deletions(-)
>>
>
> Thank you Alex for this initiative.
>
> For DSP, following MIPS CPUs in QEMU support DSP:
>
> DSP: 24KEc (MIPS32R2),  34Kf (MIPS32R2), 74Kf (MIPS32R2), mips64dspr2
> (MIPS64R2),
>
> DSP R2: mips64dspr2 (MIPS64R2),

That's why I'm confused by a mips32-dspr2 directory. Does that mean both
of those directories run on the 74Kf processor model (MIPS32R2)?

> (For simplicity, I didn't mention new nanoMIPS architecture, since your gcc
> for sure don't support it yet)
>
> In brackets, those are architectures that are usually required to be passed
> to gcc as its option, and that explains the switch involving MIPS64R2 for
> DSP R2.
>
> Whereas while starting QEMU, CPU name should be specified in -cpu switch.
>
> mips64dspr2 is a virtual cpu (doesn't model any real cpu) made specifically
> for DSP R2 testings, hence such odd name.
>
> Hopefully this clarifies some of your dilemmas.
>
> What are name clashes that you mention? Are they just related to
> filenames?

I think it is because there are a bunch of names in both mips32-dsp and
mips32-dspr2 that are the same. I thought that should be sorted by the
fact I only set the VPATH to tests/tcg/mips and added the tests
including their dir path but for some reason it wasn't working.

--
Alex Bennée

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 07/13] tests/tcg/xtensa: enable system tests
  2018-12-11 11:58     ` Alex Bennée
@ 2018-12-11 12:32       ` Max Filippov
  0 siblings, 0 replies; 35+ messages in thread
From: Max Filippov @ 2018-12-11 12:32 UTC (permalink / raw)
  To: Alex Bennée
  Cc: qemu-devel, Edgar E. Iglesias, Michael Walle, Aurelien Jarno,
	amarkovic, Stafford Horne

On Tue, Dec 11, 2018 at 3:58 AM Alex Bennée <alex.bennee@linaro.org> wrote:
> I could certainly add a rule like:
>
> gdb-%: %
>         gdb --args $(QEMU) $(QEMU_OPTS) $<

Thanks (:

> > and a way to run tests on Tensilica ISS, it would be nice to keep it.
>
> I can restore some xtensa specific rules:
>
> xt-run-%: %
>         xt-run --xtensa-core=DC_B_232L --exit_with_target_code $<

The idea in the original makefile was that 'make check XT='
runs the same suite on the ISS that 'make check' runs on QEMU.

> What are EXTFLAGS used for?

To pass additional flags to the current emulator.
Usually -d something for QEMU.

Also now that I'm looking at the following, it seems to me that CC
would be more appropriate there than HOST_CC:

> +linker.ld: linker.ld.S
> +       $(HOST_CC) $(XTENSA_INC) -E -P $< -o $@

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 01/13] tests/tcg: add softmmu awareness to Makefile
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 01/13] tests/tcg: add softmmu awareness to Makefile Alex Bennée
@ 2018-12-11 13:38   ` Richard Henderson
  0 siblings, 0 replies; 35+ messages in thread
From: Richard Henderson @ 2018-12-11 13:38 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	jcmvbkbc, michael, amarkovic, edgar.iglesias, shorne, aurelien

On 12/10/18 9:28 AM, Alex Bennée wrote:
> +# For softmmu targets we inculde a different Makefile fragement as the

include.

Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 02/13] tests: enable tcg tests for softmmu
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 02/13] tests: enable tcg tests for softmmu Alex Bennée
@ 2018-12-11 13:39   ` Richard Henderson
  0 siblings, 0 replies; 35+ messages in thread
From: Richard Henderson @ 2018-12-11 13:39 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: jcmvbkbc, michael, amarkovic, edgar.iglesias, shorne, aurelien

On 12/10/18 9:28 AM, Alex Bennée wrote:
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  Makefile.target        | 2 --
>  tests/Makefile.include | 7 +++----
>  2 files changed, 3 insertions(+), 6 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 03/13] tests/tcg: add QEMU_OPT option for test runner
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 03/13] tests/tcg: add QEMU_OPT option for test runner Alex Bennée
@ 2018-12-11 13:39   ` Richard Henderson
  0 siblings, 0 replies; 35+ messages in thread
From: Richard Henderson @ 2018-12-11 13:39 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	jcmvbkbc, michael, amarkovic, edgar.iglesias, shorne, aurelien

On 12/10/18 9:28 AM, Alex Bennée wrote:
> This will allow tests to modify the QEMU invocation with for example
> different -cpu stazas without having to define a whole new set of

"stanzas"

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP) Alex Bennée
  2018-12-11  9:54   ` Aleksandar Markovic
@ 2018-12-11 13:45   ` Richard Henderson
  2018-12-19 14:39   ` Aleksandar Markovic
  2 siblings, 0 replies; 35+ messages in thread
From: Richard Henderson @ 2018-12-11 13:45 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: Stefan Markovic, jcmvbkbc, michael, amarkovic, edgar.iglesias,
	shorne, aurelien

On 12/10/18 9:28 AM, Alex Bennée wrote:
> +# FIXME: I don't know why the general rule in tests/tcg/Makefile isn't enough
> +run-mips32-dspr2/%: mips32-dspr2/%
> +	$(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on $(TARGET_NAME) $(QEMU_OPTS)")

Perhaps it's the "/"?  Otherwise I agree it doesn't make sense.


r~

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 09/13] tests/tcg: split cris tests into system and user mode
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 09/13] tests/tcg: split cris tests into system and user mode Alex Bennée
@ 2018-12-11 17:47   ` Alex Bennée
  0 siblings, 0 replies; 35+ messages in thread
From: Alex Bennée @ 2018-12-11 17:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: edgar.iglesias, michael, aurelien, amarkovic, shorne, jcmvbkbc


Alex Bennée <alex.bennee@linaro.org> writes:

> This will help with the make system as we build a different set of
> tests for each qemu binary.

Hmm actually they are all userspace tests. Perhaps the split should be
bare (as in not needing libc) and libc based tests? We can only build
the bare tests at the moment as the only packaged cris compilers I could
find where system compilers only for building kernels or -nostdinc stuff
that doesn't need a libc.

If there is a canonical location for a cris toolchain with libc we can
create a docker image for that instead. Edgar?


--
Alex Bennée

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP) Alex Bennée
  2018-12-11  9:54   ` Aleksandar Markovic
  2018-12-11 13:45   ` Richard Henderson
@ 2018-12-19 14:39   ` Aleksandar Markovic
  2018-12-19 16:03     ` Alex Bennée
  2 siblings, 1 reply; 35+ messages in thread
From: Aleksandar Markovic @ 2018-12-19 14:39 UTC (permalink / raw)
  To: Alex Bennée
  Cc: shorne, amarkovic, qemu-devel, aurelien, edgar.iglesias,
	jcmvbkbc, michael, Stefan Markovic

On Dec 10, 2018 4:29 PM, "Alex Bennée" <alex.bennee@linaro.org> wrote:
>
> Convert the existing tests to use our common cross build
> infrastructure.
>
> [WIP: mips32r2 disabled to avoid name clash]
> [WIP: mipsr5900 disabled due to clashing build flags]
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/tcg/mips/Makefile.target       |  15 ++-
>  tests/tcg/mips/mips32-dsp/Makefile   | 166 +++++----------------------
>  tests/tcg/mips/mips32-dspr2/Makefile |  83 +++-----------
>  tests/tcg/mips/mipsr5900/Makefile    |  40 +++----
>  4 files changed, 75 insertions(+), 229 deletions(-)
>

Alex,

How about reorganizing directories in tests/tcg/mips altogether, and make
it less confusing, and easier for future developers to approach an work on?

Let's say like this:

tests/tcg/mips
    user
        isa
            r5900
        ase
            dsp
            dsp_r2
    system
        isa   《for now empty》
        ase
            dsp
            dsp_r2

Thanks,
Aleksandar

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP)
  2018-12-19 14:39   ` Aleksandar Markovic
@ 2018-12-19 16:03     ` Alex Bennée
  2018-12-27 11:22       ` Aleksandar Markovic
  0 siblings, 1 reply; 35+ messages in thread
From: Alex Bennée @ 2018-12-19 16:03 UTC (permalink / raw)
  To: Aleksandar Markovic
  Cc: shorne, amarkovic, qemu-devel, aurelien, edgar.iglesias,
	jcmvbkbc, michael, Stefan Markovic


Aleksandar Markovic <aleksandar.m.mail@gmail.com> writes:

> On Dec 10, 2018 4:29 PM, "Alex Bennée" <alex.bennee@linaro.org> wrote:
>>
>> Convert the existing tests to use our common cross build
>> infrastructure.
>>
>> [WIP: mips32r2 disabled to avoid name clash]
>> [WIP: mipsr5900 disabled due to clashing build flags]
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>  tests/tcg/mips/Makefile.target       |  15 ++-
>>  tests/tcg/mips/mips32-dsp/Makefile   | 166 +++++----------------------
>>  tests/tcg/mips/mips32-dspr2/Makefile |  83 +++-----------
>>  tests/tcg/mips/mipsr5900/Makefile    |  40 +++----
>>  4 files changed, 75 insertions(+), 229 deletions(-)
>>
>
> Alex,
>
> How about reorganizing directories in tests/tcg/mips altogether, and make
> it less confusing, and easier for future developers to approach an work on?
>
> Let's say like this:
>
> tests/tcg/mips
>     user
>         isa
>             r5900
>         ase
>             dsp
>             dsp_r2
>     system
>         isa   《for now empty》
>         ase
>             dsp
>             dsp_r2

Yeah sounds like a plan. I'm going to do the same with cris (bare and libc).

>
> Thanks,
> Aleksandar


--
Alex Bennée

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP)
  2018-12-19 16:03     ` Alex Bennée
@ 2018-12-27 11:22       ` Aleksandar Markovic
  2018-12-28 10:28         ` Alex Bennée
  0 siblings, 1 reply; 35+ messages in thread
From: Aleksandar Markovic @ 2018-12-27 11:22 UTC (permalink / raw)
  To: Alex Bennée
  Cc: shorne, amarkovic, qemu-devel, aurelien, edgar.iglesias,
	jcmvbkbc, michael, Stefan Markovic

HI, Alex, just a heads up that I plan to submit directory and file
reorganization of tests/tcg/mips mini patch series today or tomorrow.
Aleksandar

On Wednesday, December 19, 2018, Alex Bennée <alex.bennee@linaro.org> wrote:

>
> Aleksandar Markovic <aleksandar.m.mail@gmail.com> writes:
>
> > On Dec 10, 2018 4:29 PM, "Alex Bennée" <alex.bennee@linaro.org> wrote:
> >>
> >> Convert the existing tests to use our common cross build
> >> infrastructure.
> >>
> >> [WIP: mips32r2 disabled to avoid name clash]
> >> [WIP: mipsr5900 disabled due to clashing build flags]
> >>
> >> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> >> ---
> >>  tests/tcg/mips/Makefile.target       |  15 ++-
> >>  tests/tcg/mips/mips32-dsp/Makefile   | 166 +++++----------------------
> >>  tests/tcg/mips/mips32-dspr2/Makefile |  83 +++-----------
> >>  tests/tcg/mips/mipsr5900/Makefile    |  40 +++----
> >>  4 files changed, 75 insertions(+), 229 deletions(-)
> >>
> >
> > Alex,
> >
> > How about reorganizing directories in tests/tcg/mips altogether, and make
> > it less confusing, and easier for future developers to approach an work
> on?
> >
> > Let's say like this:
> >
> > tests/tcg/mips
> >     user
> >         isa
> >             r5900
> >         ase
> >             dsp
> >             dsp_r2
> >     system
> >         isa   《for now empty》
> >         ase
> >             dsp
> >             dsp_r2
>
> Yeah sounds like a plan. I'm going to do the same with cris (bare and
> libc).
>
> >
> > Thanks,
> > Aleksandar
>
>
> --
> Alex Bennée
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 05/13] tests/tcg/mips: enable mips64 system tests (WIP)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 05/13] tests/tcg/mips: enable mips64 system tests (WIP) Alex Bennée
@ 2018-12-27 18:40   ` Aleksandar Markovic
  2018-12-27 18:42     ` Aleksandar Markovic
  0 siblings, 1 reply; 35+ messages in thread
From: Aleksandar Markovic @ 2018-12-27 18:40 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: edgar.iglesias, michael, aurelien, shorne, jcmvbkbc, Stefan Markovic

> > @@ -1663,12 +1663,21 @@ enum {
> >    *          │                               20..18
> >    *          ├─ 100111 ─ OPC_MXU__POOL16 ─┬─ 000 ─ OPC_MXU_D32SARW
> >    *          │                            ├─ 001 ─ OPC_MXU_S32ALN
> > - *          ├─ 101000 ─ OPC_MXU_LXB      ├─ 010 ─ OPC_MXU_S32ALNI
> > - *          ├─ 101001 ─ <not assigned>   ├─ 011 ─ OPC_MXU_S32NOR
> > - *          ├─ 101010 ─ OPC_MXU_S16LDD   ├─ 100 ─ OPC_MXU_S32AND
> > - *          ├─ 101011 ─ OPC_MXU_S16STD   ├─ 101 ─ OPC_MXU_S32OR
> > - *          ├─ 101100 ─ OPC_MXU_S16LDI   ├─ 110 ─ OPC_MXU_S32XOR
> > - *          ├─ 101101 ─ OPC_MXU_S16SDI   └─ 111 ─ OPC_MXU_S32LUI
> > + *          │                            ├─ 010 ─ OPC_MXU_S32ALNI
> > + *          │                            ├─ 011 ─ OPC_MXU_S32NOR
> > + *          │                            ├─ 100 ─ OPC_MXU_S32AND
> > + *          │                            ├─ 101 ─ OPC_MXU_S32OR
> > + *          │                            ├─ 110 ─ OPC_MXU_S32XOR
> > + *          │                            └─ 111 ─ OPC_MXU_S32LUI
> The opcodes for pool 16 do not look correct. I think the minor bits should look like the following.
> 
> ┬─ 000 ─ OPC_MXU_D32SARW
> ├─ 001 ─ OPC_MXU_S32ALN
> ├─ 010 ─ OPC_MXU_S32ALNI
> ├─ 011 ─ OPC_MXU_S32LUI
> ├─ 100 ─ OPC_MXU_S32NOR
> ├─ 101 ─ OPC_MXU_S32AND
> ├─ 110 ─ OPC_MXU_S32OR
> └─ 111 ─ OPC_MXU_S32XOR
> 

Hi, Craig!

My primary source for opcodes was the latest Ingenic documentation, from
Ingenic's site: (dated June 2017)

ftp://ftp.ingenic.com/SOC/M200/X1000_M200_XBurst_ISA_MXU_PM.pdf

and on page 109 there is a table in the middle of the page that contains
codes that are in agreement with what is currently in QEMU.

However, I searched more, and in a repository that seems to be derived from
Android NDK r9d binutils tree, in file

https://github.com/apportable/binutils/blob/master/opcodes/mxu-opc.c

opcodes are as you said.

I guess the definitive answer would be to involve tests on hardware, no?

Thanks for bringing this up!

Aleksandar


> > + *          │
> > + *          │                               7..5
> > + *          ├─ 101000 ─ OPC_MXU__POOL17 ─┬─ 000 ─ OPC_MXU_LXB
> > + *          │                            ├─ 001 ─ OPC_MXU_LXH
> > + *          ├─ 101001 ─ <not assigned>   ├─ 011 ─ OPC_MXU_LXW
> > + *          ├─ 101010 ─ OPC_MXU_S16LDD   ├─ 100 ─ OPC_MXU_LXBU
> > + *          ├─ 101011 ─ OPC_MXU_S16STD   └─ 101 ─ OPC_MXU_LXHU
> > + *          ├─ 101100 ─ OPC_MXU_S16LDI
> > + *          ├─ 101101 ─ OPC_MXU_S16SDI
> >    *          ├─ 101110 ─ OPC_MXU_S32M2I
> >    *          ├─ 101111 ─ OPC_MXU_S32I2M
> >    *          ├─ 110000 ─ OPC_MXU_D32SLL

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 05/13] tests/tcg/mips: enable mips64 system tests (WIP)
  2018-12-27 18:40   ` Aleksandar Markovic
@ 2018-12-27 18:42     ` Aleksandar Markovic
  0 siblings, 0 replies; 35+ messages in thread
From: Aleksandar Markovic @ 2018-12-27 18:42 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: edgar.iglesias, michael, aurelien, shorne, jcmvbkbc, Stefan Markovic

Sorry, my last message involving this thread was sent in error. It was meant to be a a response to another, unrelated, message. Please discard it.

Aleksandar

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP)
  2018-12-27 11:22       ` Aleksandar Markovic
@ 2018-12-28 10:28         ` Alex Bennée
  2018-12-28 17:32           ` Aleksandar Markovic
  0 siblings, 1 reply; 35+ messages in thread
From: Alex Bennée @ 2018-12-28 10:28 UTC (permalink / raw)
  To: Aleksandar Markovic
  Cc: shorne, amarkovic, qemu-devel, aurelien, edgar.iglesias,
	jcmvbkbc, michael, Stefan Markovic


Aleksandar Markovic <aleksandar.m.mail@gmail.com> writes:

> HI, Alex, just a heads up that I plan to submit directory and file
> reorganization of tests/tcg/mips mini patch series today or tomorrow.
> Aleksandar

My current tree state is:

  https://github.com/stsquad/qemu/tree/testing/enable-system-tcg-tests-v2

But I'm still having trouble generating nicely linked no-pic code. But
I'll happily re-base after you've re-organised the tree. Will you be
testing the build as is with the current Makefiles?

>
> On Wednesday, December 19, 2018, Alex Bennée <alex.bennee@linaro.org> wrote:
>
>>
>> Aleksandar Markovic <aleksandar.m.mail@gmail.com> writes:
>>
>> > On Dec 10, 2018 4:29 PM, "Alex Bennée" <alex.bennee@linaro.org> wrote:
>> >>
>> >> Convert the existing tests to use our common cross build
>> >> infrastructure.
>> >>
>> >> [WIP: mips32r2 disabled to avoid name clash]
>> >> [WIP: mipsr5900 disabled due to clashing build flags]
>> >>
>> >> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> >> ---
>> >>  tests/tcg/mips/Makefile.target       |  15 ++-
>> >>  tests/tcg/mips/mips32-dsp/Makefile   | 166 +++++----------------------
>> >>  tests/tcg/mips/mips32-dspr2/Makefile |  83 +++-----------
>> >>  tests/tcg/mips/mipsr5900/Makefile    |  40 +++----
>> >>  4 files changed, 75 insertions(+), 229 deletions(-)
>> >>
>> >
>> > Alex,
>> >
>> > How about reorganizing directories in tests/tcg/mips altogether, and make
>> > it less confusing, and easier for future developers to approach an work
>> on?
>> >
>> > Let's say like this:
>> >
>> > tests/tcg/mips
>> >     user
>> >         isa
>> >             r5900
>> >         ase
>> >             dsp
>> >             dsp_r2
>> >     system
>> >         isa   《for now empty》
>> >         ase
>> >             dsp
>> >             dsp_r2
>>
>> Yeah sounds like a plan. I'm going to do the same with cris (bare and
>> libc).
>>
>> >
>> > Thanks,
>> > Aleksandar
>>
>>
>> --
>> Alex Bennée
>>


--
Alex Bennée

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP)
  2018-12-28 10:28         ` Alex Bennée
@ 2018-12-28 17:32           ` Aleksandar Markovic
  0 siblings, 0 replies; 35+ messages in thread
From: Aleksandar Markovic @ 2018-12-28 17:32 UTC (permalink / raw)
  To: Alex Bennée, Aleksandar Markovic
  Cc: shorne, qemu-devel, aurelien, edgar.iglesias, jcmvbkbc, michael,
	Stefan Markovic

> Will you be testing the build as is with the current Makefiles?

I will, but they should be replaced with your versions - in new directories.

v1 of my reorganization series seems to be broken on the list for some reason, but I will send v2 (hopefully more complete and improved) after New Year.

Thanks!!
Happy holidays!

Aleksandar

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH  00/13] Enabling tcg/tests for xtensa, mips and cris
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
                   ` (12 preceding siblings ...)
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 13/13] tests/tcg: enable cris system tests Alex Bennée
@ 2019-01-04 13:58 ` Edgar E. Iglesias
  2019-01-04 14:03 ` Edgar E. Iglesias
  14 siblings, 0 replies; 35+ messages in thread
From: Edgar E. Iglesias @ 2019-01-04 13:58 UTC (permalink / raw)
  To: Alex Bennée
  Cc: qemu-devel, michael, aurelien, amarkovic, shorne, jcmvbkbc

On Mon, Dec 10, 2018 at 03:28:16PM +0000, Alex Bennée wrote:
> Hi,
> 
> This is very much a work in progress but I'm posting it in the hope of
> getting some feedback from the architecture maintainers.
> 
> When I originally enabled tcg tests I only enabled linux-user tests for
> architectures that had easily available compilers. I also skipped over a
> bunch of the tests that were already in the tree but didn't build.
> 
> Enabling the building of system tests is actually fairly simple. The
> patch introduces the concept of Makefile.softmmu-target so we can keep
> the build rules nicely separated from that of linux-user targets.
> 
> I've enabled system builds for xtensa, cris and mips64. However they all
> have some niggles that need sorting out.
> 
> Xtensa
> 
> The tests all build and run manually but for some reason running under
> make break. I think this is something to do with the monitor being
> involved in the semihosting output.
> 
> MIPS
> 
> The existing mips tests are split between 32 bit which are linux-user
> tests. I've enabled a chunk of these but adding the mips32r2 aran into
> problems with make which I haven't yet figured out despite having
> targets in different build directories. The mipsr5900 build is limited
> by the fact that upstream GCC doesn't seem to support the build type.
> 
> The 64 bit mips tests are system tests and are built for the
> mips64el-softmmu target. Getting them to build has been more problematic
> possibly because there is a bunch of target flags I don't understand.
> For example why does FLAGS define have -march=mips64r2 for the mip64-dsp
> target?
> 
> I could do with some guidance from the MIPS guys here about the right
> toolchain and build options.
> 
> CRIS
> 
> Again I've gotten these building. I had to skip a bunch of tests because
> it seems the upstream cris compiler:
> 
> cris-linux-gnu-gcc (GCC) 7.2.1 20170915 (Red Hat Cross 7.2.1-1)
> 
> Can't build all the cris tests because it doesn't support all the
> versions of the architecture. Secondly I'm not sure how these tests are
> meant to be invoked within QEMU. They originally come from the binutils
> simulator (SIM) and are split into ctst (linux-user) and tst (simulator)
> tests. As we can only build system tests with the cris cross compiler
> I've stuck to those but I'm unsure how they are meant to be invoked.

Hi Alex,

The Makefile has run rules for running these, make check.
make check-g is for comparing with GDB's cris simulator.

Some tests target cris-v10 (actually v17 which is an extended v10) and others target cris-v32.
v10 and v32 are quite different. In the old days, we used to have a crisv32- toolchain
that would default to building cris-v32 binaries but could also build cris-v10 binaries
when -mcpu=v10 was used.

It may be the case that your toolchain defaults to v10 but can build v32 binaries
with -mcpu=v32, I don't know. In any case, it may be better to change the Makefile
to always be explicit about the -mcpu instead of assuming v32 per default.

I hope that helps a little a least!

Best regards,
Edgar






> 
> I actually started down this road to add Stefan's microbit tests to the
> build. You can see this commit:
> 
> [https://github.com/stsquad/qemu/commit/727e106204e867cc42dc8fa44f84b013c7f7fcb7]
> 
> For how easy it was to add. As this is an RFC I've included all the
> aspirational work in progress for our more esoteric architectures so
> maintainers can have a play. The next iteration of the series will only
> include working patches ;-)
> 
> Alex Bennée (12):
>   tests/tcg: add softmmu awareness to Makefile
>   tests: enable tcg tests for softmmu
>   tests/tcg: add QEMU_OPT option for test runner
>   tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user
>     (WIP)
>   tests/tcg/mips: enable mips64 system tests (WIP)
>   tests/tcg/xtensa: enable system tests
>   tests/docker: add fedora-cris-cross compilers
>   tests/tcg: split cris tests into system and user mode
>   tests/tcg/cris: cleanup sys.c
>   tests/tcg/cris: comment out the ccs test
>   tests/tcg/cris: align mul operations
>   tests/tcg: enable cris system tests
> 
> Philippe Mathieu-Daudé (1):
>   tests/docker: add debian-xtensa-cross image
> 
>  Makefile.target                               |   2 -
>  tests/Makefile.include                        |   7 +-
>  tests/docker/Makefile.include                 |   1 +
>  .../dockerfiles/debian-xtensa-cross.docker    |  31 ++
>  .../dockerfiles/fedora-cris-cross.docker      |   8 +
>  tests/tcg/Makefile                            |  21 +-
>  tests/tcg/Makefile.include                    |   2 +-
>  tests/tcg/cris/Makefile                       | 168 ---------
>  tests/tcg/cris/Makefile.include               |   6 +
>  tests/tcg/cris/Makefile.softmmu-target        |  50 +++
>  tests/tcg/cris/sys.c                          |  59 ---
>  tests/tcg/cris/{ => system}/check_addcv17.s   |   0
>  tests/tcg/cris/{ => system}/check_addi.s      |   0
>  tests/tcg/cris/{ => system}/check_addiv32.s   |   0
>  tests/tcg/cris/{ => system}/check_addm.s      |   0
>  tests/tcg/cris/{ => system}/check_addq.s      |   0
>  tests/tcg/cris/{ => system}/check_addr.s      |   0
>  tests/tcg/cris/{ => system}/check_addxc.s     |   0
>  tests/tcg/cris/{ => system}/check_addxm.s     |   0
>  tests/tcg/cris/{ => system}/check_addxr.s     |   0
>  tests/tcg/cris/{ => system}/check_andc.s      |   0
>  tests/tcg/cris/{ => system}/check_andm.s      |   0
>  tests/tcg/cris/{ => system}/check_andq.s      |   0
>  tests/tcg/cris/{ => system}/check_andr.s      |   0
>  tests/tcg/cris/{ => system}/check_asr.s       |   0
>  tests/tcg/cris/{ => system}/check_ba.s        |   0
>  tests/tcg/cris/{ => system}/check_bas.s       |   0
>  tests/tcg/cris/{ => system}/check_bcc.s       |   0
>  tests/tcg/cris/{ => system}/check_boundc.s    |   0
>  tests/tcg/cris/{ => system}/check_boundr.s    |   0
>  tests/tcg/cris/{ => system}/check_btst.s      |  14 +-
>  tests/tcg/cris/{ => system}/check_clearfv32.s |   0
>  tests/tcg/cris/{ => system}/check_clrjmp1.s   |   0
>  tests/tcg/cris/{ => system}/check_cmp-2.s     |   0
>  tests/tcg/cris/{ => system}/check_cmpc.s      |   0
>  tests/tcg/cris/{ => system}/check_cmpm.s      |   0
>  tests/tcg/cris/{ => system}/check_cmpq.s      |   0
>  tests/tcg/cris/{ => system}/check_cmpr.s      |   0
>  tests/tcg/cris/{ => system}/check_cmpxc.s     |   0
>  tests/tcg/cris/{ => system}/check_cmpxm.s     |   0
>  tests/tcg/cris/{ => system}/check_dstep.s     |   0
>  tests/tcg/cris/{ => system}/check_jsr.s       |   0
>  tests/tcg/cris/{ => system}/check_lapc.s      |   0
>  tests/tcg/cris/{ => system}/check_lsl.s       |   0
>  tests/tcg/cris/{ => system}/check_lsr.s       |   0
>  tests/tcg/cris/{ => system}/check_mcp.s       |   0
>  tests/tcg/cris/{ => system}/check_movdelsr1.s |   0
>  tests/tcg/cris/{ => system}/check_movecr.s    |   0
>  tests/tcg/cris/{ => system}/check_movei.s     |   0
>  tests/tcg/cris/{ => system}/check_movemr.s    |   0
>  tests/tcg/cris/{ => system}/check_movemrv32.s |   0
>  tests/tcg/cris/{ => system}/check_mover.s     |   0
>  tests/tcg/cris/{ => system}/check_moverm.s    |   0
>  tests/tcg/cris/{ => system}/check_movmp.s     |   0
>  tests/tcg/cris/{ => system}/check_movpmv32.s  |   0
>  tests/tcg/cris/{ => system}/check_movpr.s     |   0
>  tests/tcg/cris/{ => system}/check_movprv32.s  |   0
>  tests/tcg/cris/{ => system}/check_movscr.s    |   0
>  tests/tcg/cris/{ => system}/check_movsm.s     |   0
>  tests/tcg/cris/{ => system}/check_movsr.s     |   0
>  tests/tcg/cris/{ => system}/check_movucr.s    |   0
>  tests/tcg/cris/{ => system}/check_movum.s     |   0
>  tests/tcg/cris/{ => system}/check_movur.s     |   0
>  tests/tcg/cris/{ => system}/check_mulv32.s    |   0
>  tests/tcg/cris/{ => system}/check_mulx.s      |  11 +
>  tests/tcg/cris/{ => system}/check_neg.s       |   0
>  tests/tcg/cris/{ => system}/check_not.s       |   0
>  tests/tcg/cris/{ => system}/check_orc.s       |   0
>  tests/tcg/cris/{ => system}/check_orm.s       |   0
>  tests/tcg/cris/{ => system}/check_orq.s       |   0
>  tests/tcg/cris/{ => system}/check_orr.s       |   0
>  tests/tcg/cris/{ => system}/check_ret.s       |   0
>  tests/tcg/cris/{ => system}/check_scc.s       |   0
>  tests/tcg/cris/{ => system}/check_subc.s      |   0
>  tests/tcg/cris/{ => system}/check_subm.s      |   0
>  tests/tcg/cris/{ => system}/check_subq.s      |   0
>  tests/tcg/cris/{ => system}/check_subr.s      |   0
>  tests/tcg/cris/{ => system}/check_xarith.s    |   0
>  tests/tcg/cris/{ => system}/crt.s             |   0
>  tests/tcg/cris/system/sys.c                   |  59 +++
>  tests/tcg/cris/{ => system}/testutils.inc     |   0
>  tests/tcg/cris/{ => user}/check_abs.c         |   0
>  tests/tcg/cris/{ => user}/check_addc.c        |   0
>  tests/tcg/cris/{ => user}/check_addcm.c       |   0
>  tests/tcg/cris/{ => user}/check_addo.c        |   0
>  tests/tcg/cris/{ => user}/check_addoq.c       |   0
>  tests/tcg/cris/{ => user}/check_bound.c       |   0
>  tests/tcg/cris/{ => user}/check_ftag.c        |   0
>  .../{ => user}/check_glibc_kernelversion.c    |   0
>  tests/tcg/cris/{ => user}/check_hello.c       |   0
>  tests/tcg/cris/{ => user}/check_int64.c       |   0
>  tests/tcg/cris/{ => user}/check_lz.c          |   0
>  tests/tcg/cris/{ => user}/check_mapbrk.c      |   0
>  tests/tcg/cris/{ => user}/check_mmap1.c       |   0
>  tests/tcg/cris/{ => user}/check_mmap2.c       |   0
>  tests/tcg/cris/{ => user}/check_mmap3.c       |   0
>  tests/tcg/cris/{ => user}/check_moveq.c       |   0
>  tests/tcg/cris/{ => user}/check_openpf1.c     |   0
>  tests/tcg/cris/{ => user}/check_openpf2.c     |   0
>  tests/tcg/cris/{ => user}/check_openpf3.c     |   0
>  tests/tcg/cris/{ => user}/check_openpf5.c     |   0
>  tests/tcg/cris/{ => user}/check_settls1.c     |   0
>  tests/tcg/cris/{ => user}/check_sigalrm.c     |   0
>  tests/tcg/cris/{ => user}/check_stat1.c       |   0
>  tests/tcg/cris/{ => user}/check_stat2.c       |   0
>  tests/tcg/cris/{ => user}/check_stat3.c       |   0
>  tests/tcg/cris/{ => user}/check_stat4.c       |   0
>  tests/tcg/cris/{ => user}/check_swap.c        |   0
>  tests/tcg/cris/{ => user}/check_time2.c       |   0
>  tests/tcg/cris/{ => user}/crisutils.h         |   0
>  tests/tcg/cris/{ => user}/sys.h               |   0
>  tests/tcg/mips/Makefile.softmmu-target        |  20 ++
>  tests/tcg/mips/Makefile.target                |  15 +-
>  tests/tcg/mips/mips32-dsp/Makefile            | 166 ++-------
>  tests/tcg/mips/mips32-dspr2/Makefile          |  83 +----
>  tests/tcg/mips/mips64-dsp/Makefile            | 336 +++---------------
>  tests/tcg/mips/mipsr5900/Makefile             |  40 +--
>  tests/tcg/xtensa/Makefile                     |  93 -----
>  tests/tcg/xtensa/Makefile.include             |   7 +
>  tests/tcg/xtensa/Makefile.softmmu-target      |  43 +++
>  120 files changed, 385 insertions(+), 857 deletions(-)
>  create mode 100644 tests/docker/dockerfiles/debian-xtensa-cross.docker
>  create mode 100644 tests/docker/dockerfiles/fedora-cris-cross.docker
>  delete mode 100644 tests/tcg/cris/Makefile
>  create mode 100644 tests/tcg/cris/Makefile.include
>  create mode 100644 tests/tcg/cris/Makefile.softmmu-target
>  delete mode 100644 tests/tcg/cris/sys.c
>  rename tests/tcg/cris/{ => system}/check_addcv17.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addi.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addiv32.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addq.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addxc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addxm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addxr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_andc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_andm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_andq.s (100%)
>  rename tests/tcg/cris/{ => system}/check_andr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_asr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_ba.s (100%)
>  rename tests/tcg/cris/{ => system}/check_bas.s (100%)
>  rename tests/tcg/cris/{ => system}/check_bcc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_boundc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_boundr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_btst.s (89%)
>  rename tests/tcg/cris/{ => system}/check_clearfv32.s (100%)
>  rename tests/tcg/cris/{ => system}/check_clrjmp1.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmp-2.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmpc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmpm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmpq.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmpr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmpxc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmpxm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_dstep.s (100%)
>  rename tests/tcg/cris/{ => system}/check_jsr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_lapc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_lsl.s (100%)
>  rename tests/tcg/cris/{ => system}/check_lsr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_mcp.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movdelsr1.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movecr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movei.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movemr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movemrv32.s (100%)
>  rename tests/tcg/cris/{ => system}/check_mover.s (100%)
>  rename tests/tcg/cris/{ => system}/check_moverm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movmp.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movpmv32.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movpr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movprv32.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movscr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movsm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movsr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movucr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movum.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movur.s (100%)
>  rename tests/tcg/cris/{ => system}/check_mulv32.s (100%)
>  rename tests/tcg/cris/{ => system}/check_mulx.s (98%)
>  rename tests/tcg/cris/{ => system}/check_neg.s (100%)
>  rename tests/tcg/cris/{ => system}/check_not.s (100%)
>  rename tests/tcg/cris/{ => system}/check_orc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_orm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_orq.s (100%)
>  rename tests/tcg/cris/{ => system}/check_orr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_ret.s (100%)
>  rename tests/tcg/cris/{ => system}/check_scc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_subc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_subm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_subq.s (100%)
>  rename tests/tcg/cris/{ => system}/check_subr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_xarith.s (100%)
>  rename tests/tcg/cris/{ => system}/crt.s (100%)
>  create mode 100644 tests/tcg/cris/system/sys.c
>  rename tests/tcg/cris/{ => system}/testutils.inc (100%)
>  rename tests/tcg/cris/{ => user}/check_abs.c (100%)
>  rename tests/tcg/cris/{ => user}/check_addc.c (100%)
>  rename tests/tcg/cris/{ => user}/check_addcm.c (100%)
>  rename tests/tcg/cris/{ => user}/check_addo.c (100%)
>  rename tests/tcg/cris/{ => user}/check_addoq.c (100%)
>  rename tests/tcg/cris/{ => user}/check_bound.c (100%)
>  rename tests/tcg/cris/{ => user}/check_ftag.c (100%)
>  rename tests/tcg/cris/{ => user}/check_glibc_kernelversion.c (100%)
>  rename tests/tcg/cris/{ => user}/check_hello.c (100%)
>  rename tests/tcg/cris/{ => user}/check_int64.c (100%)
>  rename tests/tcg/cris/{ => user}/check_lz.c (100%)
>  rename tests/tcg/cris/{ => user}/check_mapbrk.c (100%)
>  rename tests/tcg/cris/{ => user}/check_mmap1.c (100%)
>  rename tests/tcg/cris/{ => user}/check_mmap2.c (100%)
>  rename tests/tcg/cris/{ => user}/check_mmap3.c (100%)
>  rename tests/tcg/cris/{ => user}/check_moveq.c (100%)
>  rename tests/tcg/cris/{ => user}/check_openpf1.c (100%)
>  rename tests/tcg/cris/{ => user}/check_openpf2.c (100%)
>  rename tests/tcg/cris/{ => user}/check_openpf3.c (100%)
>  rename tests/tcg/cris/{ => user}/check_openpf5.c (100%)
>  rename tests/tcg/cris/{ => user}/check_settls1.c (100%)
>  rename tests/tcg/cris/{ => user}/check_sigalrm.c (100%)
>  rename tests/tcg/cris/{ => user}/check_stat1.c (100%)
>  rename tests/tcg/cris/{ => user}/check_stat2.c (100%)
>  rename tests/tcg/cris/{ => user}/check_stat3.c (100%)
>  rename tests/tcg/cris/{ => user}/check_stat4.c (100%)
>  rename tests/tcg/cris/{ => user}/check_swap.c (100%)
>  rename tests/tcg/cris/{ => user}/check_time2.c (100%)
>  rename tests/tcg/cris/{ => user}/crisutils.h (100%)
>  rename tests/tcg/cris/{ => user}/sys.h (100%)
>  create mode 100644 tests/tcg/mips/Makefile.softmmu-target
>  delete mode 100644 tests/tcg/xtensa/Makefile
>  create mode 100644 tests/tcg/xtensa/Makefile.include
>  create mode 100644 tests/tcg/xtensa/Makefile.softmmu-target
> 
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH 11/13] tests/tcg/cris: comment out the ccs test
  2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 11/13] tests/tcg/cris: comment out the ccs test Alex Bennée
@ 2019-01-04 14:00   ` Edgar E. Iglesias
  0 siblings, 0 replies; 35+ messages in thread
From: Edgar E. Iglesias @ 2019-01-04 14:00 UTC (permalink / raw)
  To: Alex Bennée
  Cc: qemu-devel, michael, aurelien, amarkovic, shorne, jcmvbkbc

On Mon, Dec 10, 2018 at 03:28:27PM +0000, Alex Bennée wrote:
> Evidently upstream gcc doesn't like this opcode.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>


Hi Alex, this is probably an example of missmatching CRISv10 vs CRISv32 versions in toolchain usage.

Cheers,
Edgar


> ---
>  tests/tcg/cris/system/check_btst.s | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/tcg/cris/system/check_btst.s b/tests/tcg/cris/system/check_btst.s
> index e39fc8f4d6..485deb2006 100644
> --- a/tests/tcg/cris/system/check_btst.s
> +++ b/tests/tcg/cris/system/check_btst.s
> @@ -85,12 +85,12 @@
>   checkr3 1111
>  
>   ; check that X gets cleared and that only the NZ flags are touched.
> - move.d	0xff, $r0
> - move $r0, $ccs
> - btst r3,r3
> - move $ccs, $r0
> - and.d 0xff, $r0
> - cmp.d	0xe3, $r0
> - test_cc 0 1 0 0
> + ;; move.d	0xff, $r0
> + ;; move $r0, $ccs
> + ;; btst r3,r3
> + ;; move $ccs, $r0
> + ;; and.d 0xff, $r0
> + ;; cmp.d	0xe3, $r0
> + ;; test_cc 0 1 0 0
>  
>   quit
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [RFC PATCH  00/13] Enabling tcg/tests for xtensa, mips and cris
  2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
                   ` (13 preceding siblings ...)
  2019-01-04 13:58 ` [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Edgar E. Iglesias
@ 2019-01-04 14:03 ` Edgar E. Iglesias
  14 siblings, 0 replies; 35+ messages in thread
From: Edgar E. Iglesias @ 2019-01-04 14:03 UTC (permalink / raw)
  To: Alex Bennée
  Cc: qemu-devel, michael, aurelien, amarkovic, shorne, jcmvbkbc

On Mon, Dec 10, 2018 at 03:28:16PM +0000, Alex Bennée wrote:
> Hi,
> 
> This is very much a work in progress but I'm posting it in the hope of
> getting some feedback from the architecture maintainers.
> 
> When I originally enabled tcg tests I only enabled linux-user tests for
> architectures that had easily available compilers. I also skipped over a
> bunch of the tests that were already in the tree but didn't build.
> 
> Enabling the building of system tests is actually fairly simple. The
> patch introduces the concept of Makefile.softmmu-target so we can keep
> the build rules nicely separated from that of linux-user targets.
> 
> I've enabled system builds for xtensa, cris and mips64. However they all
> have some niggles that need sorting out.
> 
> Xtensa
> 
> The tests all build and run manually but for some reason running under
> make break. I think this is something to do with the monitor being
> involved in the semihosting output.
> 
> MIPS
> 
> The existing mips tests are split between 32 bit which are linux-user
> tests. I've enabled a chunk of these but adding the mips32r2 aran into
> problems with make which I haven't yet figured out despite having
> targets in different build directories. The mipsr5900 build is limited
> by the fact that upstream GCC doesn't seem to support the build type.
> 
> The 64 bit mips tests are system tests and are built for the
> mips64el-softmmu target. Getting them to build has been more problematic
> possibly because there is a bunch of target flags I don't understand.
> For example why does FLAGS define have -march=mips64r2 for the mip64-dsp
> target?
> 
> I could do with some guidance from the MIPS guys here about the right
> toolchain and build options.
> 
> CRIS
> 
> Again I've gotten these building. I had to skip a bunch of tests because
> it seems the upstream cris compiler:
> 
> cris-linux-gnu-gcc (GCC) 7.2.1 20170915 (Red Hat Cross 7.2.1-1)
> 
> Can't build all the cris tests because it doesn't support all the
> versions of the architecture. Secondly I'm not sure how these tests are
> meant to be invoked within QEMU. They originally come from the binutils
> simulator (SIM) and are split into ctst (linux-user) and tst (simulator)

BTW, IIRC, ctst and tst mainly differ in that ctst test cases need to be
linked against a libc while tst cases don't. They should both run on
linux-user IIRC.

The point is that doing small test-cases for certain instruction patterns
but having to run through glibc initialization before makes things hard
to debug. Small test-cases without libc are easier to trace and debug.

It's been a while since I looked at this though, so I may remember wrongly...

Cheers,
Edgar



> tests. As we can only build system tests with the cris cross compiler
> I've stuck to those but I'm unsure how they are meant to be invoked.
> 
> I actually started down this road to add Stefan's microbit tests to the
> build. You can see this commit:
> 
> [https://github.com/stsquad/qemu/commit/727e106204e867cc42dc8fa44f84b013c7f7fcb7]
> 
> For how easy it was to add. As this is an RFC I've included all the
> aspirational work in progress for our more esoteric architectures so
> maintainers can have a play. The next iteration of the series will only
> include working patches ;-)
> 
> Alex Bennée (12):
>   tests/tcg: add softmmu awareness to Makefile
>   tests: enable tcg tests for softmmu
>   tests/tcg: add QEMU_OPT option for test runner
>   tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user
>     (WIP)
>   tests/tcg/mips: enable mips64 system tests (WIP)
>   tests/tcg/xtensa: enable system tests
>   tests/docker: add fedora-cris-cross compilers
>   tests/tcg: split cris tests into system and user mode
>   tests/tcg/cris: cleanup sys.c
>   tests/tcg/cris: comment out the ccs test
>   tests/tcg/cris: align mul operations
>   tests/tcg: enable cris system tests
> 
> Philippe Mathieu-Daudé (1):
>   tests/docker: add debian-xtensa-cross image
> 
>  Makefile.target                               |   2 -
>  tests/Makefile.include                        |   7 +-
>  tests/docker/Makefile.include                 |   1 +
>  .../dockerfiles/debian-xtensa-cross.docker    |  31 ++
>  .../dockerfiles/fedora-cris-cross.docker      |   8 +
>  tests/tcg/Makefile                            |  21 +-
>  tests/tcg/Makefile.include                    |   2 +-
>  tests/tcg/cris/Makefile                       | 168 ---------
>  tests/tcg/cris/Makefile.include               |   6 +
>  tests/tcg/cris/Makefile.softmmu-target        |  50 +++
>  tests/tcg/cris/sys.c                          |  59 ---
>  tests/tcg/cris/{ => system}/check_addcv17.s   |   0
>  tests/tcg/cris/{ => system}/check_addi.s      |   0
>  tests/tcg/cris/{ => system}/check_addiv32.s   |   0
>  tests/tcg/cris/{ => system}/check_addm.s      |   0
>  tests/tcg/cris/{ => system}/check_addq.s      |   0
>  tests/tcg/cris/{ => system}/check_addr.s      |   0
>  tests/tcg/cris/{ => system}/check_addxc.s     |   0
>  tests/tcg/cris/{ => system}/check_addxm.s     |   0
>  tests/tcg/cris/{ => system}/check_addxr.s     |   0
>  tests/tcg/cris/{ => system}/check_andc.s      |   0
>  tests/tcg/cris/{ => system}/check_andm.s      |   0
>  tests/tcg/cris/{ => system}/check_andq.s      |   0
>  tests/tcg/cris/{ => system}/check_andr.s      |   0
>  tests/tcg/cris/{ => system}/check_asr.s       |   0
>  tests/tcg/cris/{ => system}/check_ba.s        |   0
>  tests/tcg/cris/{ => system}/check_bas.s       |   0
>  tests/tcg/cris/{ => system}/check_bcc.s       |   0
>  tests/tcg/cris/{ => system}/check_boundc.s    |   0
>  tests/tcg/cris/{ => system}/check_boundr.s    |   0
>  tests/tcg/cris/{ => system}/check_btst.s      |  14 +-
>  tests/tcg/cris/{ => system}/check_clearfv32.s |   0
>  tests/tcg/cris/{ => system}/check_clrjmp1.s   |   0
>  tests/tcg/cris/{ => system}/check_cmp-2.s     |   0
>  tests/tcg/cris/{ => system}/check_cmpc.s      |   0
>  tests/tcg/cris/{ => system}/check_cmpm.s      |   0
>  tests/tcg/cris/{ => system}/check_cmpq.s      |   0
>  tests/tcg/cris/{ => system}/check_cmpr.s      |   0
>  tests/tcg/cris/{ => system}/check_cmpxc.s     |   0
>  tests/tcg/cris/{ => system}/check_cmpxm.s     |   0
>  tests/tcg/cris/{ => system}/check_dstep.s     |   0
>  tests/tcg/cris/{ => system}/check_jsr.s       |   0
>  tests/tcg/cris/{ => system}/check_lapc.s      |   0
>  tests/tcg/cris/{ => system}/check_lsl.s       |   0
>  tests/tcg/cris/{ => system}/check_lsr.s       |   0
>  tests/tcg/cris/{ => system}/check_mcp.s       |   0
>  tests/tcg/cris/{ => system}/check_movdelsr1.s |   0
>  tests/tcg/cris/{ => system}/check_movecr.s    |   0
>  tests/tcg/cris/{ => system}/check_movei.s     |   0
>  tests/tcg/cris/{ => system}/check_movemr.s    |   0
>  tests/tcg/cris/{ => system}/check_movemrv32.s |   0
>  tests/tcg/cris/{ => system}/check_mover.s     |   0
>  tests/tcg/cris/{ => system}/check_moverm.s    |   0
>  tests/tcg/cris/{ => system}/check_movmp.s     |   0
>  tests/tcg/cris/{ => system}/check_movpmv32.s  |   0
>  tests/tcg/cris/{ => system}/check_movpr.s     |   0
>  tests/tcg/cris/{ => system}/check_movprv32.s  |   0
>  tests/tcg/cris/{ => system}/check_movscr.s    |   0
>  tests/tcg/cris/{ => system}/check_movsm.s     |   0
>  tests/tcg/cris/{ => system}/check_movsr.s     |   0
>  tests/tcg/cris/{ => system}/check_movucr.s    |   0
>  tests/tcg/cris/{ => system}/check_movum.s     |   0
>  tests/tcg/cris/{ => system}/check_movur.s     |   0
>  tests/tcg/cris/{ => system}/check_mulv32.s    |   0
>  tests/tcg/cris/{ => system}/check_mulx.s      |  11 +
>  tests/tcg/cris/{ => system}/check_neg.s       |   0
>  tests/tcg/cris/{ => system}/check_not.s       |   0
>  tests/tcg/cris/{ => system}/check_orc.s       |   0
>  tests/tcg/cris/{ => system}/check_orm.s       |   0
>  tests/tcg/cris/{ => system}/check_orq.s       |   0
>  tests/tcg/cris/{ => system}/check_orr.s       |   0
>  tests/tcg/cris/{ => system}/check_ret.s       |   0
>  tests/tcg/cris/{ => system}/check_scc.s       |   0
>  tests/tcg/cris/{ => system}/check_subc.s      |   0
>  tests/tcg/cris/{ => system}/check_subm.s      |   0
>  tests/tcg/cris/{ => system}/check_subq.s      |   0
>  tests/tcg/cris/{ => system}/check_subr.s      |   0
>  tests/tcg/cris/{ => system}/check_xarith.s    |   0
>  tests/tcg/cris/{ => system}/crt.s             |   0
>  tests/tcg/cris/system/sys.c                   |  59 +++
>  tests/tcg/cris/{ => system}/testutils.inc     |   0
>  tests/tcg/cris/{ => user}/check_abs.c         |   0
>  tests/tcg/cris/{ => user}/check_addc.c        |   0
>  tests/tcg/cris/{ => user}/check_addcm.c       |   0
>  tests/tcg/cris/{ => user}/check_addo.c        |   0
>  tests/tcg/cris/{ => user}/check_addoq.c       |   0
>  tests/tcg/cris/{ => user}/check_bound.c       |   0
>  tests/tcg/cris/{ => user}/check_ftag.c        |   0
>  .../{ => user}/check_glibc_kernelversion.c    |   0
>  tests/tcg/cris/{ => user}/check_hello.c       |   0
>  tests/tcg/cris/{ => user}/check_int64.c       |   0
>  tests/tcg/cris/{ => user}/check_lz.c          |   0
>  tests/tcg/cris/{ => user}/check_mapbrk.c      |   0
>  tests/tcg/cris/{ => user}/check_mmap1.c       |   0
>  tests/tcg/cris/{ => user}/check_mmap2.c       |   0
>  tests/tcg/cris/{ => user}/check_mmap3.c       |   0
>  tests/tcg/cris/{ => user}/check_moveq.c       |   0
>  tests/tcg/cris/{ => user}/check_openpf1.c     |   0
>  tests/tcg/cris/{ => user}/check_openpf2.c     |   0
>  tests/tcg/cris/{ => user}/check_openpf3.c     |   0
>  tests/tcg/cris/{ => user}/check_openpf5.c     |   0
>  tests/tcg/cris/{ => user}/check_settls1.c     |   0
>  tests/tcg/cris/{ => user}/check_sigalrm.c     |   0
>  tests/tcg/cris/{ => user}/check_stat1.c       |   0
>  tests/tcg/cris/{ => user}/check_stat2.c       |   0
>  tests/tcg/cris/{ => user}/check_stat3.c       |   0
>  tests/tcg/cris/{ => user}/check_stat4.c       |   0
>  tests/tcg/cris/{ => user}/check_swap.c        |   0
>  tests/tcg/cris/{ => user}/check_time2.c       |   0
>  tests/tcg/cris/{ => user}/crisutils.h         |   0
>  tests/tcg/cris/{ => user}/sys.h               |   0
>  tests/tcg/mips/Makefile.softmmu-target        |  20 ++
>  tests/tcg/mips/Makefile.target                |  15 +-
>  tests/tcg/mips/mips32-dsp/Makefile            | 166 ++-------
>  tests/tcg/mips/mips32-dspr2/Makefile          |  83 +----
>  tests/tcg/mips/mips64-dsp/Makefile            | 336 +++---------------
>  tests/tcg/mips/mipsr5900/Makefile             |  40 +--
>  tests/tcg/xtensa/Makefile                     |  93 -----
>  tests/tcg/xtensa/Makefile.include             |   7 +
>  tests/tcg/xtensa/Makefile.softmmu-target      |  43 +++
>  120 files changed, 385 insertions(+), 857 deletions(-)
>  create mode 100644 tests/docker/dockerfiles/debian-xtensa-cross.docker
>  create mode 100644 tests/docker/dockerfiles/fedora-cris-cross.docker
>  delete mode 100644 tests/tcg/cris/Makefile
>  create mode 100644 tests/tcg/cris/Makefile.include
>  create mode 100644 tests/tcg/cris/Makefile.softmmu-target
>  delete mode 100644 tests/tcg/cris/sys.c
>  rename tests/tcg/cris/{ => system}/check_addcv17.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addi.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addiv32.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addq.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addxc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addxm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_addxr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_andc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_andm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_andq.s (100%)
>  rename tests/tcg/cris/{ => system}/check_andr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_asr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_ba.s (100%)
>  rename tests/tcg/cris/{ => system}/check_bas.s (100%)
>  rename tests/tcg/cris/{ => system}/check_bcc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_boundc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_boundr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_btst.s (89%)
>  rename tests/tcg/cris/{ => system}/check_clearfv32.s (100%)
>  rename tests/tcg/cris/{ => system}/check_clrjmp1.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmp-2.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmpc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmpm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmpq.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmpr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmpxc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_cmpxm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_dstep.s (100%)
>  rename tests/tcg/cris/{ => system}/check_jsr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_lapc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_lsl.s (100%)
>  rename tests/tcg/cris/{ => system}/check_lsr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_mcp.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movdelsr1.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movecr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movei.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movemr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movemrv32.s (100%)
>  rename tests/tcg/cris/{ => system}/check_mover.s (100%)
>  rename tests/tcg/cris/{ => system}/check_moverm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movmp.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movpmv32.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movpr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movprv32.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movscr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movsm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movsr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movucr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movum.s (100%)
>  rename tests/tcg/cris/{ => system}/check_movur.s (100%)
>  rename tests/tcg/cris/{ => system}/check_mulv32.s (100%)
>  rename tests/tcg/cris/{ => system}/check_mulx.s (98%)
>  rename tests/tcg/cris/{ => system}/check_neg.s (100%)
>  rename tests/tcg/cris/{ => system}/check_not.s (100%)
>  rename tests/tcg/cris/{ => system}/check_orc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_orm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_orq.s (100%)
>  rename tests/tcg/cris/{ => system}/check_orr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_ret.s (100%)
>  rename tests/tcg/cris/{ => system}/check_scc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_subc.s (100%)
>  rename tests/tcg/cris/{ => system}/check_subm.s (100%)
>  rename tests/tcg/cris/{ => system}/check_subq.s (100%)
>  rename tests/tcg/cris/{ => system}/check_subr.s (100%)
>  rename tests/tcg/cris/{ => system}/check_xarith.s (100%)
>  rename tests/tcg/cris/{ => system}/crt.s (100%)
>  create mode 100644 tests/tcg/cris/system/sys.c
>  rename tests/tcg/cris/{ => system}/testutils.inc (100%)
>  rename tests/tcg/cris/{ => user}/check_abs.c (100%)
>  rename tests/tcg/cris/{ => user}/check_addc.c (100%)
>  rename tests/tcg/cris/{ => user}/check_addcm.c (100%)
>  rename tests/tcg/cris/{ => user}/check_addo.c (100%)
>  rename tests/tcg/cris/{ => user}/check_addoq.c (100%)
>  rename tests/tcg/cris/{ => user}/check_bound.c (100%)
>  rename tests/tcg/cris/{ => user}/check_ftag.c (100%)
>  rename tests/tcg/cris/{ => user}/check_glibc_kernelversion.c (100%)
>  rename tests/tcg/cris/{ => user}/check_hello.c (100%)
>  rename tests/tcg/cris/{ => user}/check_int64.c (100%)
>  rename tests/tcg/cris/{ => user}/check_lz.c (100%)
>  rename tests/tcg/cris/{ => user}/check_mapbrk.c (100%)
>  rename tests/tcg/cris/{ => user}/check_mmap1.c (100%)
>  rename tests/tcg/cris/{ => user}/check_mmap2.c (100%)
>  rename tests/tcg/cris/{ => user}/check_mmap3.c (100%)
>  rename tests/tcg/cris/{ => user}/check_moveq.c (100%)
>  rename tests/tcg/cris/{ => user}/check_openpf1.c (100%)
>  rename tests/tcg/cris/{ => user}/check_openpf2.c (100%)
>  rename tests/tcg/cris/{ => user}/check_openpf3.c (100%)
>  rename tests/tcg/cris/{ => user}/check_openpf5.c (100%)
>  rename tests/tcg/cris/{ => user}/check_settls1.c (100%)
>  rename tests/tcg/cris/{ => user}/check_sigalrm.c (100%)
>  rename tests/tcg/cris/{ => user}/check_stat1.c (100%)
>  rename tests/tcg/cris/{ => user}/check_stat2.c (100%)
>  rename tests/tcg/cris/{ => user}/check_stat3.c (100%)
>  rename tests/tcg/cris/{ => user}/check_stat4.c (100%)
>  rename tests/tcg/cris/{ => user}/check_swap.c (100%)
>  rename tests/tcg/cris/{ => user}/check_time2.c (100%)
>  rename tests/tcg/cris/{ => user}/crisutils.h (100%)
>  rename tests/tcg/cris/{ => user}/sys.h (100%)
>  create mode 100644 tests/tcg/mips/Makefile.softmmu-target
>  delete mode 100644 tests/tcg/xtensa/Makefile
>  create mode 100644 tests/tcg/xtensa/Makefile.include
>  create mode 100644 tests/tcg/xtensa/Makefile.softmmu-target
> 
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2019-01-04 14:03 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 15:28 [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Alex Bennée
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 01/13] tests/tcg: add softmmu awareness to Makefile Alex Bennée
2018-12-11 13:38   ` Richard Henderson
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 02/13] tests: enable tcg tests for softmmu Alex Bennée
2018-12-11 13:39   ` Richard Henderson
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 03/13] tests/tcg: add QEMU_OPT option for test runner Alex Bennée
2018-12-11 13:39   ` Richard Henderson
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 04/13] tests/tcg/mips: enable mips32-dsp/mips32-dspr2/mipsr5900 linux-user (WIP) Alex Bennée
2018-12-11  9:54   ` Aleksandar Markovic
2018-12-11 10:16     ` Aleksandar Markovic
2018-12-11 12:17     ` Alex Bennée
2018-12-11 13:45   ` Richard Henderson
2018-12-19 14:39   ` Aleksandar Markovic
2018-12-19 16:03     ` Alex Bennée
2018-12-27 11:22       ` Aleksandar Markovic
2018-12-28 10:28         ` Alex Bennée
2018-12-28 17:32           ` Aleksandar Markovic
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 05/13] tests/tcg/mips: enable mips64 system tests (WIP) Alex Bennée
2018-12-27 18:40   ` Aleksandar Markovic
2018-12-27 18:42     ` Aleksandar Markovic
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 06/13] tests/docker: add debian-xtensa-cross image Alex Bennée
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 07/13] tests/tcg/xtensa: enable system tests Alex Bennée
2018-12-11  0:25   ` Max Filippov
2018-12-11 11:58     ` Alex Bennée
2018-12-11 12:32       ` Max Filippov
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 08/13] tests/docker: add fedora-cris-cross compilers Alex Bennée
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 09/13] tests/tcg: split cris tests into system and user mode Alex Bennée
2018-12-11 17:47   ` Alex Bennée
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 10/13] tests/tcg/cris: cleanup sys.c Alex Bennée
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 11/13] tests/tcg/cris: comment out the ccs test Alex Bennée
2019-01-04 14:00   ` Edgar E. Iglesias
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 12/13] tests/tcg/cris: align mul operations Alex Bennée
2018-12-10 15:28 ` [Qemu-devel] [RFC PATCH 13/13] tests/tcg: enable cris system tests Alex Bennée
2019-01-04 13:58 ` [Qemu-devel] [RFC PATCH 00/13] Enabling tcg/tests for xtensa, mips and cris Edgar E. Iglesias
2019-01-04 14:03 ` Edgar E. Iglesias

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.