]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
13 years agos390: This is a pre-patch for DFP support. It renames certain
Florian Krohm [Sun, 7 Oct 2012 15:42:37 +0000 (15:42 +0000)] 
s390: This is a pre-patch for DFP support. It renames certain
identifiers to explicitly refer to BFP, as there will be counterparts
in the future for DFP.
Patch by Maran <maranp@linux.vnet.ibm.com>.
Part of fixing #307113.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2547

13 years agos390: Add a few more test from olden times.
Florian Krohm [Sun, 7 Oct 2012 04:00:48 +0000 (04:00 +0000)] 
s390: Add a few more test from olden times.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13027

13 years agos390: Add a few more testcases from long time ago.
Florian Krohm [Sat, 6 Oct 2012 18:02:46 +0000 (18:02 +0000)] 
s390: Add a few more testcases from long time ago.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13026

13 years agoCachegrind: use memory block numbers as tags.
Josef Weidendorfer [Fri, 5 Oct 2012 23:58:23 +0000 (23:58 +0000)] 
Cachegrind: use memory block numbers as tags.

This saves instructions in hot path, resulting in
3% improvement on average with perf benchmarks.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13025

13 years agocachegrind: replace huge macro with inlined functions
Josef Weidendorfer [Fri, 5 Oct 2012 23:58:17 +0000 (23:58 +0000)] 
cachegrind: replace huge macro with inlined functions

Makes modifications simpler in the future, and
should result in the same code.

This patch was already discussed some time ago on the
dev mailing list, and did not make a difference on
various architectures.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13024

13 years agoSome older kernels on s390 do not provide AT_PLATFORM.
Florian Krohm [Fri, 5 Oct 2012 23:29:38 +0000 (23:29 +0000)] 
Some older kernels on s390 do not provide AT_PLATFORM.
Add a prerequisite condition to make sure it's there.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13023

13 years agoChange uname based arch-check to match machine hardware name in sgcheck.
Petar Jovanovic [Thu, 4 Oct 2012 23:53:03 +0000 (23:53 +0000)] 
Change uname based arch-check to match machine hardware name in sgcheck.

Some hardware platforms will return "unknown" for 'uname -i', so it is more
accurate and common to run 'uname -m' which returns machine hardware name.
This way, some platforms that do not support sgcheck will avoid running tests
for it.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13022

13 years agoAllow a null pointer as the second argument to capget.
Tom Hughes [Thu, 4 Oct 2012 21:38:27 +0000 (21:38 +0000)] 
Allow a null pointer as the second argument to capget.
Patch from Mark Wielaard to fix BZ#307101.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13021

13 years agoFilter out memcpy symbol versions from test results.
Tom Hughes [Thu, 4 Oct 2012 20:41:12 +0000 (20:41 +0000)] 
Filter out memcpy symbol versions from test results.
Patch from Mark Wielaard to fix BZ#307290.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13020

13 years agoImplement a fake /proc/self/auxv file for linux systems.
Tom Hughes [Thu, 4 Oct 2012 20:27:38 +0000 (20:27 +0000)] 
Implement a fake /proc/self/auxv file for linux systems.
Patch from Mark Wielaard to fix BZ#253519.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13019

13 years agoFix valt_load_address value in pkgconfig file.
Tom Hughes [Thu, 4 Oct 2012 20:01:50 +0000 (20:01 +0000)] 
Fix valt_load_address value in pkgconfig file.
Patch from Mark Wielaard to fix BZ#307729.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13018

13 years agoUnbreak build on ppc64 (error: ‘EmWarn_PPC64_redir_underflow’ undeclared)
Philippe Waroquiers [Tue, 2 Oct 2012 20:35:21 +0000 (20:35 +0000)] 
Unbreak build on ppc64 (error: ‘EmWarn_PPC64_redir_underflow’ undeclared)

coregrind/m_translate.c does not compile on ppc64 (ppc32 maybe also?)
due to missing include file.
Note: libvex_emnote.h is unconditionally included, even if only
useful for ppc. I suppose we do not want #ifdef for that.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13017

13 years agoAdd include file.
Florian Krohm [Sun, 30 Sep 2012 20:30:40 +0000 (20:30 +0000)] 
Add include file.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13016

13 years agoMake header files compilable by itself to get two benefits:
Florian Krohm [Sun, 30 Sep 2012 20:30:17 +0000 (20:30 +0000)] 
Make header files compilable by itself to get two benefits:
- never have to worry about order of inclusion
- never have to figure out hidden dependencies in order to be
  able to include a file

git-svn-id: svn://svn.valgrind.org/vex/trunk@2546

