Commit Graph

73 Commits

Author SHA1 Message Date
Nicholas Nethercote
b05a2a18d7 This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
2009-06-24 00:37:09 +00:00
Nicholas Nethercote
07045477ca Merge the DARWIN branch onto the trunk.
I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156
2009-05-28 01:53:07 +00:00
Nicholas Nethercote
2001629c3f Updated copyright years.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344
2009-03-10 22:02:09 +00:00
Julian Seward
5679a22410 Update copyright dates ("200X-2007" --> "200X-2008").
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398
2008-02-11 11:34:59 +00:00
Julian Seward
57793cffdc gcc-4.3 compile fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6777
2007-08-24 20:37:09 +00:00
Julian Seward
984e45e88f Add disclaimers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6709
2007-04-29 09:06:40 +00:00
Julian Seward
06d8004b23 Make ppc32/64-aix5 work again following recent VG_(tt_fast) rearrangement.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6606
2007-02-20 19:23:19 +00:00
Julian Seward
517d5c52e8 Fix ppc64-linux dispatcher following r6582.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6583
2007-02-11 09:09:20 +00:00
Julian Seward
79f854bc29 Redo the dispatcher's fast-cache mechanism (VG_(tt_fast) et al) to be
more cache friendly.  This changes the mechanism from being a table of
pointers to (guest address, translated code pairs) to being a table of
pairs (guest address, pointer to translated code).  The effect ranges
from zero up to about 20% performance improvement on memcheck, the
biggest effects being seen for programs which jump around a large
number of blocks of code and whose data set does not fit in L2.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6582
2007-02-11 05:08:06 +00:00
Julian Seward
172505c978 Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488
2007-01-08 06:01:59 +00:00
Julian Seward
0850d32443 Merge r6217 (also comment cosmetics):
Use 'ctr' rather than 'lr' for indirect jumps, so as not to trash the
branch predictor(s) for returns from generated code.  Makes a big
difference on ppc970 (and POWER4).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6291
2006-10-17 02:08:26 +00:00
Julian Seward
e1226390f2 Merge r6099:
Dispatchers for AIX5.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6248
2006-10-17 01:06:44 +00:00
Julian Seward
ad67fd79fe Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954
2006-06-05 23:21:15 +00:00
Tom Hughes
f5f7215ba4 Add .type and .size directives for VG_(run_innerloop) and
VG_(run_a_noredir_translation) on all platforms where they are
missing.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5873
2006-05-01 09:28:39 +00:00
Josef Weidendorfer
835f28229d Make VG_(run_innerloop) visible for outer Valgrinds
with self hosting. Without this, the symbol has
size 0 and type NOT, and is ignored by the symbol loader.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5872
2006-05-01 02:12:58 +00:00
Julian Seward
eeb7eaa4e1 Set fpscr back to a known state after running generated code (64-bit mode).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5615
2006-02-06 05:31:37 +00:00
Julian Seward
017ed68f63 Set fpscr back to a known state after running generated code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5614
2006-02-06 05:14:31 +00:00
Julian Seward
4c5b33c685 Followup to r5605: fixes for ppc64
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5606
2006-02-03 19:14:33 +00:00
Julian Seward
5163ea2aed * Track introduction of IR ternary primops and rounding modes, at least as
to the extent needed to make ppc32 work.

* As a result, remove the replacements for glibc's floor/ceil fns on 
  ppc32/64, since vex can now correctly simulate the real ones.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5605
2006-02-03 16:12:27 +00:00
Julian Seward
f6738169ca Fix profiling dispatcher.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5587
2006-01-23 00:09:07 +00:00
Julian Seward
295cb8afea Fix copy-n-paste error.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5533
2006-01-17 01:59:43 +00:00
Julian Seward
5e77fedd75 Fix more ppc64-linux function wrapping and symbol-table bits and pieces.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5523
2006-01-12 21:15:35 +00:00
Julian Seward
d8e230f171 Make function wrapping work on ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5522
2006-01-12 14:04:46 +00:00
Julian Seward
8576ec23a6 Make function wrapping work on amd64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5521
2006-01-12 13:34:20 +00:00
Julian Seward
f9a9e03c7a Merge in function wrapping support from the FNWRAP branch. That
branch hereby becomes inactive.  This currently breaks everything
except x86; fixes for amd64/ppc32 to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5520
2006-01-12 12:32:32 +00:00
Julian Seward
65c73f3155 Fix up ppc64 dispatcher following the changes made by r5441.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5460
2005-12-30 04:16:37 +00:00
Julian Seward
139021b70c More dispatcher tuning for ppc32/64. Makes a big difference for
perf/tinycc.

- run_thread_for_a_while: just clear this thread's reservation when
  starting, not all of them.

- use a different fast-cache hashing function for ppc32/64 than for
  x86/amd64.  This allows the former to use all the fast-cache entries
  rather than just 1/4 of them.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5441
