Commit Graph

89 Commits

Author SHA1 Message Date
Julian Seward
ce1682b2d8 Track API changes in vex r1272.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4159
2005-07-18 11:41:15 +00:00
Julian Seward
f13ea11bf8 Clean up endianness macros a bit. Now pub_tool_basics.h defines
VG_LITTLEENDIAN or VG_BIGENDIAN and that's what should be used.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4142
2005-07-10 00:53:42 +00:00
Julian Seward
87b4da1f0b Create and use bigendian versions of MC_(helperc_{LOAD,STORE}V{2,4,8}).
This involved some serious nastyness from the Department of Cpp Abuse.

Memcheck still bombs on ppc32 for unknown reasons.

There are still endianness issues within these functions, I think.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4129
2005-07-08 01:29:33 +00:00
Julian Seward
613e5c540e Scan the entire BB looking for "bogus literals"* before instrumenting
any of it, so as to avoid any problems arising from switching from one
scheme to the other half-way through.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4117
2005-07-06 19:42:23 +00:00
Julian Seward
b59cbb45c8 Extensively re-analyse, re-check and revise the scheme for expensive
handling of integer EQ/NE, which can sometimes do better than the
naive scheme when the inputs are partially defined.  I never was
convinced it was correct before, but now I am.  Regtest to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4115
2005-07-06 18:48:59 +00:00
Julian Seward
1cfc0e7971 Track Vex API change (r1239, introduction of endianness-indications in
IR loads and stores.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4072
2005-06-30 23:33:37 +00:00
Tom Hughes
e966ae4bc0 Improve handling of inlined strlen on amd64 by using the expensive
mode for 64 bit add and subtract operations when the bogus literals
flags is set and by adding two new constants to the list of bogus
literals.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4037
2005-06-27 08:11:01 +00:00
Cerion Armour-Brown
98d330a363 Added DivU32,DivS32 to memcheck translation (lazy)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4004
2005-06-23 15:28:34 +00:00
Nicholas Nethercote
f174930b23 Final commit for the initial modularisation pass:
- Broke part of m_scheduler off into a new module m_threadstate.  It
  contains ThreadState, VG_(threads)[] and some basic operations on the
  thread table.  All simple stuff, the complex stuff stays in m_scheduler.
  This avoids lots of circular dependencies between m_scheduler and other
  modules.

- Managed to finally remove core.h and tool.h, double hurrah!

- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
  include by every single C file.

- Lots of little cleanups and changes related to the above.

- I even did a small amount of documentation updating.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3944
2005-06-19 01:24:32 +00:00
Julian Seward
9cf5c0e395 Handle Clz64 and Ctz64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3863
2005-06-09 21:31:55 +00:00
Nicholas Nethercote
eb2d0a7d06 Modularised assertions and panics in m_libcassert.
As part of this, killed the VG_STRINGIFY macro, which was used to expand
out names like "VG_(foo)" and "vgPlain_foo" in assertion failure
messages.  This is good since we actually want the "VG_(foo)" form used
in these messages.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3842
2005-06-04 19:16:06 +00:00
Nicholas Nethercote
dbc8c6d99c Modularise printing functions in m_libcprint.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3840
2005-06-03 03:08:39 +00:00
Julian Seward
a2b0b088db Use the new IRStmt_AbiHints created by the amd64 front end. This
finally makes memcheck able to reliably track the definedness of the
stack on amd64.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3686
2005-05-12 18:05:00 +00:00
Nicholas Nethercote
a08662c48c Big clean-up: changed the core/tool interface to be mediated entirely
through the VG_(tdict) function dictionary, rather than using TL_(foo)
functions.

This facilitated the following changes:

- Removed the "TL_" prefix, which is no longer needed.

- Removed the auto-generated files vg_toolint.[ch], which were no longer
  needed, which simplifies the build a great deal.  Their (greatly
  streamlined) contents went into core.h and vg_needs.h (and will soon
  go into a new module defining the core/tool interface).  
  
  This also meant that tool.h.base reverted to tool.h (so no more
  accidentally editing tool.h and not having the changes go into the
  repo, hooray!)  And gen_toolint.pl was removed.  And toolfuncs.def was
  removed.

- Removed VG_(missing_tool_func)(), no longer used.

- Bumped the core/tool interface major version number to 8.  And I
  killed the minor version number, which was never used.  The layout
  of the ToolInfo struct is such that this should not cause problems.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3644
2005-05-09 01:02:08 +00:00
Julian Seward
1b5003d2d9 Handle Iop_Neg{8,16,32}.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3601
2005-05-03 12:22:00 +00:00
Julian Seward
a7b8e8ea58 Handle various new 64-bit integer primops.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3576
2005-04-27 11:40:27 +00:00
Julian Seward
a4eecff656 * Modify the instrumenter to use the new primops introduced in
vex rev 1144.

* Observe that mkLazy2 generates IR which often turns into 
  long and slow code sequences in the back end, primarily because
  PCast operations are expensive.  Add a couple of special 
  cases which give noticably better performance when handling
  FP-intensive code on x86.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3572
2005-04-26 23:49:24 +00:00
Tom Hughes
3a9a923718 Support the 64 bit comparison instructions which vex is now using.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3570
2005-04-26 07:44:48 +00:00
Julian Seward
c97ba2bbaa Add 64-bit values to the bogus-literal detector.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3548
2005-04-23 23:26:29 +00:00
Julian Seward
c0967c9762 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
2005-04-23 22:38:38 +00:00
Julian Seward
59505fcb00 Add a few cases arising from testing on amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3544
2005-04-23 01:14:51 +00:00
Julian Seward
2d1062ccdb 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
2005-04-20 22:31:26 +00:00
Julian Seward
94ee81b0b9 Add a missing case. I guess it can't have been wildly popular :-)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3496
2005-04-01 20:20:12 +00:00
Julian Seward
cfdf00d9bd Track Vex API change in rev 1062: pass both the guest and host word
sizes to the instrumentatation functions.  Make most of the tools
abort if they are not the same; we can't handle that case yet.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3397
2005-03-21 00:55:49 +00:00
Julian Seward
f1a3994582 Track Vex API (semantics) changes in rev 1061: introduction of IRStmt_NoOp.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3396
2005-03-21 00:27:41 +00:00
Julian Seward
753b8dcf94 Track minor Vex API changes that occurred in Vex rev 1059.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3393
2005-03-20 18:55:15 +00:00
Julian Seward
5506291e56 Make existing tools aware of IR instruction marks. (They ignore them,
though).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3381
2005-03-16 18:20:21 +00:00
Nicholas Nethercote
05fe123a9e Update copyright notice for 2005 on all relevant files. Don't bother trying
to be selective about it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3303
2005-03-12 16:22:54 +00:00
Julian Seward
8d9a222274 Track renaming of Vex's Iop_*128* primops to Iop_*V128*.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3232
2005-02-07 23:50:18 +00:00
Julian Seward
990997c313 Handle Add64/Sub64 (naively).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3224
2005-01-15 20:43:58 +00:00
Julian Seward
9091a78381 Add support for 64-bit SIMD primops.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3223
2005-01-13 19:17:06 +00:00
Julian Seward
022eef96c2 Handle IRStmt_MFence in the tools.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3217
2005-01-07 12:10:21 +00:00
Julian Seward
d703ca2b44 Finishing installing PaulM's improved accuracy handling for Add/Sub,
and also do better for CmpEQ/CmpNE.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3212
2004-12-31 01:16:11 +00:00
Julian Seward
97c1a3baee mkUifU: add missing case
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3205
2004-12-17 01:24:54 +00:00
Julian Seward
b7a642c80b Handle Iop_Sar16.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3197
2004-12-14 01:15:31 +00:00
Julian Seward
3ad2ff4302 Complete enough 128-bit vector stuff in memcheck so that SSE2 works.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3192
2004-12-12 16:45:06 +00:00
Julian Seward
bc929b0e2d Support for 64x2 vector floating point.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3191
2004-12-10 21:44:22 +00:00
Julian Seward
84d094a9f8 Stuff to make Memcheck work with SSE1 instructions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3190
2004-12-10 18:57:51 +00:00
Julian Seward
2af2c78613 Basics for 128-bit SIMD code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3189
2004-12-10 14:58:26 +00:00
Julian Seward
96c2c41a93 Fix enough stuff so that x86 MMX tests work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3188
2004-12-10 13:35:22 +00:00
Julian Seward
ba3c8e024c Fix enough stuff so that x86 floating point tests work properly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3187
2004-12-10 13:17:55 +00:00
Julian Seward
798a984cea Build fixes for gcc-2.95.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3132
2004-11-28 14:25:01 +00:00
Julian Seward
26e2eb2b4a When doing pessimistic lazy propagation through a dirty helper call,
do not consider inputs from those parts of the guest state marked as
read (or modified) which which are declared to be always-defined, and
dually do write outputs to those parts of the guest state written (or
modified) which are declared to be always-defined.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3119
2004-11-26 19:17:47 +00:00
Julian Seward
d6a28c4ff3 Make Memcheck compilable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3065
2004-11-22 20:19:51 +00:00
Nicholas Nethercote
454ab569fe Converted the SK_ prefix to TL_ everywhere.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3060
2004-11-22 18:33:15 +00:00
Nicholas Nethercote
3093a1768b Renamed VG_(skin_panic) as VG_(tool_panic).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3057
2004-11-22 18:02:32 +00:00
Nicholas Nethercote
cf9cf2a220 Renamed sk_assert() as tl_assert().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3055
2004-11-22 17:18:48 +00:00
Nicholas Nethercote
a545bc15cc Tweaked sanity-checking: made function naming more consistent, removed
unnecessarily global functions from vg_include.h, etc.

Also tweaked printing of malloc stats.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2562
2004-08-03 23:14:00 +00:00
Nicholas Nethercote
38ff4e69d1 Comment changes only: s/skin/tool/
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2555
2004-08-03 13:29:09 +00:00
Nicholas Nethercote
a4069eaab5 Add missing SSE case for Memcheck's instrumentation (sigh).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2389
2004-04-26 13:06:16 +00:00