]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
21 years agoInline function that's only used once.
Nicholas Nethercote [Sun, 24 Apr 2005 00:21:01 +0000 (00:21 +0000)] 
Inline function that's only used once.

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

21 years agoAdd intercepts for operator new(unsigned long) and operator
Julian Seward [Sun, 24 Apr 2005 00:04:42 +0000 (00:04 +0000)] 
Add intercepts for operator new(unsigned long) and operator
new[](unsigned long).  The 32-bit ones take unsigned int args, not
unsigned longs, and so the existing name-set did not capture them.

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

21 years agoHandle some artefacts resulting from memchecking of x87 floating-point
Julian Seward [Sat, 23 Apr 2005 23:41:46 +0000 (23:41 +0000)] 
Handle some artefacts resulting from memchecking of x87 floating-point
code (I64-typed PutI/GetI).

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

21 years agoAdd 64-bit values to the bogus-literal detector.
Julian Seward [Sat, 23 Apr 2005 23:26:29 +0000 (23:26 +0000)] 
Add 64-bit values to the bogus-literal detector.

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

21 years agoAdd 64-bit fast case handlers for loads/stores. On amd64,
Julian Seward [Sat, 23 Apr 2005 23:25:49 +0000 (23:25 +0000)] 
Add 64-bit fast case handlers for loads/stores.  On amd64,
MC_(helperc_LOADV8) compiles down to just 12 instructions for the
fast-path, which is pretty darn good.

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

21 years agoAllow memcheck to take account of VGA_STACK_REDZONE_SIZE -- that is,
Julian Seward [Sat, 23 Apr 2005 22:42:27 +0000 (22:42 +0000)] 
Allow memcheck to take account of VGA_STACK_REDZONE_SIZE -- that is,
account for the fact that on amd64 (really, on amd64-linux) the area
up to 128 bytes below the stack pointer is accessible.  This meant
moving the definitions of VGA_STACK_REDZONE_SIZE to tool-visible
places.

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

