Commit Graph

38 Commits

Author SHA1 Message Date
Petar Jovanovic
58c1c98db4 mips64: update tests for N32 ABI
Fix n32/n64 types mismatch in none, memcheck and helgrind tests.

BZ issue - #345763.

Contributed by:
  Dimitrije Nikolic, Aleksandar Rikalo, Tamara Vlahovic.
2018-06-14 17:40:08 +00:00
Petar Jovanovic
9fc2bfba5c mips: add tests for mips32/mips64 R6
This set of tests covers MIPS r6 specific instructions:

  none/tests/mips32/MIPS32r6int
  none/tests/mips32/branch_pc
  none/tests/mips32/branches_r6
  none/tests/mips32/fp_r6
  none/tests/mips32/pc_instructions_r6

  none/tests/mips64/MIPS64r6int
  none/tests/mips64/branch_pc
  none/tests/mips64/branches_r6
  none/tests/mips64/fp_r6
  none/tests/mips64/pc_instructions_r6
  none/tests/mips64/r6_instructions

The following tests had to be changed to be applicaple for Rev6:

  none/tests/libvex_test.c

  none/tests/mips32/LoadStore
  none/tests/mips32/LoadStore1
  none/tests/mips32/MIPS32int
  none/tests/mips32/MoveIns
  none/tests/mips32/branches
  none/tests/mips32/change_fp_mode
  none/tests/mips32/mips32_dsp
  none/tests/mips32/vfp

  none/tests/mips64/arithmetic_instruction
  none/tests/mips64/branches
  none/tests/mips64/fpu_arithmetic
  none/tests/mips64/fpu_load_store
  none/tests/mips64/load_store
  none/tests/mips64/load_store_multiple
  none/tests/mips64/move_instructions

The following tests are not applicable for Rev6:

  none/tests/mips32/fpu_branches
  none/tests/mips32/unaligned_load_store

  none/tests/mips64/branch_and_jump_instructions
  none/tests/mips64/change_fp_mode
  none/tests/mips64/fpu_branches
  none/tests/mips64/load_store_unaligned
  none/tests/mips64/unaligned_load
  none/tests/mips64/unaligned_load_store.

Contributed by:
  Tamara Vlahovic, Aleksandar Rikalo and Aleksandra Karadzic.

Related BZ issue - #387410.
2018-02-01 18:37:28 +01:00
Petar Jovanovic
95038d380d mips: finetune tests that print FCSR
Bits 18 (NAN2008) and 19 (ABS2008) in FCSR are preset by hardware and can
differ between platforms. Hence, we should clear these bits before printing
FCSR value in order to have the same output on different platforms.

This fixes several failures (tests modified by this change) that occur on
MIPS P5600 board. The P5600 is a core that implements MIPS32 Release 5 arch.
2017-11-03 19:11:36 +01:00
Petar Jovanovic
0e1fa562e9 mips: MSA tests
This set of tests covers the whole MSA instruction set:

  none/tests/mips32/msa_arithmetic
  none/tests/mips32/msa_comparison
  none/tests/mips32/msa_data_transfer
  none/tests/mips32/msa_fpu
  none/tests/mips32/msa_logical_and_shift
  none/tests/mips32/msa_shuffle

  none/tests/mips64/msa_arithmetic         (symlink to mips32)
  none/tests/mips64/msa_comparison         (symlink to mips32)
  none/tests/mips64/msa_data_transfer
  none/tests/mips64/msa_fpu                (symlink to mips32)
  none/tests/mips64/msa_logical_and_shift  (symlink to mips32)
  none/tests/mips64/msa_shuffle            (symlink to mips32)

Contributed by:
  Tamara Vlahovic, Aleksandar Rikalo and Aleksandra Karadzic.

Related BZ issue - #382563.
2017-10-27 16:27:25 +02:00
Petar Jovanovic
8d121cf8c9 mips64: finetune cvm_atomic_thread test
Remove unnecessary logs from the expected output.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16353
2017-05-10 16:18:12 +00:00
Petar Jovanovic
01a572e6f4 mips64: update Makefile
Update Makefile with new name for the stdout.exp file.
Missed to do this as part of r16298.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16299
2017-04-10 17:43:20 +00:00
Petar Jovanovic
2ef4677294 mips64: update cvm_atomic_thread test for BE
Update the test cvm_atomic_thread so it can be executed on BE boards too.
Reuse the stdout.exp file.