13 years agoChange the return value of LibVEX_{Chain,UnChain,PatchProfInc}.
Florian Krohm [Sat, 29 Sep 2012 17:05:46 +0000 (17:05 +0000)] 
Change the return value of LibVEX_{Chain,UnChain,PatchProfInc}.
These functions now always return the address range that was
patched. Therefore, these functions no longer need knowledge
about I-cache coherency of the host system.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2545

13 years agofix n-i-bz report error for vgdb snapshot requested before execution
Philippe Waroquiers [Mon, 24 Sep 2012 21:50:16 +0000 (21:50 +0000)] 
fix n-i-bz    report error for vgdb snapshot requested before execution
Massif does not accept to take snapshots of heap before execution has started.
So, if such a snapshot is requested (using vgdb and option --vgdb-error=0),
then such a snapshot must be refused rather than causing an assert.
(problem reported by dark_footix@yahoo.fr)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13015

13 years agoUnbreak build on Mac_OS where __NR_mprotect is not defined.
Philippe Waroquiers [Mon, 24 Sep 2012 21:37:02 +0000 (21:37 +0000)] 
Unbreak build on Mac_OS where __NR_mprotect is not defined.
The test is not executed on Darwin but should compile.
(based on fix suggestion by Rich Coe)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13014

13 years agofix 307155 filter_gdb should filter out syscall-template.S T_PSEUDO
Philippe Waroquiers [Mon, 24 Sep 2012 21:12:41 +0000 (21:12 +0000)] 
fix 307155 filter_gdb should filter out syscall-template.S T_PSEUDO

With some glibc version (e.g. on fedora 16), gdb output contains
a line with T_PSEUDO which should be filtered out.

Patch from Mark Wielaard.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13013

13 years agos390: Add testcase for some integer comparison insns
Florian Krohm [Sun, 23 Sep 2012 00:42:49 +0000 (00:42 +0000)] 
s390: Add testcase for some integer comparison insns

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13012

13 years agoA new post.exp file that provides more details for overloaded-new test.
Petar Jovanovic [Fri, 21 Sep 2012 22:44:45 +0000 (22:44 +0000)] 
A new post.exp file that provides more details for overloaded-new test.

Valgrind for MIPS will give more details on the heap allocation functions
(operator new) than the existing post.exp presents.
This fixes massif/tests/overloaded-new for MIPS and likely other arch if they
provide the info.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13011

13 years agoImplement some extra DW_OPs - more constants and some unary operators.
Tom Hughes [Fri, 21 Sep 2012 09:12:30 +0000 (09:12 +0000)] 
Implement some extra DW_OPs - more constants and some unary operators.
Patch from Mark Wielaard on BZ#307038.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13010

13 years agoRename CfiOp to CfiBinop in preparation for adding unary operators.
Tom Hughes [Fri, 21 Sep 2012 09:04:27 +0000 (09:04 +0000)] 
Rename CfiOp to CfiBinop in preparation for adding unary operators.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13009

13 years agoWhen processing DW_OP_plus_uconst make sure we record an add, not
Tom Hughes [Fri, 21 Sep 2012 08:57:46 +0000 (08:57 +0000)] 
When processing DW_OP_plus_uconst make sure we record an add, not
whatever binary operation we happened to see last.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13008

13 years agoShorten the list of allocable registers for MIPS to fit Loongson MIPS32 mode.
Petar Jovanovic [Fri, 21 Sep 2012 00:06:14 +0000 (00:06 +0000)] 
Shorten the list of allocable registers for MIPS to fit Loongson MIPS32 mode.

In order to fit MIPS32 mode on Loongson and work around its issues, we avoid
use of odd single precision FP registers. This results in expected execution/
results of some FPU instructions on Loongson. Running FPU intensive tests has
not shown any performance decrease after the change is introduced.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2544

13 years agoIn function irExpr_to_AvailExpr: Replace if-chains with a switch stmt.
Florian Krohm [Thu, 20 Sep 2012 02:40:57 +0000 (02:40 +0000)] 
In function irExpr_to_AvailExpr: Replace if-chains with a switch stmt.
This is a followup to r2524.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2543

13 years agos390: Give function static linkage. Also avoids a compiler warning.
Florian Krohm [Thu, 20 Sep 2012 01:25:28 +0000 (01:25 +0000)] 
s390: Give function static linkage. Also avoids a compiler warning.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2542

13 years agoUpdate due to file renaming in VEX r2541.
Florian Krohm [Thu, 20 Sep 2012 01:22:53 +0000 (01:22 +0000)] 
Update due to file renaming in VEX r2541.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13007

