Commit Graph

111 Commits

Author SHA1 Message Date
Julian Seward
3e9eadf4b4 The Signedness Police visit a couple of outlying systems in the Delta
Quadrant.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13166
2012-12-06 22:41:47 +00:00
Julian Seward
b9d41417b1 Add tests for MOVBE in 32 bit mode. See 304867. (Ambroz Bizjak,
ambrop7@gmail.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12889
2012-08-23 23:42:46 +00:00
Bart Van Assche
045137d886 none/tests/x86/bug125959-x86 language conformance fix: do not trigger signed integer overflow. Fixes #292628.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12358
2012-01-28 14:20:30 +00:00
Philippe Waroquiers
c523185b76 fix 286270 VG_(env_remove_valgrind_env_stuff)
rev 12001 has introduced a regression in VG_(env_remove_valgrind_env_stuff):
to avoid modifying a possibly read-only env string, the string is duplicated,
and the copy is modified. However, mash_env_column modifies the string
"in-place". The modified string was not put back in the env (and could not,
because the src string is only partially copied).

This means that the valgrind preload strings were not cleaned up and
when a 32 bit executable execs a 64 bits (or vice versa: 64 bit execs 32 bits),
LD_PRELOAD contains both the 32 bits and 64 bits versions of Valgrind
vgpreload.... => ld.so then gives an error msg, as it can't preload either
the 32 or the 64 bits version.


The patch fixes this by duplicating the whole env string, and passing
to mash_colon_env a pointer to the correct offset in the whole env string.
The duplicated string is replacing the original entry in envp.

This patch adds two regression tests : none/tests/allexec32 and 
none/tests/allexec64. On a bi-arch valgrind, these will be 32bits and 64 bits
executables, exec-ing each other. On a single arch, one will be a symlink
to the other (to avoid different .exp files, and still test exec).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12287
2011-12-11 16:29:43 +00:00
Florian Krohm
b798dacb8c Fix the configure test for ssse3 support. GCC needs -msse or it
will reject the xmm7 clobber in the code snippet.
Fix the prereqs for the ssse3 tests. It is possible that hardware
supports ssse3 but the tool chain does not. So we need to have the
testcase executable as a prerequisite.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12251
2011-10-28 21:37:19 +00:00
Bart Van Assche
a38ef2312e Remove filter_int because not used anywhere
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12178
2011-10-20 16:06:51 +00:00
Julian Seward
2eac6e7c8f Add a new .stdout.exp file, for older glibcs that print negative nans
without a minus sign.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12119
2011-10-07 12:45:49 +00:00
Julian Seward
ad7de5b336 Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842
2011-06-28 07:25:29 +00:00
Bart Van Assche
64a2d66bdf Silence compiler warnings triggered by certain regression tests programs and that we are not interested in.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11758
2011-05-15 17:06:33 +00:00
Bart Van Assche
8a3e9fdd7c git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11682 2011-04-03 17:42:19 +00:00
Tom Hughes
e177ef4590 Use two separate assembler argument bindings for loading or storing
a value in an xmm register as trying to do it with offsets from a
single argument apparently causes problems in newer gcc versions.

Fix to bug #266931.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11672
2011-03-28 13:51:41 +00:00
Tom Hughes
a7b6bdd6fb Fix generated assembler which writes the result to memory to correctly
use an =m constraint to indicate that the address will be written to.

Partial fix to bug #266931.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11671
2011-03-28 13:08:52 +00:00
Julian Seward
b28bc73ed4 Add a test case for non-overwriting of CC_NDEP in shifts by zero.
See #269354.  (Stephen McCamant, smcc@CS.Berkeley.EDU)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11667
2011-03-26 07:30:39 +00:00
Bart Van Assche
a228cd9df6 Skip test programs that do not build on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11586
2011-03-05 10:11:35 +00:00
Julian Seward
166dd7ea1c Add tests for AAD and AAM (base 10 only).
(Vince Weaver, vince@csl.cornell.edu)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11502
2011-01-17 12:34:33 +00:00
Julian Seward
5725aecb7a Add test cases for amd64 ADC Iv, eAX and SBB Iv, eAX (Jakub Jelinek,
jakub@redhat.com).  See #211410.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11385
2010-09-28 14:39:39 +00:00
Bart Van Assche
e8063b7b3f Added configure test that checks whether the assembler supports the SSE4a instruction lzcnt.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11357
2010-09-14 10:53:57 +00:00
Julian Seward
8c51c94c5c Partially connect up the LZCNT tests. What remains to be done is to
make their building conditional on whether the assembler understands
'lzcnt', which is a configure time test.  (Probably simpler to do a
single test for SSE4.1, 4.2 and 4a support as that will soon be
required anyway.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11246
2010-07-30 15:11:53 +00:00
Julian Seward
c97c366f10 Test cases for LZCNT instruction support. Not wired up yet.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11242
2010-07-29 15:55:09 +00:00
Julian Seward
0dfb413300 Update expected outputs following vex r1992.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11235
2010-07-29 07:02:18 +00:00
Julian Seward
06b158b13b Add test cases for XADD reg,reg. (Nicolas Sauzede, nicolas.sauzede@st.com).
See #195662.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11127
2010-05-10 20:53:28 +00:00
Tom Hughes
9bab1b80f8 Make sure the x86 direction flag is cleared again if we set it as part
of a test, as the x86 requires it to be clear when any function is called
and gcc 4.3.0 and later rely on that. Fixes #201708.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10642
2009-07-27 23:09:42 +00:00
Bart Van Assche
06d1aa76b3 Fixed the inline assembly code such that it also works correctly with gcc 4.4.0. While accessing stack variables from inline assembly code that modifies the stack pointer works fine with gcc 3.0 - gcc 4.3 with optimization disabled, it gives incorrect results with gcc 4.4.0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10484
2009-07-18 10:39:14 +00:00
Julian Seward
205f7fa457 Add tests to verify behaviour of atomic instruction handling.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10410
2009-07-04 12:44:08 +00:00
Nicholas Nethercote
b05a2a18d7 This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
2009-06-24 00:37:09 +00:00
Nicholas Nethercote
07045477ca Merge the DARWIN branch onto the trunk.
I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156
2009-05-28 01:53:07 +00:00
Nicholas Nethercote
8d02058b42 DARWIN sync: Makefile.am layout, mostly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10016
2009-05-20 04:02:50 +00:00
Nicholas Nethercote
5976184a68 Merge r9666 (badseg portability tweak) from the DARWIN branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9668
2009-04-29 02:02:19 +00:00
Nicholas Nethercote
32bd1a00c2 Merge r9610 (AM_CCASFLAGS tweaks for test Makefiles) from the DARWIN branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9611
2009-04-24 20:17:07 +00:00
Nicholas Nethercote
3b383dab10 Merged r9602 and r9603 (make cpuid pass on Darwin, rename .s files to .S)
from the DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9604
2009-04-24 07:12:39 +00:00
Nicholas Nethercote
e91540cc58 Merged r9596 (build system tweaks, minus the Darwin bits) from the DARWIN
branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9598
2009-04-24 04:12:28 +00:00
Nicholas Nethercote
3ee960caa2 Merge r9571 (get faultstatus building again) from the DARWIN branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9572
2009-04-17 07:14:29 +00:00
Nicholas Nethercote
894ec4e1fd Merge r9550..r9552 (move seg_override and sigcontext) from the DARWIN branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9553
2009-04-15 23:10:04 +00:00
Nicholas Nethercote
f3f801ed48 Merge r9533..9536 (add tests/{asm.h,sys_mman.h,malloc.h} from the DARWIN
branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9537
2009-04-15 03:12:43 +00:00
Nicholas Nethercote
08da262266 Roll back accidental change that shouldn't have been in r9316.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9318
2009-03-04 04:28:34 +00:00
Nicholas Nethercote
4c23a0b3e9 tests/arch_test is currently being used for two purposes:
- by vg_regtest for determining if a directory name matches an architecture;
- by various .vgtest files for detecting x86/AMD64 features.

This commit splits it in two for the two different purposes, which makes
things clearer.

Specific changes

- Moved the x86/AMD64 feature detection stuff out of arch_test.c, and
  into the new x86_amd64_feature.c.  Updated the relevant .vgtest files for
  the change.

- In vg_regtest, now a prereq command must return 0 (prereq satisfied) or 1
  (prereq not satisfied).  Anything else makes vg_regtest abort.  This
  makes obvious any problems with prereq tests rather than just making the
  tests skip innocuously.  (We previously had exactly such a problem on the
  DARWIN branch;  the x86 feature detection tests caused segfaults so the
  tests were incorrectly skipped.  This change will catch any similar future
  problem.)

- Changed os_test from a script to a C program, matching cpu_test.

- Removed some unintentional darwin stuff from platform_test.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9316
2009-03-04 04:15:16 +00:00
Nicholas Nethercote
7b65c22fbc Some more test/build cleanups missed in prior commits.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9227
2009-02-23 01:18:06 +00:00
Nicholas Nethercote
c8d150dbaa Various build system clean-ups and simplifications:
- Created Makefile.tool-tests.am, put standard AM_CFLAGS et al for tests in
  it.
- A number of tests are shared between Helgrind and DRD.  They used to be
  built in both directories.  Now they are only built in helgrind/tests/,
  and the DRD .vgtest files just point to the executable in helgrind/tests/.
  Most of these (about 30) had the source files in helgrind/tests/;  I moved
  the three that were in drd/tests/ into helgrind/tests/ for consistency.
- Fixed rwlock_test, which was failing to run due to a wrong name in the
  .vgtest file.
- Removed remnants of unused 'hello' test for Memcheck.
- Avoided redundant flag specification in various places, esp.
  memcheck/tests/Makefile.am.
- Removed unnecessary _AIX guards in some Linux-only tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9202
2009-02-19 09:52:05 +00:00
Nicholas Nethercote
108768ee98 Merge r9175 (don't run inappropriate OS- and platform-specific tests) from
the DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9176
2009-02-16 00:42:10 +00:00
Nicholas Nethercote
4372b47de8 Merge some minor regtest updates from the DARWIN branch:
- avoid using <malloc.h> where it's not necessary, because on DARWIN it's
  called <malloc/malloc.h>
- filter the output of brk2 more, which allows the .stderr.exp2 file to be
  removed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9037
2009-01-23 00:02:07 +00:00
Nicholas Nethercote
ed322feb84 Rename all the arch/OS/platform-related variables in configure.in to make it
clearer what they mean:
- They all have VGCONF_ prefixes now, to indicate they come out of
  configure.in (and are clearly distinguished from the VGA_/VGO_/VGP_
  #defines passed in to C files).
- The ones that refer to the primary *or* secondary platform have _INCLUDES_
  in them.
- The ones that are in all-caps have a _CAPS suffix.

So, for example, what was VGP_X86_LINUX is now
VGCONF_PLATFORMS_INCLUDE_X86_LINUX, which is more verbose but also a lot
clearer.  The names of the #defines used in the C files (VGA_x86, VGO_linux,
etc) are unchanged.

cputest.c: changed to reflect the Valgrind installation's capabilities,
rather than the machine's capabilities.  In particular, if
--enable-only32bit is used on a 64-bit machine, then this program will claim
to only support 32-bits.  Also use the VGA/VGO/VGP macros which are clearer
than the __i386__ ones.  (This is partially merged from the DARWIN branch.)

configure.in: clean up the comments, distinguish different sections more
clearly, and generally make it more readable.

valgrind.pc.in: try to make this more accurate.  I doubt anyone's using it.
It doesn't appear to be set up to handle dual-architecture builds.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9031
2009-01-22 21:56:32 +00:00
Tom Hughes
6917b2e4e4 SSE3 and SSSE3 are two different things, so add a proper SSSE3 feature
test and use that to guard the SSSE3 tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8942
2009-01-12 15:26:59 +00:00
Julian Seward
684fac4a06 This should have been committed as part of r8623 (Fix longstanding bug
in dual-arch support).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8624
2008-09-19 09:27:02 +00:00
Julian Seward
40399aab00 Fix longstanding bug in dual-arch support, which originated in
memcheck/tests/Makefile.am and was copied into drd/tests/Makefile.am.

When building regtests for a 32-bit only build on a 64-bit CPU, the
use of $(VG_ARCH) in these Makefiles is incorrect, because VG_ARCH
will be set to the 64-bit architecture, not the 32-bit architecture.

See comments on VG_ARCH_PRI and VG_ARCH_MAX in configure.in for more
details.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8623
2008-09-19 09:02:19 +00:00
Bart Van Assche
a7e22b19a7 Fixed compiler warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8050
2008-05-12 16:48:25 +00:00
Julian Seward
a1fdd2393b Add a test case for #152818 (from Sergei Trofimovich)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8043
2008-05-11 10:45:29 +00:00
Julian Seward
e6177495b9 Try to fix build system breakage w.r.t. ssse3_misaligned. It isn't
created from a .def file so should not be included in INSN_TESTS.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7389
2008-02-10 17:46:46 +00:00
Julian Seward
f84adcc43f Only build the SSSE3 tests on machines whose assemblers know about
these instructions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7387
2008-02-09 12:07:40 +00:00
Julian Seward
8d76c51997 Add SSSE3 tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7385
2008-02-09 01:55:52 +00:00
Julian Seward
953e3c3059 Don't build SSE3 tests if the configure test determined that the assembler
does not know about SSE3 instructions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6657
2007-03-22 12:13:13 +00:00