Tom Hughes [Mon, 30 Aug 2004 10:31:21 +0000 (10:31 +0000)]
Recognise X.Org servers and treat them the same as XFree86 4.x servers. This
avoids warnings from configure about an unknown X server type on recent Linux
distributions that use X.Org instead of XFree86.
Tom Hughes [Thu, 26 Aug 2004 23:09:26 +0000 (23:09 +0000)]
When delivering SIGFPE make sure we patch up si_addr in any siginfo
structure to match the address of the instruction in the client program
which caused the fault.
Julian Seward [Thu, 26 Aug 2004 12:30:48 +0000 (12:30 +0000)]
Fix flags computation for rol/ror instructions in some very obscure
boundary cases (rotate amount > 0 and an exact multiple of the
word size, in bits.).
Julian Seward [Thu, 26 Aug 2004 11:27:21 +0000 (11:27 +0000)]
* Enable cmpxchg tests.
* Enable long-running arithmetic test.
* Run the shift/rotate test with all input flag combinations.
This shows up some incorrect flag results for rotates by
exact multiples of the word size.
Tom Hughes [Wed, 25 Aug 2004 18:58:04 +0000 (18:58 +0000)]
If we return from a signal handler to a thread that was waiting to
rendezvous with another thread before the signal arrived then check
whether the rendezvous is now complete or we may deadlock.
Two were trivial. The one for strncmp is slightly trickier; you have to be
careful with the signedness of chars when comparing them... but the code
already casts s1 and s2 to (unsigned char*) before comparing them, so it's not
a problem.
Tom Hughes [Wed, 25 Aug 2004 13:25:30 +0000 (13:25 +0000)]
Removed comma at the end of an enumerator list - this is allowed
in C99 but not in C89 except as a GNU extension so it's probably
best not to rely on it.
Julian Seward [Wed, 25 Aug 2004 12:49:22 +0000 (12:49 +0000)]
Introduce extra paranoia into the instruction selector. Previously,
iselIntExpr_R et al could compute a value into either a virtual or
real register. Now, it will only compute a value into a virtual
register, introducing a real->virtual copy if necessary. Furthermore
this is automatically checked. This change makes it easier to be
assured that the generated code is correct in the presence of
instructions with fixed register usages.
The downside is that in a few cases, there will be real->virtual reg
copies that didn't exist before. However, I think reg-alloc can
easily be modified to coalesce these out -- it already coalesces away
virtual-virtual copies.
Fix symlinking -- the old code worked, but worked for the wrong reason; the
bit before "$(subdir)" has to specify the path from .in_place/ to the root.
It just so happened that $(top_builddir) was the same for all directories at
the same level in the hierarchy as .in_place/ (ie. one deep).
(I haven't bothered changing it in all the tool Makefile.am files, because I'll
do that when I factor out all their common bits into a single file, be it
before or after 2.2.0 is released.)
Minor fixups:
- introduce $(inplacedir) like everywhere else
- valgrind.spec doesn't need to be included in "make dist", because it gets
built from valgrind.spec.in at configure-time.
Putting "dist_" in front of a "_DATA" variable means it is included in "make
dist". This avoids the need to put it in "EXTRA_DIST", and saves a few lines
in all the docs Makefile.am files.
Julian Seward [Tue, 24 Aug 2004 23:34:39 +0000 (23:34 +0000)]
Fix bug in assembly of CMov32(reg,reg) in which the regs were handled
the wrong way round. This was causing test/test-i386.c to fail on
shifts of zero. Now that test works completely.
Julian Seward [Tue, 24 Aug 2004 15:10:38 +0000 (15:10 +0000)]
Redo x86 flag stuff a bit. Primarily, change the thunk arg meanings
for ADD and SUB from holding one operand and the result to just
holding both operands. This allows more efficient code to be
generated for specialised calls to calculate_condition().
Do some tuning, without a lot of success.
Fix recently introduced bug causing some mis-computation of
the overflow flag.
With the optimiser on, the flag stuff now fails for shifts of
zero. I have yet to track this down.
Julian Seward [Tue, 24 Aug 2004 00:24:56 +0000 (00:24 +0000)]
Fix error in scheme for assembly Xin_Set32 when the dest is %esi/%edi
and so a swap reg has to be used instead. The error was that the dest
was being initially assigned to zero, whereas it should have been
%eax that was initially assigned zero.
Robert Walsh [Mon, 23 Aug 2004 18:13:16 +0000 (18:13 +0000)]
Fix to allow 32-bit Valgrind to run on AMD64 boxes. Note: this does
NOT allow Valgrind to work with 64-bit executables - only with 32-bit
executables on an AMD64 box.
VG_(valgrind_end) now has a slightly different meaning to all the other
VG_(*_end) vars -- ie. it names the last byte, whereas the others go
one byte past the end.
Tom Hughes [Mon, 23 Aug 2004 18:05:51 +0000 (18:05 +0000)]
Don't version the sem_xxx symbols that have more than one version in
glibc - it doesn't matter for valgrind as we only have one version and
by not versioning them we work no matter what version is asked for.
Small step in factoring out arch-specific code: replace
__attribute((regparm(n))) with REGPARM(n) everywhere. REGPARM() is defined in
vg_skin.h, but will eventually be defined separately for each arch.
Tweak configure.in in preparation for arch and OS ports -- we now have
variables VG_ARCH, VG_OS and VG_PLATFORM (which equals ${VG_ARCH}-${VG_OS}).
Also added a check for the platform (arch/OS) combination.
Removing the example tool 'example' -- it's almost identical to Nulgrind,
except it doesn't actually get built and so ex_main.c and the Makefile.am tend
to get out of date. Changed the docs to refer to Nulgrind as the example tool
for if you start writing a new one.
Make some changes to Nulgrind -- it looks like Jeremy made some changes to it
as part of FV, but then later these changes become unnecessary. Anyway, it now
looks more like the other tools again.
Fix bug, courtesy of Paul Mackerras: when giving find_map_space an address
lower than that of any existing segment, it got it wrong due to the confusing
SkipList API. I wonder how many more bugs like that there are...?
Tom Hughes [Sun, 22 Aug 2004 22:56:25 +0000 (22:56 +0000)]
More fixes for the cancellation wrappers in libpthread - if looking
for the original function with RTLD_NEXT doesn't work then try looking
for the __libc_ version of the function the RTLD_DEFAULT instead.
The reason for this is that, contrary to the dlsym documentation, it
seems that RTLD_NEXT doesn't always seem to find the definition that
would have been used if it weren't for the override. This is particularly
common wihen libpthread is pulled in implicitly by a dependency from
another library.
Julian Seward [Thu, 19 Aug 2004 16:44:45 +0000 (16:44 +0000)]
Fix reg-alloc bug exposed by more aggressive code generation
enabled by recent iropt hacking.
When looking for a real-reg to house a virtual reg, reg-alloc
looks around for (v,r) pairs in which v is already dead, and
so r can be re-used for a new virtual reg. However, it would
be too aggressive in this, and use v even if v went dead
immediately before the current insn, which means v could still
be read by the current insn. This change requires that v go
dead before the insn prior to this one, so that we are
guaranteed v is not used in this insn.
This commit message is way longer than the actual bug fix :-)
Cleaned up the syscall wrappers a bit:
- corrected a few mistakes, eg. when printing them out, in prototypes
- made printing of "%p(%s)" args consistent
- removed 'sizeof_struct_user_fpxregs_struct' from PRE(ptrace)/POST(ptrace)
- allowing for the two different versions of open()
Julian Seward [Tue, 17 Aug 2004 23:59:23 +0000 (23:59 +0000)]
iropt: implement flattening (into SSA form). This caused various
primops to become exposed when previously they were treated as part
of a pattern, hence the changes to host-x86/*.c to handle them.
Tom Hughes [Sun, 15 Aug 2004 14:11:12 +0000 (14:11 +0000)]
Back out yesterday's change to the symbol versioning in the pthread
library - it seems that I misunderstood hom the versioning works and
a system looking for a GLIBC_PRIVATE version of the clock routines
would not find the GLIB_2.2.3 one even with the inheritance. It only
seemed to be working on glibc 2.3 systems because of the version
overrides in the source code, but it failed on glibc 2.2.5 systems.
The new approach is to explicity create two versions of the routines
in question, one with a version of GLIBC_2.2.3 and one with a version
of GLIBC_PRIVATE instead. This has been tested on six different systems
and appears to work everywhere.