Based on patch from Tamara Vlahovic.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16298
2017-04-10 17:11:01 +00:00
Petar Jovanovic
91a7579ee6 mips64: update exp file for test_math
Leave the old exp file that covers cases in which __addtf3 and __subtf3
did not take into account rounding modes. New exp file is the same file
that already exists in mips32 folder, so we just create a symbolic link
to it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16201
2017-01-13 16:29:15 +00:00
Petar Jovanovic
d047f65f4e mips64: add cvm_atomic.stdout.exp-BE
Add BE variant of exp file for cvm_atomic test.
This fixes none/tests/mips64/cvm_atomic for Cavium MIPS64 BE systems.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16183
2016-12-10 00:29:58 +00:00
Petar Jovanovic
ed74dc8a27 mips: allow Valgrind to be compiled for soft-float
Force "hardfloat" mode for inline assembly that uses FPU instructions,
but pop original mode at the end of the assembly. Unhandled FPU
instructions will be handled by the signal handler (env_unsup_insn).

Skip MIPS specific tests for FPU if the code gets compiled for soft-
float.

This should allow Valgrind to be compiled as a soft-float binary, but
that executable should be used for soft-float systems only.

Related VEX change - r3261.
Related issue - BZ#351282.

Patch by Aleksandar Rikalo.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16039
2016-10-12 15:13:27 +00:00
Petar Jovanovic
517d43c278 mips: clear fcc bits in fcsr after calling printf()
Clear floating point condition codes in the test after calling external
function (in this case printf), as it might have clobbered fcc bits in
fcsr.

This resolves  none/tests/mips64/round.c failure on some systems.

Patch by Aleksandra Karadzic.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16038
2016-10-12 14:16:08 +00:00
Petar Jovanovic
a3d6829d04 mips64: support for prctl(GET/SET_FP_MODE) syscalls
Adding a program (change_fp_mode) to test correct fpu emulation and
fp mode switch using prctl syscalls.

Patch by Aleksandar Rikalo.
Related bug - BZ #366079.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16004
2016-10-04 15:25:27 +00:00
Petar Jovanovic
9f3495d2a1 mips64: modify load_indexed_instructions test
A little style improvement for load_indexed_instructions test including
addition of new instruction to be tested - lhx (supported as of VEX r3152).

Related issue - BZ #345987.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15340
2015-06-16 23:49:30 +00:00
Petar Jovanovic
768a928b2b mips64: extend the test with new cases for Cavium SEQI and SNEI
Extend the test to introduce cases for SEQI and SNEI when immediate is
equal to the content of the GPR rs. Minor code style changes added.

Patch by Maran Pakkirisamy.

Related issue - BZ #341997.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15043
2015-03-28 00:59:32 +00:00
Petar Jovanovic
65c74e8e8a mips64: add test cases for Cavium BBIT032 and BBIT132
This is a follow up to VEX r3028. This change adds two test cases
for Cavium instructions BBIT032 and BBIT132.

Issue tracked in BZ #339288.

Patch by Maran Pakkirisamy.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14792
2014-11-26 23:50:31 +00:00
Petar Jovanovic
7449ebb921 mips64: enable soft-float build of the tests
Cavium toolchain defaults to soft-float, so it is important to enable full
build of the test suite to work in that case as well.

This boils down to protecting FPU-specific code segments with

#if defined(__mips_hard_float)
#endif


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14572
2014-09-27 05:40:33 +00:00
Petar Jovanovic
89b035b3a1 mips64: run FPU tests only when FPU is available
Check whether the target platform is meant to have an FPU before executing
tests that make use of a floating-point unit.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14571
2014-09-27 05:33:07 +00:00
Petar Jovanovic
11e6f57b70 mips64: add tests for Cavium BBIT0 and BBIT1
Follow up to VEX r2942 in which support for Cavium BBIT0/1 instructions
has been added.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14449
2014-09-04 01:07:08 +00:00
Dejan Jevtic
f1b4547420 mips64: Tests for Cavium MIPS Octeon Atomic and Count Instructions.
Tests for instructions:
baddu, pop, dpop, saa, saad, laa, laad, lai, laid, lad, ladd, law, lawd,
las, lasd, lac, lacd


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13994
2014-06-04 11:36:21 +00:00
Petar Jovanovic
b8c6f1c0a3 mips64: add missing file to EXTRA_DIST
Add missing cvm_lx_ins.stdout.exp-BE to EXTRA_DIST.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13811
2014-02-15 03:38:57 +00:00
Petar Jovanovic
b117eca6ed mips64: correct mistyped test name
Minor name changed in .vgtest file.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13809
2014-02-14 18:09:03 +00:00
Petar Jovanovic
544994d634 mips64: add tests for load indexed instructions
Tests that should be executed on MIPS64 platforms that support lwx, ldx
and lbux.

