Commit Graph

532 Commits

Author SHA1 Message Date
Julian Seward
fedfefd683 Another day, another bunch of primops need doing ...
git-svn-id: svn://svn.valgrind.org/vex/trunk@532
2004-11-09 16:02:11 +00:00
Julian Seward
dca081e066 More primop support needed by memcheck.
git-svn-id: svn://svn.valgrind.org/vex/trunk@531
2004-11-09 16:01:40 +00:00
Julian Seward
38d1343963 Call specialised report-a-value-error helper functions rather than
endlessly having to pass a size parameter to a generic one.



git-svn-id: svn://svn.valgrind.org/vex/trunk@530
2004-11-08 18:55:47 +00:00
Julian Seward
590bb10d76 Learn how to assemble an x86 negl insn.
git-svn-id: svn://svn.valgrind.org/vex/trunk@529
2004-11-08 18:54:50 +00:00
Julian Seward
8c28cbe58d x86 host: translate Sub32(0,x) into a negl insn. This is a very
common idiom from Memcheck ("Left4").



git-svn-id: svn://svn.valgrind.org/vex/trunk@528
2004-11-08 18:53:52 +00:00
Julian Seward
61741b0263 Un-break eflag helper specialiser.
git-svn-id: svn://svn.valgrind.org/vex/trunk@527
2004-11-08 18:20:23 +00:00
Julian Seward
4123b17b0c x86 guest: reinstate specialisation of the flags thunk helper
functions following recent flags thunk hackery.


git-svn-id: svn://svn.valgrind.org/vex/trunk@526
2004-11-08 17:39:55 +00:00
Julian Seward
4c14dc7f93 x86 guest: majorly rehash eflags thunk scheme for a second time. See
detailed comment in priv/guest-x86/gdefs.h.  In short we move to a
4-word thunk so as to be able to present Memcheck with the data
dependencies we want, and at the same time allow iropt to easily
optimise away most of the helper calls that evaluate the thunk.
Hopefully this is the last change.

Comment in priv/guest-x86/gdefs.h also explains properly the
relationship between the thunk arrangements and how we expect Memcheck
to behave with respect to definedness of flags.



git-svn-id: svn://svn.valgrind.org/vex/trunk@525
2004-11-08 13:14:06 +00:00
Julian Seward
ff02ac1cfd Add mkIRExprVec_5.
git-svn-id: svn://svn.valgrind.org/vex/trunk@524
2004-11-08 13:10:44 +00:00
Julian Seward
87b8e7c7d0 Fill in more cases.
git-svn-id: svn://svn.valgrind.org/vex/trunk@523
2004-11-08 13:08:53 +00:00
Julian Seward
06bcc48a30 We need ever-more spill space ...
git-svn-id: svn://svn.valgrind.org/vex/trunk@522
2004-11-08 13:08:25 +00:00
Julian Seward
680525ffbb Memcheck: add helper functions to support 64-bit loads/stores. This
stuff all needs serious rethinking to make it work on 64-bit platforms
and on big-endian platforms.



git-svn-id: svn://svn.valgrind.org/vex/trunk@521
2004-11-07 18:46:22 +00:00
Julian Seward
d98dde9739 x86 code generation for 64-bit integer stuff, required by Memchecking
of floating point code.



git-svn-id: svn://svn.valgrind.org/vex/trunk@520
2004-11-07 18:45:15 +00:00
Julian Seward
fa866e574f Improve debug printing a bit.
git-svn-id: svn://svn.valgrind.org/vex/trunk@519
2004-11-07 01:00:26 +00:00
Julian Seward
0f9834426b Install a bogus-literals hack a la old UCode scheme, but do not use
it.  Instead, observe that all of the residual errors are from
stpcpy/strnlen in glibc.  Then observe that the redirect mechanism
seems to fail to redirect these to our "safe" equivalents.  Then,
finally realise that the redirect mechanism is defeated by vex's
cross-BB-chasing and specifically by chasing across function call
boundaries.

So, the good news is that giving --vex-guest-chase-thresh=0 makes all
these errors go away.  This should be straightforward to fix properly.