21 years agoHandle 8-byte value-check failures using a special fast-case fn (like
Julian Seward [Sat, 23 Apr 2005 22:38:38 +0000 (22:38 +0000)] 
Handle 8-byte value-check failures using a special fast-case fn (like
0,1,4 sized) rather than the generic one.  Remove size 2 since that
never seems to get used.

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

21 years agoMore code-generation cases.
Julian Seward [Sat, 23 Apr 2005 01:15:47 +0000 (01:15 +0000)] 
More code-generation cases.

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

21 years agoAdd a few cases arising from testing on amd64.
Julian Seward [Sat, 23 Apr 2005 01:14:51 +0000 (01:14 +0000)] 
Add a few cases arising from testing on amd64.

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

21 years agoUpdate.
Julian Seward [Fri, 22 Apr 2005 21:21:09 +0000 (21:21 +0000)] 
Update.

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

21 years agoComment-only change.
Julian Seward [Fri, 22 Apr 2005 21:20:47 +0000 (21:20 +0000)] 
Comment-only change.

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

21 years agoTidy up: remove lots of old code, rearrange order of functions
Julian Seward [Fri, 22 Apr 2005 21:10:28 +0000 (21:10 +0000)] 
Tidy up: remove lots of old code, rearrange order of functions
somewhat.

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

21 years agomc_LOADVn_slow: When loading from invalid addresses, mark loaded data
Julian Seward [Fri, 22 Apr 2005 20:23:27 +0000 (20:23 +0000)] 
mc_LOADVn_slow: When loading from invalid addresses, mark loaded data
as defined.

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

21 years agoMostly finish fixing fast-path cases. Also enhance sanity checking.
Julian Seward [Fri, 22 Apr 2005 16:29:19 +0000 (16:29 +0000)] 
Mostly finish fixing fast-path cases.  Also enhance sanity checking.

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

21 years agoFinish off fast cases for {LOAD,STORE}V{4,2,1} and do an inspection of
Julian Seward [Thu, 21 Apr 2005 22:16:29 +0000 (22:16 +0000)] 
Finish off fast cases for {LOAD,STORE}V{4,2,1} and do an inspection of
it.  Do fast cases for make_aligned_word32_{noaccess,writable}.

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

21 years agoAdd note.
Nicholas Nethercote [Thu, 21 Apr 2005 22:11:46 +0000 (22:11 +0000)] 
Add note.

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

21 years ago* Crank up the memcheck event-counting system, and enhance it to
Julian Seward [Thu, 21 Apr 2005 17:34:00 +0000 (17:34 +0000)] 
* Crank up the memcheck event-counting system, and enhance it to
  name the events, rather than just number them, which makes it a
  lot easier to use

* Based on that, fill in some fast-path cases
  {LOAD,STORE}V{4,2,1}.  The assembly code looks about the same
  length as it did before, on x86.  Fast-path cases for the
  stack have yet to be done.

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

21 years agoComment-only change
Nicholas Nethercote [Thu, 21 Apr 2005 02:37:54 +0000 (02:37 +0000)] 
Comment-only change

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

21 years agorm'd.
Julian Seward [Thu, 21 Apr 2005 01:57:44 +0000 (01:57 +0000)] 
rm'd.

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

21 years agoAdd an identity, Or8(x,0) --> x.
Julian Seward [Thu, 21 Apr 2005 01:35:48 +0000 (01:35 +0000)] 
Add an identity, Or8(x,0) --> x.

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

21 years agoFix some more insn selection cases required by Memcheck.
Julian Seward [Wed, 20 Apr 2005 22:57:11 +0000 (22:57 +0000)] 
Fix some more insn selection cases required by Memcheck.

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

21 years agoFix a bunch of 64-bit cases required amd64. Stop to ponder whether
Julian Seward [Wed, 20 Apr 2005 22:31:26 +0000 (22:31 +0000)] 
Fix a bunch of 64-bit cases required amd64.  Stop to ponder whether
there is a better way to handle the 'pessimising cast' family of
operations in such a way that Vex's back-end instruction selectors can
generate better code than they do now, with less verbosity and general
confusingness in the insn selectors.

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

21 years agoInitial rehash of Memcheck's shadow-space management to support both
Julian Seward [Wed, 20 Apr 2005 14:44:11 +0000 (14:44 +0000)] 
Initial rehash of Memcheck's shadow-space management to support both
32- and 64-bit targets, little- and big-endian.  It does more or less
work on x86 as-is, although is unusably slow since I have knocked out
all the fast-path cases and am concentrating on getting the baseline
functionality correct.  The fast cases will go back in in due course.

The fundamental idea is to retain the old 2-level indexing for speed,
even on a 64-bit target.  Since that's clearly unviable on a 64-bit
target, the primary map handles only first N gigabytes of address
space (probably to be set to 16, 32 or 64G).  Addresses above that are
handled slowly using an auxiliary primary map which explicitly lists
(base, &-of-secondary-map) pairs.  The goal is to have the
address-space-manager try and put everything below the 16/32/64G
boundary, so we hit the fast cases almost all the time.

Performance of the 32-bit case should be unaffected since the fast map
will always cover at least the lowest 4G of address space.

There are many word-size and endianness cleanups.

Jeremy's distinguished-map space-compression scheme is retained, in
modified form, as it is simple and seems effective at reducing
Memcheck's space use.

Note this is all subject to rapid change.

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

21 years agoAdd another redirect that we need. This has no effect at present
Julian Seward [Wed, 20 Apr 2005 14:32:32 +0000 (14:32 +0000)] 
Add another redirect that we need.  This has no effect at present
because the redirect syms are set up only after the initial read of
/proc/self/maps and by then ld-linux.so.2 is already aboard.  Fixing
this properly requires fixing the address space management stuff
properly.

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

21 years agoDisable Addrcheck builds whilst I'm doing bull-in-a-china-shop stuff
Julian Seward [Wed, 20 Apr 2005 14:30:19 +0000 (14:30 +0000)] 
Disable Addrcheck builds whilst I'm doing bull-in-a-china-shop stuff
with Memcheck.

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

21 years agoUpdate comment re PutI/GetI (comment-only change).
Julian Seward [Tue, 19 Apr 2005 23:06:11 +0000 (23:06 +0000)] 
Update comment re PutI/GetI (comment-only change).

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

21 years agoRenamed vg_errcontext.c as errormgr.c, and carved off the relevant parts of
Nicholas Nethercote [Tue, 19 Apr 2005 04:10:25 +0000 (04:10 +0000)] 
Renamed vg_errcontext.c as errormgr.c, and carved off the relevant parts of
core.h and tool.h into pub_core_errormgr.h and pub_tool_errormgr.h.  All
just to improve general modularity.

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

21 years agoFix two typos.
Nicholas Nethercote [Sat, 16 Apr 2005 14:58:34 +0000 (14:58 +0000)] 
Fix two typos.

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

21 years agoSome notes from memcheck size/endian hackery
Julian Seward [Sat, 9 Apr 2005 18:25:06 +0000 (18:25 +0000)] 
Some notes from memcheck size/endian hackery

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

21 years agoRecord useful info from Jeremy.
Julian Seward [Sat, 9 Apr 2005 18:24:19 +0000 (18:24 +0000)] 
Record useful info from Jeremy.

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

21 years agoAdded new assert macros vg_assert2 and tl_assert2 which allow you to print a
Nicholas Nethercote [Fri, 8 Apr 2005 23:28:23 +0000 (23:28 +0000)] 
Added new assert macros vg_assert2 and tl_assert2 which allow you to print a
string explaining more detail if the assertion fails (eg. the value of the
bogus variable) using printf-style format arguments.

One consequence of this is that you can do something like

  vg_assert2(0, "bad bad bad");

instead of calling VG_(core_panic).  The advantage of the new approach is
that it shows the file/function/line info for the failing code, whereas
VG_(core_panic)() does not.

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

21 years agoUpdate expected output.
Julian Seward [Thu, 7 Apr 2005 17:39:08 +0000 (17:39 +0000)] 
Update expected output.

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

21 years agoAdd exhaustive tests for pslldq/psrldq.
Julian Seward [Thu, 7 Apr 2005 17:32:20 +0000 (17:32 +0000)] 
Add exhaustive tests for pslldq/psrldq.

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

21 years agoComplete implementation of pslldq/psrldq. Also some whitespace changes.
Julian Seward [Thu, 7 Apr 2005 17:31:27 +0000 (17:31 +0000)] 
Complete implementation of pslldq/psrldq.  Also some whitespace changes.

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

21 years agoReword error messages in a not-quite-so-terse way.
Julian Seward [Thu, 7 Apr 2005 02:24:23 +0000 (02:24 +0000)] 
Reword error messages in a not-quite-so-terse way.

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

21 years agoEven more syscalls.
Julian Seward [Thu, 7 Apr 2005 02:23:50 +0000 (02:23 +0000)] 
Even more syscalls.

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

21 years agoHandle bsr{w,l,q} and allow bsfq.
Julian Seward [Thu, 7 Apr 2005 02:03:52 +0000 (02:03 +0000)] 
Handle bsr{w,l,q} and allow bsfq.

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

21 years agoFix comment.
Julian Seward [Thu, 7 Apr 2005 02:02:23 +0000 (02:02 +0000)] 
Fix comment.

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

21 years agoFix a nasty assembler bug, in the handling of Set64, arising from
Julian Seward [Thu, 7 Apr 2005 02:01:23 +0000 (02:01 +0000)] 
Fix a nasty assembler bug, in the handling of Set64, arising from
confusion over whether we were looking at a complete integer register
number or just the lower 3 bits of it.  Rename functions pertaining to
messing with integer register numbers in an attempt to stop this
happening in future.

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

21 years agoReinstate tests for bsf{w,l} and bsr{w,l}.
Julian Seward [Thu, 7 Apr 2005 01:56:21 +0000 (01:56 +0000)] 
Reinstate tests for bsf{w,l} and bsr{w,l}.

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

21 years agoMore AMD64 instructions: sfence, movnti, bsf{w,l,q}
Julian Seward [Wed, 6 Apr 2005 20:01:56 +0000 (20:01 +0000)] 
More AMD64 instructions: sfence, movnti, bsf{w,l,q}

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

21 years agoComment-only changes
Julian Seward [Wed, 6 Apr 2005 10:27:11 +0000 (10:27 +0000)] 
Comment-only changes

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

21 years agoAs per r1121, avoid WaW stalls writing the guest state for movss mem->reg.
Julian Seward [Wed, 6 Apr 2005 01:45:44 +0000 (01:45 +0000)] 
As per r1121, avoid WaW stalls writing the guest state for movss mem->reg.

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

21 years agoiselIntExpr64(const): save a precious register in the case where
Julian Seward [Wed, 6 Apr 2005 01:11:53 +0000 (01:11 +0000)] 
iselIntExpr64(const): save a precious register in the case where
the two halves have the same value.

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

21 years agoWhen generating IR for movsd mem->reg, don't first write the entire
Julian Seward [Wed, 6 Apr 2005 01:11:08 +0000 (01:11 +0000)] 
When generating IR for movsd mem->reg, don't first write the entire
guest reg with zeroes and then overwrite the lower half.  This forces
the back end to generate code which creates huge write-after-write
stalls in the memory system of P4s due to the different sized writes.
This apparently small change reduces the run-time of one
sse2-intensive floating point program from 145 seconds to 90 seconds
(--tool=none).

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

21 years agoAdd a pattern for 64UtoV128(LDle:I64(addr)), so as to generate a
Julian Seward [Wed, 6 Apr 2005 00:47:01 +0000 (00:47 +0000)] 
Add a pattern for 64UtoV128(LDle:I64(addr)), so as to generate a
single movsd.  This fixes a common, poorly handed case in generating
sse2 code.

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

21 years agoRemove --sloppy-malloc from man page.
Nicholas Nethercote [Tue, 5 Apr 2005 21:06:56 +0000 (21:06 +0000)] 
Remove --sloppy-malloc from man page.

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

21 years agoGet rid of the --sloppy-malloc= flag and the functionality it
Julian Seward [Tue, 5 Apr 2005 20:59:55 +0000 (20:59 +0000)] 
Get rid of the --sloppy-malloc= flag and the functionality it
controlled (rounding user malloc requests up to a multiple of 4).
Subsequent changes to memcheck made it more or less pointless, it is a
time waster in the malloc/free path, and nobody ever used it AFAIK.

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

21 years agoRemoved bogus (UInt) casts from the amd64 signal frame builder and some
Tom Hughes [Tue, 5 Apr 2005 18:36:05 +0000 (18:36 +0000)] 
Removed bogus (UInt) casts from the amd64 signal frame builder and some
unecessary casts and code from the x86 signal frame builders.

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

21 years agoRenamed and retyped the fields relating to valgrind's stack in os_state_t to
Nicholas Nethercote [Tue, 5 Apr 2005 02:49:09 +0000 (02:49 +0000)] 
Renamed and retyped the fields relating to valgrind's stack in os_state_t to
make their role clearer and their behaviour more consistent with the fields
describing the client's stack.  Also made the code in x86-linux/syscalls.c
and amd64-linux/syscalls.c more word-size-independent, which is not strictly
necessary but makes the code similarities between the two files more
obvious.

One consequence of this is that Valgrind's stack on AMD64 is now 16384 * 8
bytes, rather than 16384 * 4 bytes.

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

21 years agoWhenever the flags thunk is set, fill in all the fields, even NDEP
Julian Seward [Tue, 5 Apr 2005 01:54:19 +0000 (01:54 +0000)] 
Whenever the flags thunk is set, fill in all the fields, even NDEP
which isn't usually used.  This makes redundant-PUT elimination work
better, fixing a rather subtle optimisation bug.  For at least one
floating-point case this gives a significant speedup.  Consider a bb
like this:

    (no flag setting insns before inc)
    inc ...
    (no flag setting insns)
    add ...

inc sets CC_OP, CC_DEP1 and CC_NDEP; the latter is expensive because a
call to calculate_eflags_c is required.

add sets CC_OP, CC_DEP1 and CC_DEP2.  The CC_NDEP value is now
irrelevant, but because CC_NDEP is not overwritten, iropt cannot
remove the previous assignment to it, and so the expensive helper call
remains even though it is irrelevant.

This commit fixes that: By always setting NDEP to zero whenever its
value will be unused, any previous assignment to it will be removed by
iropt.

This change should be propagated to the amd64 front end too.

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

21 years ago#include <rude_words.h>. The recent change of denotation of no-op IR
Julian Seward [Mon, 4 Apr 2005 23:12:54 +0000 (23:12 +0000)] 
#include <rude_words.h>.  The recent change of denotation of no-op IR
statements from NULL to IRStmt_NoOp screwed up the how-much-to-unroll
heuristics in iropt, resulting in iropt being significantly less
enthusiastic about unrolling than it was before the change.  Gaaah!
This commit should fix it.

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

21 years agoRemoved references to client_stack_base which no longer exists.
Tom Hughes [Mon, 4 Apr 2005 07:15:04 +0000 (07:15 +0000)] 
Removed references to client_stack_base which no longer exists.

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

21 years agoRemove the x86-specific is_valid_data_size() test. Also, make any dataSize
Nicholas Nethercote [Mon, 4 Apr 2005 02:52:16 +0000 (02:52 +0000)] 
Remove the x86-specific is_valid_data_size() test.  Also, make any dataSize
greater than MIN_LINE_SIZE equal to MIN_LINE_SIZE.  This makes the
x86/fpu-28-108 regression test pass.

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

21 years ago64-bit cleanness -- use UWord instead of UInt.
Nicholas Nethercote [Mon, 4 Apr 2005 02:48:32 +0000 (02:48 +0000)] 
64-bit cleanness -- use UWord instead of UInt.

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

21 years agominor cleanup with the stack-related fields in ThreadState:
Nicholas Nethercote [Mon, 4 Apr 2005 02:41:42 +0000 (02:41 +0000)] 
minor cleanup with the stack-related fields in ThreadState:
- removed "stack_base" which wasn't used in any meaningful way
- added "client_" prefix to make it clear they concern the client's stack
- renamed "stack_size" as "client_stack_szB" to make the units clear

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

21 years agoDeal with apparently non-cfront compliant new[]/delete[] manglings
Julian Seward [Sun, 3 Apr 2005 20:04:52 +0000 (20:04 +0000)] 
Deal with apparently non-cfront compliant new[]/delete[] manglings
generated by the Portland Group's C++ compiler.

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

21 years agoReinstate ADC Iv, eAX.
Julian Seward [Sun, 3 Apr 2005 14:59:54 +0000 (14:59 +0000)] 
Reinstate ADC Iv, eAX.

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

21 years agogen_intercepts.pl doesn't exist any more.
Nicholas Nethercote [Sun, 3 Apr 2005 03:11:27 +0000 (03:11 +0000)] 
gen_intercepts.pl doesn't exist any more.

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

21 years agoUpdate expected outputs.
Julian Seward [Sun, 3 Apr 2005 00:16:11 +0000 (00:16 +0000)] 
Update expected outputs.

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

21 years agoIn vg_memory.c, allow the stack-change threshold to be specified by a
Julian Seward [Sat, 2 Apr 2005 23:40:59 +0000 (23:40 +0000)] 
In vg_memory.c, allow the stack-change threshold to be specified by a
command-line flag (--max-stackframe=number), rather than hardwiring it
to 2000000.  This is helpful for dealing with unruly Fortran programs
which want to allocate large arrays on the stack.

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

21 years agoMore amd64 system calls - emacs will now run under valgrind.
Tom Hughes [Sat, 2 Apr 2005 17:43:50 +0000 (17:43 +0000)] 
More amd64 system calls - emacs will now run under valgrind.

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

21 years agoA major overhaul of how malloc/free intercepts are done. The general
Julian Seward [Sat, 2 Apr 2005 17:38:59 +0000 (17:38 +0000)] 
A major overhaul of how malloc/free intercepts are done.  The general
idea is the same -- write functions with special names encoding
sonames and fn names, and have the redir mechanism notice them.
However the way the functions are generated is significantly changed:

* The name mangling scheme has been replaced with one which is just about
  simple enough not to need a preprocessing phase.  Hence
  vg_replace_malloc.c.base is replaced by vg_replace_malloc.c, and
  the preprocessor disappears.  The demangler in vg_symtab2.c changes
  accordingly.

* Kill off the horrendous LIBALIAS macro.  In return we have to
  enumerate all the redirections longhand, but this is not a big deal.

* Remove use of the GNUisms "attribute alias" and "attribute
  protected".

* Remove the hardwired assumption that any C++ new/new[]/etc symbols
  we might want to intercept are mangled in GNU style.

* Add more comments.

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

21 years agoGet cache detection going again on x86.
Tom Hughes [Sat, 2 Apr 2005 17:30:19 +0000 (17:30 +0000)] 
Get cache detection going again on x86.

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

21 years agoMake cache detection work on amd64.
Tom Hughes [Sat, 2 Apr 2005 17:26:07 +0000 (17:26 +0000)] 
Make cache detection work on amd64.

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

21 years agoRemove vg_instrument.c from the makefile.
Tom Hughes [Sat, 2 Apr 2005 17:25:34 +0000 (17:25 +0000)] 
Remove vg_instrument.c from the makefile.

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

21 years agoGet rid of apparently-redundant file.
Julian Seward [Sat, 2 Apr 2005 17:16:25 +0000 (17:16 +0000)] 
Get rid of apparently-redundant file.

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

21 years agoAssert that cpuid is available - this is just done to force the
Tom Hughes [Sat, 2 Apr 2005 17:01:52 +0000 (17:01 +0000)] 
Assert that cpuid is available - this is just done to force the
code from cpuid.S to be pulled in so that tools can use it.

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

21 years agoGet VG_(has_cpuid) and VG_(cpuid) working on amd64.
Tom Hughes [Sat, 2 Apr 2005 17:01:07 +0000 (17:01 +0000)] 
Get VG_(has_cpuid) and VG_(cpuid) working on amd64.

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

21 years agoAdd VGP_(setup_redirects) to the platform specific layers and use
Tom Hughes [Sat, 2 Apr 2005 15:53:01 +0000 (15:53 +0000)] 
Add VGP_(setup_redirects) to the platform specific layers and use
it to setup vsyscall redirects on amd64 and the _dl_sysinfo_int80
redirect on x86.

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

21 years agoIt seems deref_UInt is fine - socklen_t is a 32 bit value on amd64.
Tom Hughes [Sat, 2 Apr 2005 15:04:15 +0000 (15:04 +0000)] 
It seems deref_UInt is fine - socklen_t is a 32 bit value on amd64.

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

21 years agoDon't truncate symbol values in ELF symbol tables.
Tom Hughes [Sat, 2 Apr 2005 14:57:43 +0000 (14:57 +0000)] 
Don't truncate symbol values in ELF symbol tables.

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

21 years agoRemove a coupld of entries that have been dealt with.
Tom Hughes [Sat, 2 Apr 2005 14:46:54 +0000 (14:46 +0000)] 
Remove a coupld of entries that have been dealt with.

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

21 years agoEven more amd64 system calls.
Tom Hughes [Sat, 2 Apr 2005 11:39:56 +0000 (11:39 +0000)] 
Even more amd64 system calls.

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

21 years agoYet more amd64 system calls.
Tom Hughes [Fri, 1 Apr 2005 23:38:37 +0000 (23:38 +0000)] 
Yet more amd64 system calls.

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

21 years agoMore amd64 system calls.
Tom Hughes [Fri, 1 Apr 2005 23:22:36 +0000 (23:22 +0000)] 
More amd64 system calls.

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

21 years agoAdd a missing case. I guess it can't have been wildly popular :-)
Julian Seward [Fri, 1 Apr 2005 20:20:12 +0000 (20:20 +0000)] 
Add a missing case.  I guess it can't have been wildly popular :-)

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

21 years agoRemember to clear C2 after fsincos, as that actually makes it work
Julian Seward [Fri, 1 Apr 2005 20:19:20 +0000 (20:19 +0000)] 
Remember to clear C2 after fsincos, as that actually makes it work
right with reasonable-sized inputs.  This confirms fsincos as the
golden lemon of x87 floating point instructions, since Vex has by now
chomped through vast amounts of floating point code on x86 and this is
the first time this bug has come to light.

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

21 years agoRework the vsyscall redirections to work in pie code - the old form
Tom Hughes [Fri, 1 Apr 2005 18:58:09 +0000 (18:58 +0000)] 
Rework the vsyscall redirections to work in pie code - the old form
seemed to completely confuse the compiler and it was generating
nonsense code to get the address of the replacement routines.

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

21 years agoRun "make all" before "make install" as older versions of automake
Tom Hughes [Fri, 1 Apr 2005 08:07:54 +0000 (08:07 +0000)] 
Run "make all" before "make install" as older versions of automake
don't put a dependency between the install target and $(BUILT_SOURCES)
so doing a straight install doesn't work.

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

21 years agoMove the gettid system call to the linux specific section.
Tom Hughes [Thu, 31 Mar 2005 16:02:07 +0000 (16:02 +0000)] 
Move the gettid system call to the linux specific section.

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

21 years agoIncrease maximum translation size. This can happen when translating
Julian Seward [Thu, 31 Mar 2005 15:48:57 +0000 (15:48 +0000)] 
Increase maximum translation size.  This can happen when translating
long sequences of x86 insns with IR optimisation disabled, so the
tag-checking crap doesn't get knocked out like it usually does.

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

21 years agoRework the nightly build script to stop as soon as one of the build
Tom Hughes [Thu, 31 Mar 2005 10:19:59 +0000 (10:19 +0000)] 
Rework the nightly build script to stop as soon as one of the build
steps fails instead of carrying on with the other steps - this should
help ensure that the log fragment sent out contains useful information.

A second change is to ensure that if the regression tests complete
then the full results are included in the email - if they don't
complete then just the last 20 lines of output are sent as before.

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

21 years agoImplement the gettid system call which seems to have got lost in the merge.
Tom Hughes [Thu, 31 Mar 2005 09:09:07 +0000 (09:09 +0000)] 
Implement the gettid system call which seems to have got lost in the merge.

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

21 years agoUpdate helgrind to use the new mechanism to declare it's interface
Tom Hughes [Thu, 31 Mar 2005 07:59:35 +0000 (07:59 +0000)] 
Update helgrind to use the new mechanism to declare it's interface
routines to the core so that it will at least build.

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

21 years agoRename VG_(tool_interface), which is overly general and a bit verbose, as
Nicholas Nethercote [Thu, 31 Mar 2005 04:52:26 +0000 (04:52 +0000)] 
Rename VG_(tool_interface), which is overly general and a bit verbose, as
VG_(tdict).  Also make the typing more meaningful in vg_mallocfuncs_info.
And (barely) start removing the use of "TL_" names in the core.

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

21 years agoThis change reduces the number of calls to dlsym() when loading tools from a
Nicholas Nethercote [Thu, 31 Mar 2005 04:37:24 +0000 (04:37 +0000)] 
This change reduces the number of calls to dlsym() when loading tools from a
lot to one.  This required two basic changes.

1. Tools are responsible for telling the tool about any functions they
provide that the tool may call.  This includes basic functions like
TL_(instrument)(), functions that assist core services such as
TL_(pp_Error)(), and malloc-replacement-related functions like
TL_(malloc)().

2. Tools that replace malloc now specify the size of the heap block redzones
through an arg to the VG_(malloc_funcs)() function, rather than with a
variable VG_(vg_malloc_redzone_szB).

One consequence of these changes is that VG_(tool_init_dlsym)() no longer
needs to be generated by gen_toolint.pl.

There are a number of further improvements that could follow on from this one.
- Avoid the confusingly different definitions of the TL_() macro in the
  core vs. for tools.  Indeed, the functions provided by the tools now don't
  need to use the TL_() macro at all, as they can have arbitrary names.
- Remove a lot of the auto-generated stuff in vg_toolint.c and vg_toolint.h
  (indeed, it might be possible to not auto-generate these at all, which
  would be nice).
- The handling of VgToolInterface is currently split across vg_needs.c and
  vg_toolint.c, which isn't nice.

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

21 years agoMake the dispatcher code position independent so that PIE mode works.
Tom Hughes [Wed, 30 Mar 2005 23:36:28 +0000 (23:36 +0000)] 
Make the dispatcher code position independent so that PIE mode works.

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

21 years agoSupport a few more insns I ran across whilst trying to start up
Julian Seward [Wed, 30 Mar 2005 23:20:47 +0000 (23:20 +0000)] 
Support a few more insns I ran across whilst trying to start up
konqueror (mostly successfully) and mozilla (promising but
unsuccessful).

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

21 years agoAdd a folding rule for Mul64.
Julian Seward [Wed, 30 Mar 2005 23:19:46 +0000 (23:19 +0000)] 
Add a folding rule for Mul64.

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

21 years agoComment-only change
Julian Seward [Wed, 30 Mar 2005 19:31:18 +0000 (19:31 +0000)] 
Comment-only change

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

21 years agoCompletely get rid of VG_(instr_ptr_offset).
Julian Seward [Wed, 30 Mar 2005 19:04:29 +0000 (19:04 +0000)] 
Completely get rid of VG_(instr_ptr_offset).

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

21 years agoGet rid of the use of VG_(instr_ptr_offset) since we know what that is
Julian Seward [Wed, 30 Mar 2005 18:42:59 +0000 (18:42 +0000)] 
Get rid of the use of VG_(instr_ptr_offset) since we know what that is
at system-build time: OFFSET_amd64_RIP.  This saves an instruction on
the fast path, and reduces the number of PIE-difficulties by one.

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

21 years agoGenerate instruction-pointer offsets too.
Julian Seward [Wed, 30 Mar 2005 18:40:23 +0000 (18:40 +0000)] 
Generate instruction-pointer offsets too.

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

21 years agorm unused function
Julian Seward [Wed, 30 Mar 2005 18:26:52 +0000 (18:26 +0000)] 
rm unused function

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

21 years agoRe-enable 'xchg reg, mem'.
Julian Seward [Wed, 30 Mar 2005 18:20:48 +0000 (18:20 +0000)] 
Re-enable 'xchg reg, mem'.

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

21 years agoGet thew DWARF reading going on 64 bit machines.
Tom Hughes [Wed, 30 Mar 2005 15:05:46 +0000 (15:05 +0000)] 
Get thew DWARF reading going on 64 bit machines.

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

21 years agoDiscard the sys_socketcall wrapper (there is no socketcall system
Tom Hughes [Wed, 30 Mar 2005 08:22:38 +0000 (08:22 +0000)] 
Discard the sys_socketcall wrapper (there is no socketcall system
call on amd64) and add a proper sys_socket wrapper.

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

21 years agoReinstate Helgrind, to an extent: compile it, so that it doesn't bit-rot.
Nicholas Nethercote [Wed, 30 Mar 2005 04:13:56 +0000 (04:13 +0000)] 
Reinstate Helgrind, to an extent:  compile it, so that it doesn't bit-rot.
But don't regtest it, because they all just fail.

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

21 years agoUse cpp symbol __x86_64__ rather than __amd64__ on the advice of
Julian Seward [Tue, 29 Mar 2005 21:35:08 +0000 (21:35 +0000)] 
Use cpp symbol __x86_64__ rather than __amd64__ on the advice of
Michael Matz.

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