Relevant VEX change - r2819.

Patch by Zahid Anwar, with some changes.

Related to Bugzilla issue 326444. It closes this issue now.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13808
2014-02-14 17:50:42 +00:00
Petar Jovanovic
e65d1dafdf mips64: Add BE version of cvm_lx_ins.stdout.exp
Read-memory tests are endian sensitive.
Add BE version of cvm_lx_ins.stdout.exp that has been tested on
Cavium Octeon II in BE mode.

Related to Bugzilla issue 326444.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13805
2014-02-13 18:07:03 +00:00
Petar Jovanovic
1461dae691 mips64: Add tests that cover Cavium-specific load indexed instructions
Tests for lhux, lwux, and lbx for Cavium Octeon II.

Patch by Zahid Anwar, with changes.

Related to Bugzilla issue 326444.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13786
2014-01-31 12:49:22 +00:00
Dejan Jevtic
b4adb1bc50 mips32/64: Test case for VEX r2799.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13713
2013-11-14 15:45:26 +00:00
Petar Jovanovic
e58b7c43e4 mips64: add missing headers to EXTRA_DIST
make dist will not copy header files if they are not explicitly listed
in EXTRA_DIST. This change adds missing header files from none/test/mips64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13701
2013-10-27 16:10:26 +00:00
Dejan Jevtic
1a65c43997 mips64: Prevent testing swc1 and swxc1 with the uninitialized memory values on
big endian platrofms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13634
2013-10-11 06:05:24 +00:00
Dejan Jevtic
eb65531207 mips64: Change the input values for FPU tests.
Change the input values so that the binary values
is representing exactly the same float values.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13632
2013-10-10 09:10:35 +00:00
Dejan Jevtic
91d5bb2015 mips32/mips64: tests for FCSR.
Change the existing tests to print the value of the FCSR
register after the mips fpu instruction is executed.
Add tests that are testing the value of FCSR register.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13560
2013-09-18 10:08:23 +00:00
Petar Jovanovic
c818bd5ff8 mips64: add tests for MIPS64 Octeon Instructions
Follow up to VEX r2765.

Patch by Zahid Anwar.

Bugzilla issue 322150


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13558
2013-09-18 02:19:45 +00:00
Dejan Jevtic
63d3dd8351 mips32/mips64: Add tests for lwl and lwr for mips32 and mips64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13526
2013-09-02 15:35:12 +00:00
Petar Jovanovic
f6fbe93a41 mips64: fix typo in EXTRA_DIST
Fixes make dist error.
Typo spotted and reported by Maran Pakkirisamy <maranp@linux.vnet.ibm.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13424
2013-06-09 14:29:10 +00:00
Petar Jovanovic
4ff0a91332 mips64: add missing line-continuation character
make distclean failed for the missing character.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13416
2013-06-02 17:23:43 +00:00
Petar Jovanovic
92a11afe46 mips64: rename exp files for load_store_multiple
Rename none/tests/mips64/load_store_multiple exp files to match the name
of the source file.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13412
2013-05-29 10:50:31 +00:00
Petar Jovanovic
94576d9cb4 mips64: expected output for mips64 specific tests
Follow up to the previous change in which mips64 specific tests were added.
It covers both MIPS64-LE and MIPS64-BE.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13411
2013-05-28 18:06:05 +00:00
Petar Jovanovic
d7adfcc772 mips64: set of mips64 specific tests
This is a set of mips64 programs that test mips64 instruction set.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13410
2013-05-28 16:51:27 +00:00
Petar Jovanovic
45e740c563 mips: define allexec files as soft links
This change is a follow up to r13385. It removes physical copies of the
allexec c-files in none/tests/mips32/ and none/tests/mips64/ and defines
them as soft-links to a common file like other arches do.

Credits to Philippe for noticing it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13388
2013-05-11 22:23:27 +00:00
Petar Jovanovic
ef5865f643 mips: add allexec tests for mips64
Initial patch for none/tests/mips64/.
allexec tests added.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13385
2013-05-10 13:14:54 +00:00