git-svn-id: svn://svn.valgrind.org/vex/trunk@518
2004-11-07 00:57:46 +00:00
Julian Seward
3aba48be13 rm debug printing.
git-svn-id: svn://svn.valgrind.org/vex/trunk@517
2004-11-06 17:02:03 +00:00
Julian Seward
9dad679609 Add more folding rules.
git-svn-id: svn://svn.valgrind.org/vex/trunk@516
2004-11-06 17:01:15 +00:00
Julian Seward
fb68f0bd0b Fix nasty bug with 32HLto64.
git-svn-id: svn://svn.valgrind.org/vex/trunk@515
2004-11-06 16:17:21 +00:00
Julian Seward
142e539188 Increase size of spill area.
git-svn-id: svn://svn.valgrind.org/vex/trunk@514
2004-11-06 16:10:39 +00:00
Julian Seward
53c1d54ed2 Fix 'make clean'.
git-svn-id: svn://svn.valgrind.org/vex/trunk@513
2004-11-06 16:10:08 +00:00
Julian Seward
e1e1dff71b Rename a var to avoid nameclashes during standalone testing.
git-svn-id: svn://svn.valgrind.org/vex/trunk@512
2004-11-06 14:22:03 +00:00
Julian Seward
dda7880b15 Add a complete standalone copy of the memcheck instrumenter so it can
be valgrinded.



git-svn-id: svn://svn.valgrind.org/vex/trunk@511
2004-11-06 14:20:54 +00:00
Julian Seward
79e1d19fa6 Delete all the old UCode stuff.
git-svn-id: svn://svn.valgrind.org/vex/trunk@510
2004-11-06 13:56:36 +00:00
Julian Seward
ec3a582b73 Tidy up, make readable, add comments. Does not change behaviour or
fix any problems.



git-svn-id: svn://svn.valgrind.org/vex/trunk@509
2004-11-06 13:51:48 +00:00
Julian Seward
33042596cf Try to make builds quieter.
git-svn-id: svn://svn.valgrind.org/vex/trunk@508
2004-11-06 13:50:54 +00:00
Julian Seward
b2d6867a8e Fix 'all' target to build nulgrind, lackey, addrcheck, memcheck.
git-svn-id: svn://svn.valgrind.org/vex/trunk@507
2004-11-06 12:31:16 +00:00
Julian Seward
eaafedd89c More fiddling in an attempt to make it work properly (so far
unsuccessful):

* in clean helper calls, take notice of exclusion-mask (mcx_mask)
  specifying which args to ignore.  Seems to have no effect.

* Add Paul-Mackerras-style expensive-add.  Seems to have no effect.

* When doing a shadow PUT, do not complain if uninitialised data
  is written to guest state areas which are marked in the layout info
  as 'always defined'.  This seems to help reduce the false positive
  rate, because (in guest x86) the CC_AUX field of the flags thunk
  is sometimes given an undefined value (old C flag) when setting
  the thunk after inc/dec.  Since we assume that no compiler would
  examine the C flag after inc/dec unless it knew the C flag before it
  was defined (inc/dec do not change C), this is assumed to be safe.



git-svn-id: svn://svn.valgrind.org/vex/trunk@506
2004-11-06 12:27:15 +00:00
Julian Seward
ad46569acf x86 guest: update description of which guest state bits are always
defined.



git-svn-id: svn://svn.valgrind.org/vex/trunk@505
2004-11-06 12:21:23 +00:00
Julian Seward
3249babbf3 IRCallee: add a mcx_mask field, through which front ends can pass
hints to Memcheck about which arguments in a helper call should be
ignored when it comes to computing lazy approximations of definedness
through that function.  Not sure if this mechanism needs to remain,
but for the time being ...



git-svn-id: svn://svn.valgrind.org/vex/trunk@504
2004-11-06 12:17:57 +00:00
Julian Seward
893f78e844 Further integration of baseblock stuff for shadow state. Get rid of
tons of now-irrelevant baseblock fields and offsets.  The layout
defined in coregrind/x86/state.c is now more or less (completely?)
target-independent: vex-defined guest state, vex-defined shadow guest
state, and vex-specified spill area.



