aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg
AgeCommit message (Collapse)AuthorFilesLines
2019-11-20tests/tcg: modify multiarch tests to work with clangTaylor Simpson2-3/+5
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <1574032465-12186-1-git-send-email-tsimpson@quicinc.com> [AJB: tweak header line] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-11-06tests/tcg/multiarch/linux-test: Fix error check for shmatRichard Henderson1-1/+2
The error indicator for this syscall is -1, not 0. Fixes: e374bfa35bfb ("shm tests - disabled clone test") Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20191106113318.10226-3-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-10-28tests/tcg: enable plugin testingAlex Bennée4-0/+50
If CONFIG_PLUGINS is enabled then lets enable testing for all our TCG targets. This is a simple smoke test that ensure we don't crash or otherwise barf out by running each plugin against each test. There is a minor knock on effect for additional runners which need specialised QEMU_OPTS which will also need to declare a plugin version of the runner. If this gets onerous we might need to add another helper. Checking the results of the plugins is left for a later exercise. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2019-10-28tests/tcg: drop test-i386-fprem from TESTS when not SLOWAlex Bennée1-5/+6
This is a very slow running test which we only enable explicitly. However having it in the TESTS lists would confuse additional tests like the plugins test which want to run on all currently enabled tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2019-10-28tests/tcg: move "virtual" tests to EXTRA_TESTSAlex Bennée2-2/+4
Otherwise clever expanders like the plugins test get unstuck. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2019-10-28tests/tcg: set QEMU_OPTS for all cris runsAlex Bennée1-1/+1
This will important for ensuring the plugin test variants will also work. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2019-10-28tests/tcg/Makefile.target: fix path to config-host.makAlex Bennée1-1/+1
Since moving where the tests are run the path to config-host.mak has been wrong. This doesn't affect much but things like the time fallback for CONFIG_DEBUG_TCG and will also get in the way of checking for PLUGINS support. Fixes: fc76c56d3f4 Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2019-09-30Merge remote-tracking branch ↵Peter Maydell3-1/+55
'remotes/pmaydell/tags/pull-target-arm-20190927' into staging target-arm queue: * Fix the CBAR register implementation for Cortex-A53, Cortex-A57, Cortex-A72 * Fix direct booting of Linux kernels on emulated CPUs which have an AArch32 EL3 (incorrect NSACR settings meant they could not access the FPU) * semihosting cleanup: do more work at translate time and less work at runtime # gpg: Signature made Fri 27 Sep 2019 15:32:43 BST # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20190927: hw/arm/boot: Use the IEC binary prefix definitions hw/arm/boot.c: Set NSACR.{CP11,CP10} for NS kernel boots tests/tcg: add linux-user semihosting smoke test for ARM target/arm: remove run-time semihosting checks for linux-user target/arm: remove run time semihosting checks target/arm: handle A-profile semihosting at translate time target/arm: handle M-profile semihosting at translate time tests/tcg: clean-up some comments after the de-tangling target/arm: fix CBAR register for AArch64 CPUs Signed-off-by: Peter Maydell <peter.maydell@linaro.org> # Conflicts: # tests/tcg/arm/Makefile.target
2019-09-27tests/tcg: add linux-user semihosting smoke test for ARMAlex Bennée3-0/+55
We already use semihosting for the system stuff so this is a simple smoke test to ensure we are working OK on linux-user. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20190913151845.12582-7-alex.bennee@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-09-27tests/tcg: clean-up some comments after the de-tanglingAlex Bennée3-10/+15
These were missed in the recent de-tangling so have been updated to be more actuate. I've also built up ARM_TESTS in a manner similar to AARCH64_TESTS for better consistency. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20190913151845.12582-2-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-09-26tests/tcg: add simple record/replay smoke test for aarch64Alex Bennée1-0/+21
This adds two new tests that re-use the memory test to check basic record replay functionality is still working. We have to define our own runners rather than using the default pattern as we want to change the test name but re-use the memory binary. We declare the test binaries as PHONY as they don't really exist. [AJB: A better test would output some sort of timer value or other otherwise variable value so we could compare the record and replay outputs and ensure they match] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Pavel Dovgalyuk <dovgaluk@ispras.ru>
2019-09-26tests/tcg: add generic version of float_convsAlex Bennée4-3/+1604
This is broadly similar to the existing fcvt test for ARM but using the generic float testing framework. We should be able to pare down the ARM fcvt test case to purely half-precision with or without the Alt HP provision. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-26tests/tcg: add float_madds test to multiarchAlex Bennée8-1/+1918
This is a generic floating point multiply and accumulate test for single precision floating point values. I've split of the common float functions into a helper library so additional tests can use the same common code. As I don't have references for all architectures I've allowed some flexibility for tests to pass without reference files. They can be added as we get collect them. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-26tests/tcg: re-enable linux-test for ppc64abi32Alex Bennée1-8/+3
Now we have fixed the signal delivary bug we can remove this horrible hack from the system. Cc: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-26tests/tcg: clean-up some comments after the de-tanglingAlex Bennée3-10/+15
These were missed in the recent de-tangling so have been updated to be more actuate. I've also built up ARM_TESTS in a manner similar to AARCH64_TESTS for better consistency. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-23tests/tcg: target/s390x: Test MVCDavid Hildenbrand2-0/+110
Let's add a test that especially verifies that no data will be touched in case we cross page boundaries and one page access triggers a fault. Before the fault-safe handling fixes, the test failes with: TEST mvc on s390x data modified during a fault make[2]: *** [../Makefile.target:116: run-mvc] Error 1 Acked-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: David Hildenbrand <david@redhat.com>
2019-09-23tests/tcg: target/s390x: Test MVODavid Hildenbrand2-0/+26
Let's add the simple test based on the example from the PoP. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: David Hildenbrand <david@redhat.com>
2019-09-10tests/docker: move our arm64 cross compile to BusterAlex Bennée1-1/+1
Now Buster is released we can unify our cross build images for both QEMU and tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-09-10tests/tcg: add .gitignore for in source buildsAlex Bennée1-0/+5
This hides the new build artefacts from the re-organised TCG tests when you are doing an in-source build. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-10tests/tcg: move configuration to a sub-shell scriptPaolo Bonzini19-145/+269
Avoid the repeated inclusions of config-target.mak, which have risks of namespace pollution, and instead build minimal configuration files in a configuration script. The same configuration files can also be included in Makefile and Makefile.qemu [AJB 10/09/19] In the original PR this had inadvertently enabled tests for ppc64abi32. However as the rest of the multiarch tests work rather than disabling the otherwise correctly functioning build I've just skipped the failing linux-test test. For some reason I can't debug it with TCG so I'm leaving that to the PPC maintainers to look at. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20190807143523.15917-4-pbonzini@redhat.com> [AJB: s/docker/container/, rm last bits from configure, ppc6432abi hack] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Richard Henderson <rth@twiddle.net>
2019-09-10tests/tcg: cleanup Makefile inclusionsPaolo Bonzini9-60/+86
Rename Makefile.probe to Makefile.prereqs and make it actually define rules for the tests. Rename Makefile to Makefile.target, since it is not a toplevel makefile. Rename Makefile.include to Makefile.qemu and disentangle it from the QEMU Makefile.target, so that it is invoked recursively by tests/Makefile.include. Tests are now placed in tests/tcg/$(TARGET). Drop the usage of TARGET_BASE_ARCH, which is ignored by everything except x86_64 and aarch64. Fix x86 tests by using -cpu max and, while at it, standardize on QEMU_OPTS for aarch64 tests too. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20190807143523.15917-3-pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-10tests/tcg: use EXTRA_CFLAGS everywherePaolo Bonzini6-10/+10
For i386 specifically, this allows using the host GCC to compile the i386 tests. But, it should really be done for all targets, unless we want to pass $(EXTRA_CFLAGS) directly as part of $(CC). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20190807143523.15917-2-pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-09-10tests/docker: fix "cc" command to work with podmanAlex Bennée1-1/+1
Podman requires a little bit of additional magic to the uid mapping which was already done for the normal RunCommand. We simplify the logic by pushing it directly into the Docker::run method to avoid instantiating an extra Docker() object and ensure the CC command always runs as the current user. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-08-19target/mips: tests/tcg: Fix target configurations for MSA testsAleksandar Markovic8-2028/+2576
At this moment, the only MIPS CPUs that are emulated in QEMU and support MSA extension are R5600 (mips32r5), and I6400/I6500 (mips64r6). Therefore, mips32r5 and mips64r6 are the only ISAs that could support MSA in QEMU. This means mips32r6 currently do not make much sense, and mips32r5 support for MSA tests is needed, which is done by this patch. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1566216496-17375-38-git-send-email-aleksandar.markovic@rt-rk.com>
2019-08-19target/mips: tests/tcg: Add optional printing of more detailed failure infoAleksandar Markovic1-1/+22
There is a need for printing input and output data for failure cases, for debugging purpose. This is achieved by this patch, and only if a preprocessor constant is manually set to 1. (Assumption is that the need for such printout is relatively rare.) Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1566216496-17375-37-git-send-email-aleksandar.markovic@rt-rk.com>
2019-07-10tests/tcg: fix diff-out pass to properly report failureAlex Bennée1-1/+5
A side effect of piping the output to head is squash the exit status of the diff command. Fix this by only doing the pipe if the diff failed and then ensuring the status is non-zero. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-07-10tests/tcg: fix up test-i386-fprem.ref generationAlex Bennée1-2/+2
We never shipped the reference data in the source tree because it's quite big (64M). As a result the only option is to generate it locally. Although we have a rule to generate the reference file we missed the dependency and location changes, probably because it's only run for SLOW test runs. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2019-07-02tcg/tests: target/mips: Correct MSA test compilation and execution orderAleksandar Markovic8-48/+48
Correct MSA test compilation and execution order, for the sake of consistence. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1562068213-11307-4-git-send-email-aleksandar.markovic@rt-rk.com>
2019-07-02tcg/tests: target/mips: Amend MSA integer multiply testsAleksandar Markovic8-891/+891
Amend MSA fixed point multiply tests: correct output values for MADDV.B, MADDV.H, MADDV.W, MADDV.D, MSUBV.B, MSUBV.H, MSUBV.W and MSUBD.D. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1562068213-11307-3-git-send-email-aleksandar.markovic@rt-rk.com>
2019-07-02tcg/tests: target/mips: Amend MSA fixed point multiply testsAleksandar Markovic17-0/+1840
Amend MSA fixed point multiply tests: add tests for MADD_Q.H, MADD_Q.W, MADDR_Q.H, MADDR_Q.W, MSUB_Q.H, MSUB_Q.W, MSUBR_Q.H and MSUBR_Q.W. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1562068213-11307-2-git-send-email-aleksandar.markovic@rt-rk.com>
2019-07-02Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190701' into stagingPeter Maydell1-1/+1
- cleanup/refactoring in the cpu feature code - fix for a tcg test case - halt/clear support for vfio-ccw, and use a new helper # gpg: Signature made Mon 01 Jul 2019 12:08:41 BST # gpg: using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF # gpg: issuer "cohuck@redhat.com" # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [unknown] # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full] # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full] # gpg: aka "Cornelia Huck <cohuck@kernel.org>" [unknown] # gpg: aka "Cornelia Huck <cohuck@redhat.com>" [unknown] # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20190701: s390x: add cpu feature/model files to KVM section vfio-ccw: support async command subregion vfio-ccw: use vfio_set_irq_signaling s390x/cpumodel: Prepend KDSA features with "KDSA" s390x/cpumodel: Rework CPU feature definition tests/tcg/s390x: Fix alignment of csst parameter list Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-26tests/tcg: target/mips: Fix some test cases for pack MSA instructionsAleksandar Markovic12-384/+384
Fix certian test cases for MSA pack instructions. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561543629-20327-8-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-26tests/tcg: target/mips: Add support for MSA MIPS32R6 testingsAleksandar Markovic4-0/+1980
Add files for MSA MIPS32R6 target testings (copiling and running). Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561543629-20327-7-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-26tests/tcg: target/mips: Add support for MSA big-endian target testingsAleksandar Markovic5-633/+1631
Add files for MSA big-endian target testings (copiling and running). Little-endian files are renamed and ammended too. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561543629-20327-6-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-26tests/tcg: target/mips: Amend tests for MSA int multiply instructionsAleksandar Markovic10-0/+1744
Amend tests for MSA int multiply instructions. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561543629-20327-5-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-26tests/tcg: target/mips: Amend tests for MSA int dot product instructionsAleksandar Markovic15-0/+2644
Add tests for instructions whose result depends on the value in destination register (prior to instruction execution). Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561543629-20327-4-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-26tests/tcg: target/mips: Add tests for MSA move instructionsAleksandar Markovic4-0/+170
Add tests for MSA move instructions. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561543629-20327-3-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-26tests/tcg: target/mips: Add tests for MSA bit move instructionsAleksandar Markovic14-4/+2415
Add tests for MSA bit move instructions. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561543629-20327-2-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-24Merge tag 's390x-tcg-2019-06-21' into s390-next-stagingCornelia Huck1-1/+1
One fix for a tcg test case and two cleanups/refactorings of cpu feature definitions. # gpg: Signature made Fri 21 Jun 2019 03:37:37 PM CEST # gpg: using RSA key 1BD9CAAD735C4C3A460DFCCA4DDE10F700FF835A # gpg: issuer "david@redhat.com" # gpg: Good signature from "David Hildenbrand <david@redhat.com>" [full] # gpg: aka "David Hildenbrand <davidhildenbrand@gmail.com>" [full] * tag 's390x-tcg-2019-06-21': s390x/cpumodel: Prepend KDSA features with "KDSA" s390x/cpumodel: Rework CPU feature definition tests/tcg/s390x: Fix alignment of csst parameter list Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2019-06-21tests/tcg/s390x: Fix alignment of csst parameter listRichard Henderson1-1/+1
The parameter list given in general register 1 shall be aligned on a quadword boundary. This test currently succeeds or fails depending on the compiler version used and the accidential layout of the function's stack frame. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com>
2019-06-21tests/tcg: target/mips: Amend tests for MSA pack instructionsAleksandar Markovic13-12/+708
Add tests for cases when destination register is the same as one of source registers. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561031359-6727-3-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-21tests/tcg: target/mips: Include isa/ase and group name in test outputAleksandar Markovic260-736/+1492
For better appearance and usefullnes, include ISA/ASE name and instruction group name in the output of tests. For example, all this data will be displayed for FMAX_A.W test: | MSA | Float Max Min | FMAX_A.W | | PASS: 80 | FAIL: 0 | elapsed time: 0.16 ms | (the data will be displayed in one row; they are presented here in two rows not to exceed the width of the commit message) Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1561031359-6727-2-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-13target/arm: Fix output of PAuth AuthRichard Henderson2-1/+62
The ARM pseudocode installs the error_code into the original pointer, not the encrypted pointer. The difference applies within the 7 bits of pac data; the result should be the sign extension of bit 55. Add a testcase to that effect. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-06-12tests/tcg/x86_64: add a PVH crt.o for x86_64 system testsAlex Bennée3-0/+311
Instead of doing the full real to 64 bit dance we are attempting to leverage Xen's PVH boot spec to go from 32 bit to 64 bit. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-06-12tests/tcg: clean-up VPATH/TESTS for i386Alex Bennée1-7/+2
Since we only run build the multiarch tests and we use a fully resolved path for the crt object we don't need the wildcard or VPATH messing about. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-06-12tests/tcg: better detect truncated readsAlex Bennée1-5/+31
If we've truncated a wider read we can detect the condition earlier by looking at the number of zeros we've read. So we don't trip up on cases where we have written zeros to the start of the buffer we also ensure we only start each offset read from the right address. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-06-07tests/tcg: target/mips: Add README for MSA testsAleksandar Markovic3-0/+904
Add README for MSA tests. This is just to explain how to run tests even without Makefile. Makefile will be provided later on. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1559838440-9866-11-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-07tests/tcg: target/mips: Add tests for MSA FP max/min instructionsAleksandar Markovic8-0/+1240
Add tests for MSA FP max/min instructions. This includes following instructions: * FMAX.W - float maximum (words) * FMAX.D - float maximum (doublewords) * FMAX_A.W - float maximum absolute (words) * FMAX_A.D - float maximum absolute (doublewords) * FMIN.W - float minimum (words) * FMIN.D - float minimum (doublewords) * FMIN_A.W - float minimum absolute (words) * FMIN_A.D - float minimum absolute (doublewords) Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1559838440-9866-10-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-07tests/tcg: target/mips: Add utility function reset_msa_registers()Aleksandar Markovic227-4/+504
Add function reset_msa_registers() and utilize it in each MSA test. This is needed to ensure independency of test results on the state of MSA registers before test execution. This also allows for correction of tests for VSHF* instructions, that are now independent on the previous state of MSA registers. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1559838440-9866-9-git-send-email-aleksandar.markovic@rt-rk.com>
2019-06-07tests/tcg: target/mips: Move four tests to a better locationAleksandar Markovic4-0/+0
Move tests for <MUL|MULR>_Q.<H|B> from "integer multiply" directory to "fixed-point multiply" directory, since they do not operate on integers, but on fixed point numbers. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com> Message-Id: <1559838440-9866-8-git-send-email-aleksandar.markovic@rt-rk.com>