13 years agos390: Rename host_s390_disasm.[ch] to s390_disasm.[ch] as they
Florian Krohm [Thu, 20 Sep 2012 01:22:10 +0000 (01:22 +0000)] 
s390: Rename host_s390_disasm.[ch] to s390_disasm.[ch] as they
are not really host specific.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2541

13 years agoUpdate URLs for new Principles of Operations (SA22-7832-09).
Florian Krohm [Wed, 19 Sep 2012 16:43:30 +0000 (16:43 +0000)] 
Update URLs for new Principles of Operations (SA22-7832-09).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13006

13 years agos390: Fix another harmless unop/binop field mixup.
Florian Krohm [Wed, 19 Sep 2012 16:01:21 +0000 (16:01 +0000)] 
s390: Fix another harmless unop/binop field mixup.
Spotted by Maran <maranp@linux.vnet.ibm.com>

git-svn-id: svn://svn.valgrind.org/vex/trunk@2540

13 years agoUpdate list of ignored files.
Florian Krohm [Wed, 19 Sep 2012 14:29:42 +0000 (14:29 +0000)] 
Update list of ignored files.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13002

13 years agoAnother exp file for tc23_bogus_condwait.c.
Petar Jovanovic [Wed, 19 Sep 2012 12:48:09 +0000 (12:48 +0000)] 
Another exp file for tc23_bogus_condwait.c.

struct pthread_mutex_t is different on MIPS32 and x86_64, and thus passing a
bogus mutex pthread_cond_wait (line 72) will corrupt memory in a different way
on two platforms. This causes the subsequent call to pthread_cond_wait to fail
on MIPS and i386 but not on x86_64.

This change fixes helgrind/tests/tc23_bogus_condwait on MIPS and i386.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13001

13 years agoAdding tc19_shadowmem.stderr.exp-mips32 to match different output.
Petar Jovanovic [Wed, 19 Sep 2012 11:51:31 +0000 (11:51 +0000)] 
Adding tc19_shadowmem.stderr.exp-mips32 to match different output.

Writing to a double is done via two store-word instructions on MIPS platforms.
Thus, Helgrind will report "Possible data race during write of size 4" twice on
subsequent locations on MIPS instead of a single "Possible data race during
write of size 8". New exp file is added to cover this case.
This fixes helgrind/tests/tc19_shadowmem on MIPS.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13000

13 years agoUpdates for hfp insns.
Florian Krohm [Tue, 18 Sep 2012 21:15:54 +0000 (21:15 +0000)] 
Updates for hfp insns.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12999

13 years agoAdd exp file for tc20_verifywrap due to different errno values on MIPS.
Petar Jovanovic [Tue, 18 Sep 2012 21:02:59 +0000 (21:02 +0000)] 
Add exp file for tc20_verifywrap due to different errno values on MIPS.

Different error numbers on MIPS require us to add an extra exp file for this
test. EDEADLK is 45 on MIPS (and not 35), and EOPNOTSUPP is 122 (and not 95).
Furthermore, sem_post will pass due to different implementation on MIPS (in
comparison to x86_64), and thus one error less has to be reported in the log.

This fixes helgrind/tests/tc20_verifywrap.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12998

13 years agos390: Add testcases for srnm and srnmb. Update opcode status list.
Florian Krohm [Tue, 18 Sep 2012 20:25:23 +0000 (20:25 +0000)] 
s390: Add testcases for srnm and srnmb. Update opcode status list.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12997

13 years agos390: Update IR generation for the SRNM insn.
Florian Krohm [Tue, 18 Sep 2012 20:24:38 +0000 (20:24 +0000)] 
s390: Update IR generation for the SRNM insn.
Add support for the SRNMB insn.
New emulation warning EmWarn_S390X_invalid_rounding.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2538

13 years agoEnable wrappers for sys_settimeofday and sys_stime on MIPS.
Petar Jovanovic [Tue, 18 Sep 2012 17:19:36 +0000 (17:19 +0000)] 
Enable wrappers for sys_settimeofday and sys_stime on MIPS.

Enable wrappers for MIPS for the following two system calls:

- sys_settimeofday, and
- sys_stime.

Resolves https://bugs.kde.org/show_bug.cgi?id=306783
Patch contributed bederic M. <dark_footix@yahoo.fr>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12995

13 years agoUpdate for 3.8.1.
Julian Seward [Tue, 18 Sep 2012 07:03:27 +0000 (07:03 +0000)] 
Update for 3.8.1.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12993

