Commit Graph

548 Commits

Author SHA1 Message Date
Julian Seward
ecdbfec7f1 Add copyright notices.
git-svn-id: svn://svn.valgrind.org/vex/trunk@548
2004-11-12 17:40:23 +00:00
Julian Seward
e77e2a01f6 Add a couple more constant folding rules.
git-svn-id: svn://svn.valgrind.org/vex/trunk@547
2004-11-12 00:13:21 +00:00
Julian Seward
d318858c08 Let the insn selector know that
CmpNE32(1Sto32(bit),0) == bit

and ditto in 64-bits, and do not generate any code for it.  This helps
some massive expressions made by memcheck on x86 FP code.




git-svn-id: svn://svn.valgrind.org/vex/trunk@546
2004-11-11 02:17:53 +00:00
Julian Seward
4000a6aed5 Fix some missing cases in printing FP insns.
git-svn-id: svn://svn.valgrind.org/vex/trunk@545
2004-11-11 02:15:15 +00:00
Julian Seward
75844675bc Make cse_BB globally visible, and rename to do_cse_BB, but don't use
it for anything new.



git-svn-id: svn://svn.valgrind.org/vex/trunk@544
2004-11-11 02:14:45 +00:00
Julian Seward
c900461266 Update included copy of the mc_instrument.c.
git-svn-id: svn://svn.valgrind.org/vex/trunk@543
2004-11-11 02:13:30 +00:00
Julian Seward
1c511a6897 --help-debug: don't forget to mention --vex-iropt-verbosity
git-svn-id: svn://svn.valgrind.org/vex/trunk@542
2004-11-10 23:28:01 +00:00
Julian Seward
f0c5a331f1 Comment change, and remove some '#if 1's.
git-svn-id: svn://svn.valgrind.org/vex/trunk@541
2004-11-10 23:27:07 +00:00
Julian Seward
fe27a73534 Oops .. C flag after inc/dec is in ndep, not dep1.
git-svn-id: svn://svn.valgrind.org/vex/trunk@540
2004-11-10 23:25:37 +00:00
Julian Seward
2b3bb7f8a5 Provide our own versions of strchrnul and rawmemchr so we don't have
to deal with glibc's ultra-optimised versions.

--> CVS repo ?



git-svn-id: svn://svn.valgrind.org/vex/trunk@539
2004-11-10 17:24:44 +00:00
Julian Seward
4be3ce73ed Build mc_main.o with -fomit-frame-pointer; gives a 2-3% performance
gain on x86.



git-svn-id: svn://svn.valgrind.org/vex/trunk@538
2004-11-10 13:33:17 +00:00
Julian Seward
8601c98827 Allow tools to tell Vex when it can/can't chase across basic block
boundaries, so as to make the intercept mechanism work properly again.

Unfortunately also contains a huge number of tab-to-space whitespace
changes in guest-x86/toIR.c.



git-svn-id: svn://svn.valgrind.org/vex/trunk@537
2004-11-10 13:02:48 +00:00
Julian Seward
ea85525f12 Reinstate some more flag-helper specialisations.
git-svn-id: svn://svn.valgrind.org/vex/trunk@536
2004-11-10 12:10:23 +00:00
Julian Seward
5fa56868b3 Comment change only.
git-svn-id: svn://svn.valgrind.org/vex/trunk@535
2004-11-10 12:09:42 +00:00
Julian Seward
ebdb696ccd Finish off Memcheck's handling of dirty helper calls. Memcheck is now
feature-complete (!)



git-svn-id: svn://svn.valgrind.org/vex/trunk@534
2004-11-10 12:07:51 +00:00
Julian Seward
778c1346c5 * memcheck: handle dirty helper calls (mostly)
* memcheck: improve call sequences to value-check-fail helpers


git-svn-id: svn://svn.valgrind.org/vex/trunk@533
2004-11-10 02:39:49 +00:00
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