git-svn-id: svn://svn.valgrind.org/vex/trunk@503
2004-11-06 12:14:43 +00:00
Julian Seward
a669c9c9e2 And-identity folding rule.
git-svn-id: svn://svn.valgrind.org/vex/trunk@502
2004-11-06 12:10:04 +00:00
Julian Seward
c8d35453a9 Track Vex API changes.
git-svn-id: svn://svn.valgrind.org/vex/trunk@501
2004-11-06 12:08:25 +00:00
Julian Seward
b6cbb527d5 x86 guest: un-break handling of eflags after inc/dec.
git-svn-id: svn://svn.valgrind.org/vex/trunk@500
2004-11-05 20:22:03 +00:00
Julian Seward
c7985f010b Debug printing wibble.
git-svn-id: svn://svn.valgrind.org/vex/trunk@499
2004-11-05 20:21:27 +00:00
Julian Seward
a4d61234a4 Make the 1.0.4 testbed work again.
git-svn-id: svn://svn.valgrind.org/vex/trunk@498
2004-11-05 20:14:54 +00:00
Julian Seward
1c2becc3b4 Oops, forgot to commit this earlier.
git-svn-id: svn://svn.valgrind.org/vex/trunk@497
2004-11-05 19:53:22 +00:00
Julian Seward
4001342f62 Major overhaul of x86 guest eflags handling, so as to make one
specific word of the thunk (CC_RES) have all data dependencies on
result of the flag setting operation.  The delayed-flag mechanism is
thusly modified so as to prevent Memcheck from giving false positives.



git-svn-id: svn://svn.valgrind.org/vex/trunk@496
2004-11-05 19:49:09 +00:00
Julian Seward
5cbf58bb7a Start adding floating point stuff to memcheck.
git-svn-id: svn://svn.valgrind.org/vex/trunk@495
2004-11-05 01:56:14 +00:00
Julian Seward
eb9bd3ab50 Add new primop 1Sto16.
git-svn-id: svn://svn.valgrind.org/vex/trunk@494
2004-11-05 01:55:46 +00:00
Julian Seward
c9a0018729 Fill in a few more cases.
git-svn-id: svn://svn.valgrind.org/vex/trunk@493
2004-11-04 20:27:37 +00:00
Julian Seward
5048dbe3ad Various plumbing to allow the optimiser (really, just a subset) to be
run post-instrumentation.



git-svn-id: svn://svn.valgrind.org/vex/trunk@492
2004-11-04 19:44:48 +00:00
Julian Seward
8355f0e4b9 Silence compiler warning.
git-svn-id: svn://svn.valgrind.org/vex/trunk@491
2004-11-04 19:43:51 +00:00
Julian Seward
76383e054a Various folding rules to clean up the IR made by Memcheck.
git-svn-id: svn://svn.valgrind.org/vex/trunk@490
2004-11-04 19:42:59 +00:00
Julian Seward
8d928776b7 Do a few more cases.
git-svn-id: svn://svn.valgrind.org/vex/trunk@489
2004-11-04 19:41:09 +00:00
Julian Seward
34f615321e x86 back end: clear up confusion over which registers carry which
arguments in regparm(2) calls.  This makes memcheck work much better.



git-svn-id: svn://svn.valgrind.org/vex/trunk@488
2004-11-04 18:25:33 +00:00
Julian Seward
81cedb427d Fix compile warnings.
git-svn-id: svn://svn.valgrind.org/vex/trunk@487
2004-11-04 16:59:37 +00:00
Julian Seward
27e1401165 Add a couple more primops needed by Memcheck.
git-svn-id: svn://svn.valgrind.org/vex/trunk@486
2004-11-04 16:57:50 +00:00
Julian Seward
891cf3482a Fix enough stuff to make 'ls' work.
git-svn-id: svn://svn.valgrind.org/vex/trunk@485
2004-11-04 16:56:29 +00:00
Julian Seward
ca184594e2 Fill in a whole bunch more cases.
git-svn-id: svn://svn.valgrind.org/vex/trunk@484
2004-11-04 15:21:04 +00:00
Julian Seward
e51b03ec3e Fill in a few more Memcheck-supporting cases.
git-svn-id: svn://svn.valgrind.org/vex/trunk@483
2004-11-04 15:20:15 +00:00