13 years agoUpon successful run, remove temporary files.
Florian Krohm [Mon, 17 Sep 2012 21:20:06 +0000 (21:20 +0000)] 
Upon successful run, remove temporary files.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12991

13 years agoAdd missing header files. Building from tarball works again.
Florian Krohm [Mon, 17 Sep 2012 18:54:44 +0000 (18:54 +0000)] 
Add missing header files. Building from tarball works again.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12990

13 years agoUpdate.
Julian Seward [Mon, 17 Sep 2012 18:20:29 +0000 (18:20 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12989

13 years agoFix inconsistent comment (== BRANCH_3_8 r12987)
Julian Seward [Mon, 17 Sep 2012 18:20:06 +0000 (18:20 +0000)] 
Fix inconsistent comment (== BRANCH_3_8 r12987)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12988

13 years agoInclude autogen.sh in the tarfile. See #306310.
Julian Seward [Mon, 17 Sep 2012 17:17:00 +0000 (17:17 +0000)] 
Include autogen.sh in the tarfile.  See #306310.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12983

13 years agoIntercept __GI_memmove on Linux. Fixes #306612.
Julian Seward [Mon, 17 Sep 2012 15:44:15 +0000 (15:44 +0000)] 
Intercept __GI_memmove on Linux.  Fixes #306612.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12982

13 years agoAdd tests for: uqsub16 shadd16 uhsub8 uhsub16. See #304035.
Julian Seward [Mon, 17 Sep 2012 15:29:53 +0000 (15:29 +0000)] 
Add tests for: uqsub16 shadd16 uhsub8 uhsub16.  See #304035.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12981

13 years agoHandle Iop_QSub16Ux2, needed in fix for #304035.
Julian Seward [Mon, 17 Sep 2012 15:28:46 +0000 (15:28 +0000)] 
Handle Iop_QSub16Ux2, needed in fix for #304035.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12980

13 years agoAdd support for: uqsub16 shadd16 uhsub8 uhsub16. Fixes #304035.
Julian Seward [Mon, 17 Sep 2012 15:27:58 +0000 (15:27 +0000)] 
Add support for: uqsub16 shadd16 uhsub8 uhsub16.  Fixes #304035.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2533

13 years agoAdd test cases for PCMPxSTRx variant $0x46. See #306664.
Julian Seward [Mon, 17 Sep 2012 13:43:57 +0000 (13:43 +0000)] 
Add test cases for PCMPxSTRx variant $0x46.  See #306664.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12979

13 years agoFix PCMPxSTRx variant $0x46. Fixes #306664.
Julian Seward [Mon, 17 Sep 2012 13:40:11 +0000 (13:40 +0000)] 
Fix PCMPxSTRx variant $0x46.  Fixes #306664.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2532

13 years agoSTM<c>.W <Rn>{!},<registers> (Encoding T2): allow the base register to
Julian Seward [Mon, 17 Sep 2012 11:37:43 +0000 (11:37 +0000)] 
STM<c>.W <Rn>{!},<registers> (Encoding T2): allow the base register to
appear in the list in any position, provided that writeback is not
selected.  Fixes #306297.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2531

13 years agoUpdate.
Julian Seward [Mon, 17 Sep 2012 08:37:33 +0000 (08:37 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12978

13 years agoBe more flexible by allowing the compile command to be prefixed,
Florian Krohm [Sat, 15 Sep 2012 19:31:07 +0000 (19:31 +0000)] 
Be more flexible by allowing the compile command to be prefixed,
e.g. ccache gcc whatever... This fixes bugzilla #252955.
Patch from  Stephen McCamant <smcc@CS.Berkeley.EDU>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12977

13 years agoAdding new exp file for tc18_semabuse in helgrind.
Petar Jovanovic [Sat, 15 Sep 2012 02:36:21 +0000 (02:36 +0000)] 
Adding new exp file for tc18_semabuse in helgrind.

The existing tc18_semabuse.stderr.exp expects that sem_post on a bogus semaphore
will fail, yet it does not on platforms such as MIPS or ARM. This is specific to
implementation of sem_post for i386/x86_64 that has some assumptions such as that
'private' field is not clobbered. This will eventually result in different
parameter passed to syscall and thus different output is encountered.
This change fixes helgrind/tests/tc18_semabuse for MIPS.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12976

13 years agos390: Add a testcase for 32/64-bit bfp comparison insns.
Florian Krohm [Sat, 15 Sep 2012 02:22:46 +0000 (02:22 +0000)] 
s390: Add a testcase for 32/64-bit bfp comparison insns.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12975

13 years agoSetup correct minimum malloc'd block size for MIPS.
Petar Jovanovic [Sat, 15 Sep 2012 01:04:06 +0000 (01:04 +0000)] 
Setup correct minimum malloc'd block size for MIPS.

Correct minimum malloc's block size for MIPS is 8.
This fixes massif/tests/big-alloc.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12974

13 years agoMark revision 12964 to be merged in 3.8.1
Philippe Waroquiers [Fri, 14 Sep 2012 21:18:00 +0000 (21:18 +0000)] 
Mark revision 12964 to be merged in 3.8.1
(this revision fixes some missing files in the release tarball)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12973

13 years agoAdd a test which checks the leak search recovery mechanism
Philippe Waroquiers [Fri, 14 Sep 2012 21:10:15 +0000 (21:10 +0000)] 
Add a test which checks the leak search recovery mechanism

The leak search must recover if unreadable pages are scanned.
This test creates such unreadable pages by doing non SIMD mprotect
syscall (not seen by the aspacemgr).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12972

13 years agoUpdate for s390.
Florian Krohm [Fri, 14 Sep 2012 16:07:37 +0000 (16:07 +0000)] 
Update for s390.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12971

13 years agoEnable pre-wrapper for sys_shutdown for MIPS.
Petar Jovanovic [Fri, 14 Sep 2012 13:12:37 +0000 (13:12 +0000)] 
Enable pre-wrapper for sys_shutdown for MIPS.

Small change to enable wrapper for sys_shutdown for MIPS.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12970

13 years agoConstify the format string in a few printf-like functions.
Florian Krohm [Thu, 13 Sep 2012 20:21:42 +0000 (20:21 +0000)] 
Constify the format string in a few printf-like functions.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2530

13 years agoAdjust the vbit tester to deal with shift operations that require
Florian Krohm [Thu, 13 Sep 2012 19:41:12 +0000 (19:41 +0000)] 
Adjust the vbit tester to deal with shift operations that require
an immediate constant as the shift amount. This is needed for
powerpc Iop_ShlD64 etc. What it basically means that we do not
iterate over the bits in the 2nd operand because there are no
V-bits to set. An immediate constant is always completely defined.
Fixes bugzilla #305948.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12969

13 years agoTweak the IR injector so it can handle an immediate operand for
Florian Krohm [Thu, 13 Sep 2012 19:33:24 +0000 (19:33 +0000)] 
Tweak the IR injector so it can handle an immediate operand for
shift operations. This is needed for Iop_ShlD64 and the like on
powerpc where the shift amount is an immediate field in the insn.
Part of fixing bugzilla #305948.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2529

13 years agoAvoid compiler warning.
Florian Krohm [Thu, 13 Sep 2012 15:58:01 +0000 (15:58 +0000)] 
Avoid compiler warning.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2528

13 years agos390: Add testcase for bfp multiply-and-add/sub
Florian Krohm [Thu, 13 Sep 2012 15:09:53 +0000 (15:09 +0000)] 
s390: Add testcase for bfp multiply-and-add/sub

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12968

13 years agos390: Handle S390_BFP_NABS correctly for 128-bit arguments.
Florian Krohm [Thu, 13 Sep 2012 03:13:26 +0000 (03:13 +0000)] 
s390: Handle S390_BFP_NABS correctly for 128-bit arguments.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2527

13 years agos390: Add testcase for square root and load positive/negative/complement.
Florian Krohm [Thu, 13 Sep 2012 03:04:23 +0000 (03:04 +0000)] 
s390: Add testcase for square root and load positive/negative/complement.
Tests are for 32/64-bit values only.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12967

13 years agos390: Fix s390_emit_SFPC. That insn never required two registers.
Florian Krohm [Wed, 12 Sep 2012 19:52:16 +0000 (19:52 +0000)] 
s390: Fix s390_emit_SFPC. That insn never required two registers.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2526

13 years agos390x: Testcases for floating point 32/64-bit. Related to VEX r2525.
Florian Krohm [Wed, 12 Sep 2012 19:40:14 +0000 (19:40 +0000)] 
s390x: Testcases for floating point 32/64-bit. Related to VEX r2525.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12966

13 years agos390: Change the handling of S390_ROUND_PER_FPC (which indicates that the
Florian Krohm [Wed, 12 Sep 2012 19:38:42 +0000 (19:38 +0000)] 
s390: Change the handling of S390_ROUND_PER_FPC (which indicates that the
actual rounding mode is to be taken from the FPC register). Previously, this
was just mapped to S390_ROUND_NEAREST_EVEN, which obviously has correctness
issues.

First, we add a function get_bfp_rounding_mode_from_fpc to extract the
rounding mode from the guest FPC when building IR.
Second, have encode_bfp_rounding_mode invoke get_bfp_rounding_mode_from_fpc
whenever a S390_ROUND_PER_FPC is requested.
Third, in insn selection track whether (and if so to what value) the
rounding mode was set for the IRSB at hand. That way redundant assignments
can be avoided. This works well because the IR optimiser do a fine job
recognising end eliminating the expressions returned earlier from
get_bfp_rounding_more_from_fpc. So they get all mapped to the same IRTemp.
Note, VEX r2524 is essential to get this behaviour.
Fourth, remove the rounding more from the bfp_unop/binop/triop s390_insns.
Fifth, if the rounding mode can be set on the insn directly, prefer that
over setting it in the FPC and picking it up from there.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2525

13 years agoAdd three new kinds of AvailExpr: Mttc, Mtct, and Mtcc
Florian Krohm [Wed, 12 Sep 2012 16:40:54 +0000 (16:40 +0000)] 
Add three new kinds of AvailExpr:  Mttc, Mtct, and Mtcc
namely for Mux0X expressions where one or both of the operands
is constant.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2524

13 years agos390: Fix FOC width. It's 4 bytes not 8.
Florian Krohm [Tue, 11 Sep 2012 23:06:02 +0000 (23:06 +0000)] 
s390: Fix FOC width. It's 4 bytes not 8.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12965

13 years agoFix 306310 3.8.0 release tarball missing some files
Philippe Waroquiers [Tue, 11 Sep 2012 19:53:01 +0000 (19:53 +0000)] 
Fix 306310 3.8.0 release tarball missing some files

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12964

13 years agos390: Remove insns for 128-bit BFP and merge with 32/64-bit. This
Florian Krohm [Mon, 10 Sep 2012 23:44:37 +0000 (23:44 +0000)] 
s390: Remove insns for 128-bit BFP and merge with 32/64-bit. This
eliminates code duplication.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2523

13 years agos390: More prep work bfp reorg. In the future unary/binary/ternary
Florian Krohm [Mon, 10 Sep 2012 03:09:04 +0000 (03:09 +0000)] 
s390: More prep work bfp reorg. In the future unary/binary/ternary
operations on bfp data will no longer require a rounding mode in the
s390_insn. Only type conversion operations need a rounding mode.
So in this patch S390_BFP_CONVERT is introduced and
S390_BFP128_CONVERT_TO/FROM are consolidated to S390_BFP128_CONVERT.
This also makes the representation of bfp and bfp128 symmetric.
s390_insn gets a new variant: s390_convert.
The type conversion ops get their own data type now: s390_conv_t

git-svn-id: svn://svn.valgrind.org/vex/trunk@2522

13 years agovalgrind: Support Xen toolstack process ioctls
Bart Van Assche [Sun, 9 Sep 2012 18:30:17 +0000 (18:30 +0000)] 
valgrind: Support Xen toolstack process ioctls

From: Ian Campbell <Ian.Campbell@citrix.com>

Under Xen the toolstack is responsible for managing the domains in
the system, e.g. creating, destroying, and otherwise manipulating
them.

To do this it uses a number of ioctls on the /proc/xen/privcmd
device. Most of these (the MMAPBATCH ones) simply set things up such
that a subsequenct mmap call will map the desired guest memory. Since
valgrind has no way of knowing what the memory contains we assume
that it is all initialised (to do otherwise would require valgrind to
be observing the complete state of the system and not just the given
process).

The most interesting ioctl is XEN_IOCTL_PRIVCMD_HYPERCALL which
allows the toolstack to make arbitrary hypercalls. Although the
mechanism here is specific to the OS of the guest running the
toolstack the hypercalls themselves are defined solely by the
hypervisor. Therefore I have split support for this ioctl into a part
in syswrap-linux.c which handles the ioctl itself and passes things
onto a new syswrap-xen.c which handles the specifics of the
hypercalls themselves. Porting this to another OS should just be a
matter of wiring up syswrap-$OS.c to decode the ioctl and call into
syswrap-xen.c. In the future we may want to split this into
syswrap-$ARCH-xen.c but for now this is x86 only.

The hypercall coverage here is pretty small but is enough to get
reasonable(-ish) results out of the xl toolstack when listing,
creating and destroying domains.

One issue is that the hypercalls which are exlusively used by the
toolstacks (as opposed to those used by guest operating systems) are
not considered a stable ABI, since the hypervisor and the lowlevel
tools are considered a matched pair. This covers the sysctl and
domctl hypercalls which are a fairly large chunk of the support
here. I'm not sure how to solve this without invoking a massive
amount of duplication. Right now this targets the Xen unstable
interface (which will shortly be released as Xen 4.2), perhaps I can
get away with deferring this problem until the first change .

On the plus side the vast majority of hypercalls are not of interest
to the toolstack (they are used by guests) so we can get away without
implementing them.

Note: a hypercall only reads as many words from the ioctl arg
struct as there are actual arguments to that hypercall and the
toolstack only initialises the arguments which are used. However
there is no space in the DEFN_PRE_TEMPLATE prototype to allow this to
be communicated from syswrap-xen.c back to syswrap-linux.c. Since a
hypercall can have at most 5 arguments I have hackily stolen ARG8 for
this purpose.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12963

13 years agos390: Prepare for bfp reorg. Change the emit functions for the
Florian Krohm [Sun, 9 Sep 2012 18:18:25 +0000 (18:18 +0000)] 
s390: Prepare for bfp reorg. Change the emit functions for the
convert-to-fixed and load-rounded instructions to emit the extended
form. E.g. change s390_emit_CEFBR to s390_emit_CEFBRA. In the future
we will take advantage of those insns if the host's hardware facilities
allow it.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2521

13 years agos390: Add asserts to s390_emit_XYZ functions for convert-to/from-logical.
Florian Krohm [Sun, 9 Sep 2012 18:12:28 +0000 (18:12 +0000)] 
s390: Add asserts to s390_emit_XYZ functions for convert-to/from-logical.
This should have been part of r2496 when those functions were added.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2520

13 years agoRestore unwind regs structure if VG_(use_CF_info) fails on MIPS.
Petar Jovanovic [Sun, 9 Sep 2012 01:56:56 +0000 (01:56 +0000)] 
Restore unwind regs structure if VG_(use_CF_info) fails on MIPS.

If VG_(use_CF_info) fails to find the next frame using loaded debug symbols, it
will still change the data in uregs. Thus, we need to have uregs_copy before
calling VG_(use_CF_info), and restore uregs if the call returns wrong data.
This fixes drd/tests/tc04_free_lock on MIPS.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12962

13 years agoCorrecting how load/store doubles are modelled on MIPS for big-endian.
Petar Jovanovic [Sun, 9 Sep 2012 01:10:59 +0000 (01:10 +0000)] 
Correcting how load/store doubles are modelled on MIPS for big-endian.

One of the previous changes, r2511, was correct for little-endian and introduced
a regression for big-endian MIPS. This corrects the endianness issues.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2519

13 years agos390: Fix another mixup. Did not cause problems due to same
Florian Krohm [Fri, 7 Sep 2012 21:18:42 +0000 (21:18 +0000)] 
s390: Fix another mixup. Did not cause problems due to same
field offset.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2518

13 years agoFix a mixup. This never caused a problem because the fields happened
Florian Krohm [Fri, 7 Sep 2012 15:00:53 +0000 (15:00 +0000)] 
Fix a mixup. This never caused a problem because the fields happened
to have the same offset.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2517

13 years agoUpdate Subversion ignore list
Bart Van Assche [Thu, 6 Sep 2012 14:29:24 +0000 (14:29 +0000)] 
Update Subversion ignore list

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12961

13 years agodrd: Suppress race reports on .got sections too
Bart Van Assche [Thu, 6 Sep 2012 14:08:26 +0000 (14:08 +0000)] 
drd: Suppress race reports on .got sections too

This is a slightly modified version of a patch provided by Petar Jovanovic
<petar.jovanovic@rt-rk.com>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12960

13 years agoAnnounce bug fix in NEWS.
Florian Krohm [Thu, 6 Sep 2012 03:26:50 +0000 (03:26 +0000)] 
Announce bug fix in NEWS.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12959

13 years agos390: Add a testcase for condition code computation for
Florian Krohm [Thu, 6 Sep 2012 03:22:16 +0000 (03:22 +0000)] 
s390: Add a testcase for condition code computation for
convert-to-fixed. See VEX r2516. Part of fixing bugzilla #306054.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12958

13 years agos390: Fix condition code computation for convert-to-fixed/logical
Florian Krohm [Thu, 6 Sep 2012 03:13:22 +0000 (03:13 +0000)] 
s390: Fix condition code computation for convert-to-fixed/logical
insns. Previously the condition code was computed based on the
to-be-converted value only. But that is not sufficient as testcase
none/tests/s390x/rounding-1 shows. The rounding mode needs to be
considered, too. Therefore, the rounding mode is now stored in the
flags thunk as well (in IRRoundingMode encoding). Note, that this is
done for *all* convert-to-fixed/logical insns. It's possible that some
of them do not need the rounding mode but I did not bother exploring
the fine print. Setting the rounding mode as it was on the incoming
insn certainly will not be detrimental so we can as well do it.
This patch fixes bugzilla #306054.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2516

13 years agos390: The load-rounded insns also need to issue an emulation
Florian Krohm [Wed, 5 Sep 2012 20:05:20 +0000 (20:05 +0000)] 
s390: The load-rounded insns also need to issue an emulation
warning when the floating point extension is not present and
m3 != 0.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2515

13 years agos390: Non-functional change.
Florian Krohm [Wed, 5 Sep 2012 19:54:08 +0000 (19:54 +0000)] 
s390: Non-functional change.
Rename enable_rounding_mode to enable_bfp_rounding_mode in
anticipation of dfp coming. Change its return value to be an
IRTemp which will be handy soon. Fix all call-sites.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2514

13 years agoBinary floating point cleanup. This was an area that was hushed up
Florian Krohm [Wed, 5 Sep 2012 04:19:09 +0000 (04:19 +0000)] 
Binary floating point cleanup. This was an area that was hushed up
a bit when the s390 port was first committed. Time to get it in shape.

This patch
- completes s390_round_t to list all rounding modes that can appear
  in a convert-to instruction
- adapts function encode_rounding_mode accordingly
- ensures that all s390_round_t -> IRRoundingMode conversions go through
  encode_rounding_mode

git-svn-id: svn://svn.valgrind.org/vex/trunk@2513

13 years agoAdd vassert for DFP shift value to make sure shift value is an immediate value.
Carl Love [Tue, 4 Sep 2012 22:09:48 +0000 (22:09 +0000)] 
Add vassert for DFP shift value to make sure shift value is an immediate value.
V-bit tester was putting shift value in a register for the DFP shift
instructions causing the test to crash, see bugzilla #305948.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2512

13 years agoLoad/store doubles on MIPS are modeled through Ity_F64 rather than two Ity_F32.
Petar Jovanovic [Tue, 4 Sep 2012 13:45:42 +0000 (13:45 +0000)] 
Load/store doubles on MIPS are modeled through Ity_F64 rather than two Ity_F32.

This patch changes how the load/store doublewords are modeled on MIPS.
Previously, this was modeled through two Ity_F32s which caused test reports to
be different to expected.
This fixes memcheck/tests/fprw.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2511

13 years agoEnable testing of primops on ARM platforms. (Florian Krohm)
Julian Seward [Mon, 3 Sep 2012 21:59:28 +0000 (21:59 +0000)] 
Enable testing of primops on ARM platforms.  (Florian Krohm)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12957

13 years agoUse "orr r9,r9,r9" as the magic insn for IR injection on ARM and
Julian Seward [Mon, 3 Sep 2012 21:51:02 +0000 (21:51 +0000)] 
Use "orr r9,r9,r9" as the magic insn for IR injection on ARM and
Thumb, since r13 is disallowed for many instructions in the Thumb
encoding.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12956

13 years agoAdd ARM front/back end support for IR injection.
Julian Seward [Mon, 3 Sep 2012 21:48:42 +0000 (21:48 +0000)] 
Add ARM front/back end support for IR injection.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2510

13 years agoUpdate testcase as a followup to VEX r2509.
Florian Krohm [Mon, 3 Sep 2012 17:45:15 +0000 (17:45 +0000)] 
Update testcase as a followup to VEX r2509.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12955

13 years agos390: Undo part of r2501. The "convert to fixed" opcodes always have an m3
Florian Krohm [Mon, 3 Sep 2012 17:41:22 +0000 (17:41 +0000)] 
s390: Undo part of r2501. The "convert to fixed" opcodes always have an m3
field -- independent of the floating point extension facility.
So do not issue an emulation warning for those opcodes.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2509

13 years agos390: Ensure proper size when calling get_otrack_shadow_offset_wrk.
Florian Krohm [Mon, 3 Sep 2012 17:34:22 +0000 (17:34 +0000)] 
s390: Ensure proper size when calling get_otrack_shadow_offset_wrk.
Also handle EMNOTE.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12954

13 years agoAdd bugzilla number.
Florian Krohm [Mon, 3 Sep 2012 15:39:19 +0000 (15:39 +0000)] 
Add bugzilla number.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12953

13 years agoUpdate, tracking merged-to-3_8 fixes.
Julian Seward [Mon, 3 Sep 2012 07:24:30 +0000 (07:24 +0000)] 
Update, tracking merged-to-3_8 fixes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12952