2005-12-26 17:58:58 +00:00
Julian Seward
15987382dc Save %CIA correctly (caused ppc64-linux to loop at the first syscall,
entertainingly).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5399
2005-12-22 03:33:16 +00:00
Cerion Armour-Brown
cd0478d807 Rewrite ppc64 dispatch loop to avoid profiling overhead, as per ppc32 rewrite (r5352).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5393
2005-12-20 20:48:50 +00:00
Julian Seward
c2a49bec4b Hold the event count in r29 rather than the count register, since the
former doesn't need to be spilled and reloaded for every bb run.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5358
2005-12-16 01:08:22 +00:00
Julian Seward
02a7e5b5d0 Rewrite ppc32 dispatch loop to avoid profiling overhead, as per
today's x86 and amd64 rewrites.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5352
2005-12-15 21:40:34 +00:00
Julian Seward
bcc3feca7e Rewrite amd64 dispatch loop to add performance enhancements as per x86
reorganisation of r5345.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5346
2005-12-15 15:46:43 +00:00
Julian Seward
87e9f78e0c - Track vex r1494 (x86/amd64 change of conventions for getting
to translations and back to dispatcher, and also different arg
  passing conventions to LibVEX_Translate).

- Rewrite x86 dispatcher to not increment the profiling counters
  unless requested by the user.  This dramatically reduces the
  D1 miss rate and gives considerable performance improvement
  on x86.  Also, restructure and add comments to dispatch-x86-linux.S
  to make it much easier to follow (imo).

amd64/ppc32/ppc64 fixes to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5345
2005-12-15 14:07:07 +00:00
Cerion Armour-Brown
0d3d66a4ac More V setup for ppc64
- client stack setup
 - init_thread1state: set TOC ptr



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5314
2005-12-08 03:24:37 +00:00
Cerion Armour-Brown
b714685c63 Take ppc64 startup further along the road
- fixed launcher.c to recognise ppc32/64-linux platforms properly
 - lots of assembly fixes to handle func descriptors, toc references, 64bit regs.
 - fixed var types in vki-ppc64-linux

Now gets as far as VG_(translate), but dies from a case of invalid orig_addr.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5299
2005-12-06 19:07:08 +00:00
Nicholas Nethercote
8a17ca2276 add comment from log message.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5281
2005-12-04 19:33:03 +00:00
Julian Seward
f6c90df51e Avoid potential partial-flags stall on P4.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5275
2005-12-03 14:27:41 +00:00
Cerion Armour-Brown
2696e0a828 Fix for a nasty bug in loading an fp reg with zero - thanks J!
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5262
2005-12-01 19:05:41 +00:00
Julian Seward
8ba9a34088 Add framework for ppc64 support. Apologies in advance for the
inevitable breakage to other platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5250
2005-11-29 13:05:56 +00:00
Nicholas Nethercote
50ad55bc19 add comment from log message
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5216
2005-11-19 23:22:18 +00:00
Julian Seward
0a8b82057a Hacks needed for self-hosting on ppc32 (may be removable if stfiwx is implemented).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5215
2005-11-19 23:08:49 +00:00
Cerion Armour-Brown
0f776af6d2 Changed altivec floating point setup to Java/IEEE mode
- Non-Java mode is the system default, but was causing some accuracy problems by rounding off intermediate denormalised results to zero.
   We now have some small errors (lowest bit only) due to using greater accuracy than the system default, but is better overall.

Also expanded dispatcher check of FPSCR to include all contol bits




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5196
2005-11-18 20:45:18 +00:00
Cerion Armour-Brown
973949d2b3 Implemented checks for FPSCR and VSCR on leaving dispatcher
- required flags: FPSCR[RM] == 0, VSCR[NJ] == 1



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5155
2005-11-16 20:22:11 +00:00
Julian Seward
6c9242d63c Hacks to enable self-hosting on amd64, so as to facilitate
cachegrinding it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5119
2005-11-13 18:51:31 +00:00
Julian Seward
18afc93af3 wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5118
2005-11-13 18:50:39 +00:00
Julian Seward
f306ed7f00 The absolute bare minimum changes needed to make it work on an
integer-only PPC processor (PPC440GX).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5110
2005-11-13 01:59:22 +00:00
Julian Seward
77a40e2556 Hook the ppc32 stuff up to the revised CPU detection machinery, and
add a bunch of code to detect what the cpu can do at startup by
catching SIGILLs.  Shame PPC doesn't offer any sane mechanism for
finding out what instruction subsets the CPU is capable of (a la
x86/amd64 cpuid).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5108
2005-11-13 00:30:22 +00:00
Julian Seward
10ee793424 Tidy up the machinery for detecting the CPU type and capabilities.
Move it from m_translate to m_machine, which is a more appropriate
place for it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5104
2005-11-12 23:10:48 +00:00
Cerion Armour-Brown
4d0a44c474 Comments from Greg Parker re ppc ABI conventions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5077
2005-11-11 01:00:36 +00:00
Cerion Armour-Brown
3acbecc3c6 Save/Restore condition register, and VRSAVE register in core dispatch loop.
Cleaned up stack according to common abi constraints.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5055
2005-11-09 14:13:08 +00:00