]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
19 years agoImplement CLC/STC/CMC. Fixes #125651.
Julian Seward [Fri, 12 May 2006 20:15:33 +0000 (20:15 +0000)] 
Implement CLC/STC/CMC.  Fixes #125651.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1613

19 years ago(1) Fix longstanding bug causing erroneous register zeroing for 'btl'.
Julian Seward [Fri, 12 May 2006 17:47:21 +0000 (17:47 +0000)] 
(1) Fix longstanding bug causing erroneous register zeroing for 'btl'.
(2) Implement 16-bit versions of bt/bts/btr/btc.  (Fixes #125607)

git-svn-id: svn://svn.valgrind.org/vex/trunk@1612

19 years agoSupport 'popw m16'. Fixes #126243.
Julian Seward [Fri, 12 May 2006 14:04:48 +0000 (14:04 +0000)] 
Support 'popw m16'.  Fixes #126243.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1611

19 years agoFix for 32-bit mode, as per comment.
Julian Seward [Sat, 6 May 2006 14:40:40 +0000 (14:40 +0000)] 
Fix for 32-bit mode, as per comment.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1610

19 years agoImplement sthbrx.
Julian Seward [Fri, 5 May 2006 13:44:17 +0000 (13:44 +0000)] 
Implement sthbrx.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1609

19 years agoImplement lhbrx.
Julian Seward [Fri, 5 May 2006 13:26:14 +0000 (13:26 +0000)] 
Implement lhbrx.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1608

19 years agoFix incorrect behaviour of mov{s,z}bw (#126253).
Julian Seward [Wed, 3 May 2006 17:57:15 +0000 (17:57 +0000)] 
Fix incorrect behaviour of mov{s,z}bw (#126253).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1607

19 years agoCounterpart to r1605: in the ppc insn selector, don't use the bits
Julian Seward [Mon, 1 May 2006 02:14:17 +0000 (02:14 +0000)] 
Counterpart to r1605: in the ppc insn selector, don't use the bits
VexArchInfo.hwcaps to distinguish ppc32 and ppc64.  Instead pass
the host arch around.  And associated plumbing.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1606

19 years agoDon't use the bits VexArchInfo.hwcaps to distinguish ppc32 and ppc64,
Julian Seward [Sun, 30 Apr 2006 23:37:32 +0000 (23:37 +0000)] 
Don't use the bits VexArchInfo.hwcaps to distinguish ppc32 and ppc64,
since that doesn't work properly.  Instead pass the guest arch around
too.  Small change with lots of associated plumbing.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1605

19 years agoFix for instruction-decoding failures reported in #124499.
Julian Seward [Thu, 13 Apr 2006 22:06:35 +0000 (22:06 +0000)] 
Fix for instruction-decoding failures reported in #124499.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1604

19 years agoAllow 'repe scas' (possible fix for #124892).
Julian Seward [Wed, 12 Apr 2006 17:30:46 +0000 (17:30 +0000)] 
Allow 'repe scas' (possible fix for #124892).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1603

19 years agoImplement amd64 pmaddwd for SSE2.
Julian Seward [Sat, 8 Apr 2006 16:15:53 +0000 (16:15 +0000)] 
Implement amd64 pmaddwd for SSE2.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1602

19 years agoAdd a function to set/clear the x86 carry flag. (untested)
Julian Seward [Mon, 20 Mar 2006 12:05:42 +0000 (12:05 +0000)] 
Add a function to set/clear the x86 carry flag.  (untested)

git-svn-id: svn://svn.valgrind.org/vex/trunk@1601

19 years agoFix some segment register pushes/pops.
Julian Seward [Sat, 18 Mar 2006 11:29:25 +0000 (11:29 +0000)] 
Fix some segment register pushes/pops.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1600

19 years agoupmerge r1597 (ppc32 needs a lot of spill slots sometimes)
Julian Seward [Thu, 16 Mar 2006 11:29:13 +0000 (11:29 +0000)] 
upmerge r1597 (ppc32 needs a lot of spill slots sometimes)

git-svn-id: svn://svn.valgrind.org/vex/trunk@1599

19 years agoMove the helper function for x86 'fxtract' to g_generic_x87.c so
Julian Seward [Tue, 7 Mar 2006 01:15:50 +0000 (01:15 +0000)] 
Move the helper function for x86 'fxtract' to g_generic_x87.c so
it can be shared by the x86 and amd64 front ends, then use it to
implement fxtract on amd64.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1593

19 years agoImplement fnstsw.
Julian Seward [Tue, 7 Mar 2006 00:22:02 +0000 (00:22 +0000)] 
Implement fnstsw.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1591

19 years agoFix debug printing.
Julian Seward [Mon, 6 Mar 2006 19:17:17 +0000 (19:17 +0000)] 
Fix debug printing.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1588

19 years agoImplement fcmovnu.
Julian Seward [Mon, 6 Mar 2006 19:05:07 +0000 (19:05 +0000)] 
Implement fcmovnu.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1587

19 years agoImplement 3DNow! prefetch insn (prefetch, prefetchw). Fixes #120410.
Julian Seward [Mon, 6 Mar 2006 14:07:58 +0000 (14:07 +0000)] 
Implement 3DNow! prefetch insn (prefetch, prefetchw).  Fixes #120410.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1585

19 years agoHandle byte-size 'xadd reg,mem'. Also, don't bomb out for the
Julian Seward [Mon, 6 Mar 2006 13:35:42 +0000 (13:35 +0000)] 
Handle byte-size 'xadd reg,mem'.  Also, don't bomb out for the
unhandled 'xadd reg,reg' case; instead synth a SIGILL in the usual
way.  Fixes #121662.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1583

19 years agoImplement mtocrf/mfocrf.
Julian Seward [Wed, 1 Mar 2006 18:58:39 +0000 (18:58 +0000)] 
Implement mtocrf/mfocrf.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1579

19 years agoOops, stuff that should have been part of r1573 (4-arg primop change).
Julian Seward [Thu, 9 Feb 2006 02:54:03 +0000 (02:54 +0000)] 
Oops, stuff that should have been part of r1573 (4-arg primop change).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1574

19 years agoRedo the way FP multiply-accumulate insns are done on ppc32/64.
Julian Seward [Wed, 8 Feb 2006 19:30:46 +0000 (19:30 +0000)] 
Redo the way FP multiply-accumulate insns are done on ppc32/64.
Instead of splitting them up into a multiply and an add/sub, add 4 new
primops which keeps the operation as a single unit.  Then, in the back
end, re-emit the as a single instruction.

Reason for this is that so-called fused-multiply-accumulate -- which
is what ppc does -- generates a double-double length intermediate
result (of the multiply, 112 mantissa bits) before doing the add, and
so it is impossible to do a bit-accurate simulation of it using AddF64
and MulF64.

Unfortunately the new primops unavoidably take 4 args (a rounding mode
+ 3 FP args) and so there is a new IRExpr expression type, IRExpr_Qop
and associated supporting junk.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1573

19 years agoWord size fixes for twi/tdi (is trickier than it looks :-). Also add
Julian Seward [Tue, 7 Feb 2006 20:55:08 +0000 (20:55 +0000)] 
Word size fixes for twi/tdi (is trickier than it looks :-).  Also add
missing DIP macros.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1572

19 years agoppc32/64: handle twi/tdi (conditional trap) instructions
Julian Seward [Tue, 7 Feb 2006 16:42:39 +0000 (16:42 +0000)] 
ppc32/64: handle twi/tdi (conditional trap) instructions

git-svn-id: svn://svn.valgrind.org/vex/trunk@1571

19 years agofre: observe the current rounding mode
Julian Seward [Mon, 6 Feb 2006 22:19:17 +0000 (22:19 +0000)] 
fre: observe the current rounding mode

git-svn-id: svn://svn.valgrind.org/vex/trunk@1570

19 years agoRedo x86g_calculate_FXTRACT to only use integer arithmetic.
Julian Seward [Mon, 6 Feb 2006 22:18:38 +0000 (22:18 +0000)] 
Redo x86g_calculate_FXTRACT to only use integer arithmetic.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1569

19 years agoComment-only changes
Julian Seward [Mon, 6 Feb 2006 03:58:31 +0000 (03:58 +0000)] 
Comment-only changes

git-svn-id: svn://svn.valgrind.org/vex/trunk@1568

19 years agoFixups following recent FP rounding mode changes.
Julian Seward [Sun, 5 Feb 2006 16:06:26 +0000 (16:06 +0000)] 
Fixups following recent FP rounding mode changes.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1567

19 years agoMake the CSE pass more aggressive. It now commons up Mux0X and GetI
Julian Seward [Sat, 4 Feb 2006 15:24:00 +0000 (15:24 +0000)] 
Make the CSE pass more aggressive.  It now commons up Mux0X and GetI
expressions too.  This generates somewhat better FP code on x86 since
it removes more redundant artefacts from the x87 FP stack simulation.
Unfortunately commoning up GetIs complicates CSEs, since it is now
possible that "available expressions" collected by the CSEr will
become invalidated by writes to the guest state as we work through the
block.  So there is additional code to check for this case.

Some supporting functions (getAliasingRelation_IC and
getAliasingRelation_II) have been moved earlier in the file.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1566

19 years agoMore x86 tidying up following rounding changes.
Julian Seward [Sat, 4 Feb 2006 15:20:13 +0000 (15:20 +0000)] 
More x86 tidying up following rounding changes.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1565

19 years agoFollowup to r1562: fixes for x86
Julian Seward [Fri, 3 Feb 2006 22:54:17 +0000 (22:54 +0000)] 
Followup to r1562: fixes for x86

git-svn-id: svn://svn.valgrind.org/vex/trunk@1564

19 years agoFollowup to r1562: fixes for ppc64
Julian Seward [Fri, 3 Feb 2006 19:12:17 +0000 (19:12 +0000)] 
Followup to r1562: fixes for ppc64

git-svn-id: svn://svn.valgrind.org/vex/trunk@1563

19 years agoAn overhaul of VEX's floating point handling, to facilitate correct
Julian Seward [Fri, 3 Feb 2006 16:08:03 +0000 (16:08 +0000)] 
An overhaul of VEX's floating point handling, to facilitate correct
simulation of IEEE rounding modes in all FP operations.

The fundamental change is to add a third argument to the basic
floating point primops, eg AddF64, MulF64, etc, indicating the
(IR-encoded) rounding mode to be used for that operation.

Unfortunately IR did not have any way to support three-argument
primops, which means a new kind of IRExpr has been added: a ternary
op, IRExpr_Triop, which is simply a 3-argument form of the existing IR
binary operation node.  The unfortunate side effect is that the size
of the union type IRExpr has increased from 16 to 20 bytes on 32-bit
platforms, and hence the JIT chews through more memory, but this does
not appear to have a measurable effect on the JIT's performance, at
least as measured by Valgrind's perf suite.

* Add IRExpr_Triop, and add handling code to dozens of places which
  examine IRExprs.

* Rename/retype a bunch of floating point IR primops to take a 3rd
  rounding mode argument (which is always the first arg).

* Add extra primops AddF64r32 et al, which do double-precision FP
  operations and then round to single precision, still within a 64-bit
  type.  This is needed to simulate PPC's fadds et al without double
  rounding.

* Adjust the PPC->IR front end, to generate these new primops and
  rounding modes.

* Cause the IR optimiser to do a CSE pass on blocks containing any
  floating point operations.  This commons up the IR rounding mode
  computations, which is important for generating efficient code from
  the backend.

* Adjust the IR->PPC back end, so as to emit instructions to set the
  rounding mode before each FP operation.  Well, at least in
  principle.  In practice there is a bit of cleverness to avoid
  repeatedly setting it to the same value.  This depends on both the
  abovementioned CSE pass, and on the SSA property of IR (cool stuff,
  SSA!).  The effect is that for most blocks containing FP code, the
  rounding mode is set just once, at the start of the block, and the
  resulting overhead is minimal.  See comment on
  set_FPU_rounding_mode().

This change requires followup changes in memcheck.  Also, the
x86/amd64 front/back ends are temporarily broken.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1562

19 years agoDo fre/fres in a way which makes minimal demands on the backend.
Julian Seward [Tue, 31 Jan 2006 16:32:25 +0000 (16:32 +0000)] 
Do fre/fres in a way which makes minimal demands on the backend.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1561

19 years agoF64i isel fix.
Julian Seward [Tue, 31 Jan 2006 16:31:44 +0000 (16:31 +0000)] 
F64i isel fix.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1560

19 years agoHandle fre and frsqrtes. Even though the IBM docs manage to
Julian Seward [Sun, 29 Jan 2006 17:07:57 +0000 (17:07 +0000)] 
Handle fre and frsqrtes.  Even though the IBM docs manage to
contradict themselves about whether these insns exist or not.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1559

19 years agoMake lsw work in 64-bit mode.
Julian Seward [Sat, 28 Jan 2006 17:07:19 +0000 (17:07 +0000)] 
Make lsw work in 64-bit mode.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1558

19 years agoUn-break ppc64 following recent hw-capabilities hackery. (sigh)
Julian Seward [Fri, 27 Jan 2006 22:05:55 +0000 (22:05 +0000)] 
Un-break ppc64 following recent hw-capabilities hackery.  (sigh)

git-svn-id: svn://svn.valgrind.org/vex/trunk@1557

19 years agoUnbreak ppc32 following recent hw-capabilities hackery.
Julian Seward [Fri, 27 Jan 2006 21:52:19 +0000 (21:52 +0000)] 
Unbreak ppc32 following recent hw-capabilities hackery.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1556

19 years agoChange the way Vex represents architecture variants into something
Julian Seward [Fri, 27 Jan 2006 21:20:15 +0000 (21:20 +0000)] 
Change the way Vex represents architecture variants into something
more flexible.  Prior to this change, the type VexSubArch effectively
imposed a total ordering on subarchitecture capabilities, which was
overly restrictive.  This change moves to effectively using a bit-set,
allowing some features (instruction groups) to be supported or not
supported independently of each other.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1555

19 years agoRe-enable stfiwx.
Julian Seward [Fri, 27 Jan 2006 16:05:49 +0000 (16:05 +0000)] 
Re-enable stfiwx.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1554

19 years agoHandle ppc32/64 fres, frsqrte.
Julian Seward [Fri, 27 Jan 2006 15:09:35 +0000 (15:09 +0000)] 
Handle ppc32/64 fres, frsqrte.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1553

19 years agoIn 32-bit mode, handle F64toI64 and I64toF64.
Julian Seward [Thu, 26 Jan 2006 03:02:26 +0000 (03:02 +0000)] 
In 32-bit mode, handle F64toI64 and I64toF64.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1552

19 years agoA bit more backend tidying:
Julian Seward [Thu, 26 Jan 2006 02:24:17 +0000 (02:24 +0000)] 
A bit more backend tidying:
- fix up more float-integer conversions
- remove unused signedness field on PPCInstr_Load

git-svn-id: svn://svn.valgrind.org/vex/trunk@1551

19 years agoChange the way the ppc backend does ppc32/64 float-integer
Julian Seward [Wed, 25 Jan 2006 21:29:48 +0000 (21:29 +0000)] 
Change the way the ppc backend does ppc32/64 float-integer
conversions.  fctiw/fctid/fcfid/stfiwx are now represented explicitly
and are generated by the instruction selector.  This removes the need
for hdefs.c to know anything about scratch areas on the stack and
scratch FP registers.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1550

19 years agoC89 fixes.
Julian Seward [Wed, 25 Jan 2006 03:26:27 +0000 (03:26 +0000)] 
C89 fixes.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1549

19 years agoTidy up the ppc instruction selector a bit. This is almost all cosmetic:
Julian Seward [Wed, 25 Jan 2006 03:01:09 +0000 (03:01 +0000)] 
Tidy up the ppc instruction selector a bit.  This is almost all cosmetic:

- clarify which functions are to be used both in 64-bit and 32-bit mode,
  and which are for one or other modes only.  Rename accordingly.

- iselWordExpr_AMode: was not generating nice amodes in 64-bit mode.
  Fixed.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1548

19 years agoComment-only change: remove commented out code (lots of), change
Julian Seward [Tue, 24 Jan 2006 19:39:02 +0000 (19:39 +0000)] 
Comment-only change: remove commented out code (lots of), change
indentation in a couple of places, adjust comment at top.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1547

19 years agoMinor tweaks to handle instructions created by xlc 7.0.
Julian Seward [Tue, 24 Jan 2006 19:00:05 +0000 (19:00 +0000)] 
Minor tweaks to handle instructions created by xlc 7.0.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1546

19 years agoRe-enable fsqrts.
Julian Seward [Tue, 24 Jan 2006 03:33:43 +0000 (03:33 +0000)] 
Re-enable fsqrts.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1545

19 years agoThe ppc32 port ran itself out of spill slots on some heavy duty FP
Julian Seward [Tue, 24 Jan 2006 00:59:00 +0000 (00:59 +0000)] 
The ppc32 port ran itself out of spill slots on some heavy duty FP
code.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1544

19 years agoMore ppc64-only function wrapping hacks:
Julian Seward [Fri, 20 Jan 2006 14:19:25 +0000 (14:19 +0000)] 
More ppc64-only function wrapping hacks:

- increase size of redirect stack from 8 to 16 elems

- augment the _NRADDR pseudo-register with _NRADDR_GPR2,
  which is the value of R2 at the most recent divert point.
  This is needed in the ELF ppc64 ABI in order to safely run
  the function being wrapped.

- add pseudo-instruction to read get _NRADDR_GPR2 into _GPR3.

- related change: always keep R2 up to date wrt possible memory
  exceptions (no specific reason, just being conservative)

git-svn-id: svn://svn.valgrind.org/vex/trunk@1543

19 years agoAdd Ijk_EmFail, a new kind of IR block exit: an emulation failure
Julian Seward [Fri, 20 Jan 2006 14:13:55 +0000 (14:13 +0000)] 
Add Ijk_EmFail, a new kind of IR block exit: an emulation failure
(fatal error) from which Vex (generated code) cannot recover.

Handle this in the ppc(64) backend.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1542

19 years agoFor ppc64, emit AbiHints from the front end so as to tell tools when
Julian Seward [Wed, 18 Jan 2006 04:14:52 +0000 (04:14 +0000)] 
For ppc64, emit AbiHints from the front end so as to tell tools when
the 288-byte stack should be regarded as having become undefined as
per the ppc64 ELF ABI.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1541

19 years agoTwo different sets of changes (hard to disentangle):
Julian Seward [Tue, 17 Jan 2006 01:48:46 +0000 (01:48 +0000)] 
Two different sets of changes (hard to disentangle):

* Remove from Vex all knowledge about function wrapping.  All the IR
  trickery needed can be done on the Valgrind side, by giving
  LibVEX_Translate yet another callback.  This one is called just
  before any instructions are disassembled into IR, allowing Valgrind
  to insert its own IR preamble if it wants.  It also allows Valgrind
  to inhibit any insn disassembly for the block.  Effect is that this
  allows Valgrind to provide any old IR for a given translation, and
  have Vex process it as usual, yet that IR can be anything and does
  not have to bear any relationship to any guest insns anywhere.

* Consistently pass a void* closure argument as the first parameter to
  all Valgrind-supplied callbacks.  This gets rid of various nasty hacks
  at the Valgrind side to do with passing instance-specific values
  to callbacks.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1540

19 years agoGive the ppc64 guest state a 16-entry pseudo-register array,
Julian Seward [Tue, 17 Jan 2006 01:42:56 +0000 (01:42 +0000)] 
Give the ppc64 guest state a 16-entry pseudo-register array,
guest_REDIR_STACK.  This is used (along with a stack pointer,
guest_REDIR_SP) by Valgrind to support function replacement and
wrapping on ppc64-linux.  Due to the strange ppc64-linux ABI, both
replacement and wrapping require saving (%R2,%LR) pairs on a stack,
and this provides the stack.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1539

19 years agoTeach the ppc back end (64-bit mode only) how to deal with PutI and
Julian Seward [Tue, 17 Jan 2006 01:39:15 +0000 (01:39 +0000)] 
Teach the ppc back end (64-bit mode only) how to deal with PutI and
GetI.  These are needed to support by IR trickery which supports
function replacement/wrapping on ppc64-linux.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1538

19 years agoUpdate fn redirect/wrap hooks for ppc64.
Julian Seward [Thu, 12 Jan 2006 21:13:14 +0000 (21:13 +0000)] 
Update fn redirect/wrap hooks for ppc64.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1537

19 years agoMerge in function wrapping support from the FNWRAP branch. That
Julian Seward [Thu, 12 Jan 2006 12:27:58 +0000 (12:27 +0000)] 
Merge in function wrapping support from the FNWRAP branch.  That
branch hereby becomes inactive.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1536

19 years agoImplement clflush.
Julian Seward [Sat, 7 Jan 2006 22:58:54 +0000 (22:58 +0000)] 
Implement clflush.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1533

19 years agoppc: deal with L flag properly for different sync forms.
Cerion Armour-Brown [Thu, 5 Jan 2006 13:11:59 +0000 (13:11 +0000)] 
ppc: deal with L flag properly for different sync forms.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1532

19 years agoppc: re-enable mtfsb1 instruction.
Cerion Armour-Brown [Wed, 4 Jan 2006 10:53:00 +0000 (10:53 +0000)] 
ppc: re-enable mtfsb1 instruction.

Note: Only the rounding mode field of the FPSCR is supported.
 - Reads from any other bits return zero.
 - Writes to any other bits are ignored.  Writes to 'exception control' bits or the 'non-ieee mode' bit results in an emulation warning.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1531

19 years agoFix magic-sequence spotting in 64-bit mode.
Julian Seward [Tue, 3 Jan 2006 18:41:00 +0000 (18:41 +0000)] 
Fix magic-sequence spotting in 64-bit mode.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1530

19 years agoAdd missing function.
Julian Seward [Tue, 3 Jan 2006 18:40:18 +0000 (18:40 +0000)] 
Add missing function.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1529

19 years agoppc64 altivec:
Cerion Armour-Brown [Mon, 2 Jan 2006 15:15:45 +0000 (15:15 +0000)] 
ppc64 altivec:
 - frontend: fix stvehx, stvewx
 - backend:  fix Iop_32HLto64 (mask off hi32 bits of src regs)

git-svn-id: svn://svn.valgrind.org/vex/trunk@1528

19 years agoHandle ppc64's function ptr's for toIR.c's dirtyhelper calls.
Cerion Armour-Brown [Mon, 2 Jan 2006 14:41:50 +0000 (14:41 +0000)] 
Handle ppc64's function ptr's for toIR.c's dirtyhelper calls.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1527

19 years agoHandle ppc64's function ptr's in bb_to_IR::do_self_check.
Cerion Armour-Brown [Mon, 2 Jan 2006 14:09:16 +0000 (14:09 +0000)] 
Handle ppc64's function ptr's in bb_to_IR::do_self_check.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1526

19 years agoppc64 fixes:
Cerion Armour-Brown [Mon, 2 Jan 2006 13:35:51 +0000 (13:35 +0000)] 
ppc64 fixes:
 - branch: compare full 64bits of CTR reg to zero.
 - stwcx.: store only lo32 bits of r_src to EA in 64bit mode.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1525

19 years agoppc64: handle 32HLto64, 64HLtoV128
Cerion Armour-Brown [Mon, 2 Jan 2006 12:28:17 +0000 (12:28 +0000)] 
ppc64: handle 32HLto64, 64HLtoV128

git-svn-id: svn://svn.valgrind.org/vex/trunk@1524

19 years agoppc64: handle V128to64, V128HIto64.
Julian Seward [Mon, 2 Jan 2006 00:35:24 +0000 (00:35 +0000)] 
ppc64: handle V128to64, V128HIto64.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1523

19 years agox86 counterpart to r1521: For SSE scalar comparison operations where
Julian Seward [Sun, 1 Jan 2006 17:15:19 +0000 (17:15 +0000)] 
x86 counterpart to r1521: For SSE scalar comparison operations where
one operand is in memory, do not read more memory than needed.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1522

19 years agoFor SSE scalar comparison operations where one operand is in memory,
Julian Seward [Sun, 1 Jan 2006 13:17:38 +0000 (13:17 +0000)] 
For SSE scalar comparison operations where one operand is in memory,
do not read more memory than needed.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1521

19 years agoApparently "sync" has an undocumented relative called "lwsync". Sigh.
Julian Seward [Fri, 30 Dec 2005 15:04:29 +0000 (15:04 +0000)] 
Apparently "sync" has an undocumented relative called "lwsync".  Sigh.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1520

19 years agoHandle dcbz in 64-bit mode.
Julian Seward [Fri, 30 Dec 2005 03:39:14 +0000 (03:39 +0000)] 
Handle dcbz in 64-bit mode.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1519

19 years agoPerformance improvements for flag handling.
Julian Seward [Mon, 26 Dec 2005 19:33:55 +0000 (19:33 +0000)] 
Performance improvements for flag handling.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1513

19 years agoComment-only fix
Julian Seward [Mon, 26 Dec 2005 19:33:24 +0000 (19:33 +0000)] 
Comment-only fix

git-svn-id: svn://svn.valgrind.org/vex/trunk@1512

19 years agoComment only changes - misc refs to ppc32 changed to ppc.
Cerion Armour-Brown [Sat, 24 Dec 2005 13:14:11 +0000 (13:14 +0000)] 
Comment only changes - misc refs to ppc32 changed to ppc.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1511

19 years agoPut mode64 in ISelEnv, removing global variable.
Cerion Armour-Brown [Sat, 24 Dec 2005 12:39:47 +0000 (12:39 +0000)] 
Put mode64 in ISelEnv, removing global variable.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1510

19 years agoFix AltiVec load/store on ppc64 - was only considering lo32 bits of address.
Cerion Armour-Brown [Sat, 24 Dec 2005 12:32:10 +0000 (12:32 +0000)] 
Fix AltiVec load/store on ppc64 - was only considering lo32 bits of address.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1509

19 years agoHandle 64HLto128 in 64-bit mode.
Julian Seward [Fri, 23 Dec 2005 12:46:16 +0000 (12:46 +0000)] 
Handle 64HLto128 in 64-bit mode.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1508

19 years agorenamed VEX dirs guest-ppc32/ -> guest-ppc/, host-ppc32/ -> host-ppc/
Cerion Armour-Brown [Fri, 23 Dec 2005 11:43:01 +0000 (11:43 +0000)] 
renamed VEX dirs guest-ppc32/ -> guest-ppc/, host-ppc32/ -> host-ppc/
and adjusted all references to them

git-svn-id: svn://svn.valgrind.org/vex/trunk@1507

19 years agoUpdate comment.
Julian Seward [Fri, 23 Dec 2005 01:48:23 +0000 (01:48 +0000)] 
Update comment.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1506

19 years agoDeal with backend case of 1Sto64
Cerion Armour-Brown [Fri, 23 Dec 2005 01:06:35 +0000 (01:06 +0000)] 
Deal with backend case of 1Sto64

git-svn-id: svn://svn.valgrind.org/vex/trunk@1505

19 years agoChanged naming convention from 'PPC32' to 'PPC' for all VEX code common to both PPC32...
Cerion Armour-Brown [Fri, 23 Dec 2005 00:55:09 +0000 (00:55 +0000)] 
Changed naming convention from 'PPC32' to 'PPC' for all VEX code common to both PPC32 and PPC64.
And tidied up a fair bit while i was at it.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1504

19 years agoImplemented almost all of the remaining 64bit-mode insns.
Cerion Armour-Brown [Thu, 22 Dec 2005 14:32:35 +0000 (14:32 +0000)] 
Implemented almost all of the remaining 64bit-mode insns.

Currently:
Not yet implemented: td(i)
Implemented, not tested: ldarx, stdcx.

All common-mode int & fp insns in 64bit-mode tested.
Altivec insns in 64bit-mode still to be tested.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1503

19 years agosmall fixes for ppc64 layout stuff
Julian Seward [Thu, 22 Dec 2005 03:01:17 +0000 (03:01 +0000)] 
small fixes for ppc64 layout stuff

git-svn-id: svn://svn.valgrind.org/vex/trunk@1502

19 years agoStrict-aliasing fix needed to make gcc-4.1.0 happy.
Julian Seward [Sun, 18 Dec 2005 03:07:11 +0000 (03:07 +0000)] 
Strict-aliasing fix needed to make gcc-4.1.0 happy.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1501

19 years agoFix typos.
Cerion Armour-Brown [Sat, 17 Dec 2005 11:28:53 +0000 (11:28 +0000)] 
Fix typos.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1500

19 years agoFix switchback.c to reflect changes to call of LibVEX_Translate()
Cerion Armour-Brown [Fri, 16 Dec 2005 13:49:00 +0000 (13:49 +0000)] 
Fix switchback.c to reflect changes to call of LibVEX_Translate()
Fix test_ppc_jm1.c to reflect direct linking
 - main -> __main etc
 - vex_printf -> vexxx_printf etc

git-svn-id: svn://svn.valgrind.org/vex/trunk@1499

19 years agoFixed up front and backend for 32bit mul,div,cmp,shift in mode64
Cerion Armour-Brown [Fri, 16 Dec 2005 13:40:18 +0000 (13:40 +0000)] 
Fixed up front and backend for 32bit mul,div,cmp,shift in mode64
Backend:
 - separated shifts from other alu ops
 - gave {shift, mul, div, cmp} ops a bool to indicate 32|64bit insn
 - fixed and implemented more mode64 cases

Also improved some IR by moving imm's to right arg of binop - backend assumes this.

All integer ppc32 insns now pass switchback tests in 64bit mode.
(ppc64-only insns not yet fully tested)

git-svn-id: svn://svn.valgrind.org/vex/trunk@1498

19 years agoppc32/64 backend: take r29 out of circulation so the Valgrind
Julian Seward [Fri, 16 Dec 2005 01:06:42 +0000 (01:06 +0000)] 
ppc32/64 backend: take r29 out of circulation so the Valgrind
dispatcher can use it.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1497

19 years agoMake suitable changes for ppc32/ppc64 following recent x86/amd64
Julian Seward [Thu, 15 Dec 2005 21:33:50 +0000 (21:33 +0000)] 
Make suitable changes for ppc32/ppc64 following recent x86/amd64
dispatch changes.  Note, this doesn't change the generated code at
all.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1496

19 years agoModify amd64 backend to use jump-jump scheme rather than call-return
Julian Seward [Thu, 15 Dec 2005 15:45:20 +0000 (15:45 +0000)] 
Modify amd64 backend to use jump-jump scheme rather than call-return
scheme.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1495

19 years ago- x86 back end: change code generation convention, so that instead of
Julian Seward [Thu, 15 Dec 2005 14:02:34 +0000 (14:02 +0000)] 
- x86 back end: change code generation convention, so that instead of
  dispatchers CALLing generated code which later RETs, dispatchers
  jump to generated code and it jumps back to the dispatcher.  This
  removes two memory references per translation run and by itself
  gives a measureable performance improvement on P4.  As a result,
  there is new plumbing so that the caller of LibVEX_Translate can
  supply the address of the dispatcher to jump back to.

  This probably breaks all other targets.  Do not update.

- Administrative cleanup: LibVEX_Translate has an excessive
  number of arguments.  Remove them all and instead add a struct
  by which the arguments are supplied.  Add further comments
  about the meaning of some fields.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1494

19 years agoStop gcc complaining.
Julian Seward [Thu, 15 Dec 2005 13:58:07 +0000 (13:58 +0000)] 
Stop gcc complaining.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1493

19 years agoEnable fsqrt
Cerion Armour-Brown [Wed, 14 Dec 2005 22:00:53 +0000 (22:00 +0000)] 
Enable fsqrt
Document store fp single-precision problem

git-svn-id: svn://svn.valgrind.org/vex/trunk@1492

19 years agoMore svn:ignores for VEX.
Cerion Armour-Brown [Wed, 14 Dec 2005 10:22:25 +0000 (10:22 +0000)] 
More svn:ignores for VEX.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1491

19 years agoSwitchbacker updates
Cerion Armour-Brown [Tue, 13 Dec 2005 21:30:48 +0000 (21:30 +0000)] 
Switchbacker updates
 - no longer using home-grown linker - simply compiling and linking switchback.c with test_xxx.c
 - updated to handle ppc64 (along with it's weirdo function descriptors...)
 - have to be careful not to use exported functions from libvex_arch_linux.a, hence vex_printf -> vexxx_printf in test_xxx.c

git-svn-id: svn://svn.valgrind.org/vex/trunk@1490