]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
20 years agoHandle fnclex, needed by g95.
Julian Seward [Wed, 25 May 2005 00:44:13 +0000 (00:44 +0000)] 
Handle fnclex, needed by g95.

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

20 years agoAdd a folding rule for 1Uto64.
Julian Seward [Fri, 20 May 2005 19:21:45 +0000 (19:21 +0000)] 
Add a folding rule for 1Uto64.

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

20 years agoHandle XCHG Gb,Eb.
Julian Seward [Wed, 18 May 2005 12:04:04 +0000 (12:04 +0000)] 
Handle XCHG Gb,Eb.

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

20 years agoHandle XCHG rAX, reg for 32-bit regs as well as 64-bit regs. I'm not
Julian Seward [Wed, 18 May 2005 11:47:47 +0000 (11:47 +0000)] 
Handle XCHG rAX, reg for 32-bit regs as well as 64-bit regs.  I'm not
sure this is right -- the AMD64 docs are very difficult to interpret
on the subtle point of precisely what is and isn't to be regarded as a
no-op.

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

20 years agoHandle XOR Ib, AL.
Julian Seward [Wed, 18 May 2005 10:22:47 +0000 (10:22 +0000)] 
Handle XOR Ib, AL.

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

20 years agoFix behaviour of MOVQ on amd64.
Julian Seward [Sat, 14 May 2005 11:17:25 +0000 (11:17 +0000)] 
Fix behaviour of MOVQ on amd64.

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

20 years agoFinally fix the behaviour of MOVQ (xmm -> xmm).
Julian Seward [Sat, 14 May 2005 02:04:12 +0000 (02:04 +0000)] 
Finally fix the behaviour of MOVQ (xmm -> xmm).

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

20 years agoHandle NegF64.
Julian Seward [Sat, 14 May 2005 02:02:50 +0000 (02:02 +0000)] 
Handle NegF64.

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

20 years agoReinstate a SBB case.
Julian Seward [Fri, 13 May 2005 13:54:48 +0000 (13:54 +0000)] 
Reinstate a SBB case.

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

20 years agoReinstate a bunch more x87 instructions.
Julian Seward [Thu, 12 May 2005 19:21:55 +0000 (19:21 +0000)] 
Reinstate a bunch more x87 instructions.

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

20 years agoAdd the beginnings of what might be a general mechanism to pass
Julian Seward [Thu, 12 May 2005 17:55:01 +0000 (17:55 +0000)] 
Add the beginnings of what might be a general mechanism to pass
ABI-specific knowledge through the IR compilation pipeline.  This
entails a new IR construction, AbiHint.

Currently there is only one kind of hint, and it is generated by the
amd64 front end.  This tells whoever wants to know that a function
call or return has happened, and so the 128 bytes below %rsp should be
considered undefined.

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

20 years agoMore floating-point tuning.
Julian Seward [Thu, 12 May 2005 02:14:52 +0000 (02:14 +0000)] 
More floating-point tuning.

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

20 years agoAdd a couple more %rflag-helper specialisations.
Julian Seward [Wed, 11 May 2005 23:16:43 +0000 (23:16 +0000)] 
Add a couple more %rflag-helper specialisations.

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

20 years agoAllow reg-alloc to use %rbx. This is a callee-saved register and
Julian Seward [Wed, 11 May 2005 23:16:13 +0000 (23:16 +0000)] 
Allow reg-alloc to use %rbx.  This is a callee-saved register and
therefore particularly valuable - bringing it into circulation reduces
the volume of code generated by memcheck by about 3%.

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

20 years agoAh, the joys of register allocation. You might think that giving
Julian Seward [Wed, 11 May 2005 22:55:08 +0000 (22:55 +0000)] 
Ah, the joys of register allocation.  You might think that giving
reg-alloc as many registers as possible maximises performance.  You
would be wrong.  Giving it more registers generates more spilling of
caller-saved regs around the innumerable helper calls created by
Memcheck.  What we really need are zillions of callee-save registers,
but those are in short supply.  Hmm, perhaps I should let it use %rbx
too -- that's listed as callee-save.

Anyway, the current arrangement allows reg-alloc to use 8
general-purpose regs and 10 xmm registers.  The x87 registers are not
used at all.  This seems to work fairly well.

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

20 years agoDo a bit better for (part of) a very common memcheck idiom: "is this
Julian Seward [Wed, 11 May 2005 22:47:32 +0000 (22:47 +0000)] 
Do a bit better for (part of) a very common memcheck idiom: "is this
pointer defined ?"

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

20 years agogcc-2.96 build fixes
Julian Seward [Wed, 11 May 2005 16:24:00 +0000 (16:24 +0000)] 
gcc-2.96 build fixes

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

20 years agoMake the amd64 back end capable of dealing with the stuff memcheck
Julian Seward [Wed, 11 May 2005 16:13:37 +0000 (16:13 +0000)] 
Make the amd64 back end capable of dealing with the stuff memcheck
generates for 128-bit vector primops.

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

20 years agoAMD64 backend cleanup: get rid of instruction variants which the insn
Julian Seward [Wed, 11 May 2005 15:37:50 +0000 (15:37 +0000)] 
AMD64 backend cleanup: get rid of instruction variants which the insn
selector doesn't generate.

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

20 years agoThese cases are now verified.
Julian Seward [Wed, 11 May 2005 10:05:04 +0000 (10:05 +0000)] 
These cases are now verified.

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

20 years agoPlacate icc.
Julian Seward [Wed, 11 May 2005 10:03:08 +0000 (10:03 +0000)] 
Placate icc.

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

20 years agoTo a first approximation, this commit completes SSE2 support for AMD64.
Julian Seward [Wed, 11 May 2005 02:55:54 +0000 (02:55 +0000)] 
To a first approximation, this commit completes SSE2 support for AMD64.

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

20 years agoComment-only change.
Julian Seward [Wed, 11 May 2005 02:55:00 +0000 (02:55 +0000)] 
Comment-only change.

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

20 years agoLots more SSE2 instructions.
Julian Seward [Wed, 11 May 2005 02:13:42 +0000 (02:13 +0000)] 
Lots more SSE2 instructions.

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

20 years agoSSE2, on and on and on. There are more different SSE2 instructions
Julian Seward [Wed, 11 May 2005 00:03:06 +0000 (00:03 +0000)] 
SSE2, on and on and on.  There are more different SSE2 instructions
than there are atoms in the universe.  This much, at least, I now
know.

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

20 years agoEnough SSE2 instructions to sink a small ship. And that's not even
Julian Seward [Tue, 10 May 2005 22:42:54 +0000 (22:42 +0000)] 
Enough SSE2 instructions to sink a small ship.  And that's not even
half of them.

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

20 years agoFirst pass through SSE1 instructions.
Julian Seward [Tue, 10 May 2005 20:08:34 +0000 (20:08 +0000)] 
First pass through SSE1 instructions.

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

20 years agoMany amd64 SSE1 instructions.
Julian Seward [Tue, 10 May 2005 02:50:05 +0000 (02:50 +0000)] 
Many amd64 SSE1 instructions.

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

20 years agoFinish off amd64 MMX instructions before they finish me off (it's
Julian Seward [Mon, 9 May 2005 22:23:38 +0000 (22:23 +0000)] 
Finish off amd64 MMX instructions before they finish me off (it's
either them or me).  Honestly, the amd64 insn set has the most complex
encoding I have ever seen.

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

20 years agoHandle primops created by memchecking MMX code.
Julian Seward [Mon, 9 May 2005 18:15:21 +0000 (18:15 +0000)] 
Handle primops created by memchecking MMX code.

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

20 years agoMake a whole bunch of mmx instructions work.
Julian Seward [Mon, 9 May 2005 17:52:56 +0000 (17:52 +0000)] 
Make a whole bunch of mmx instructions work.

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

20 years agoSupport GetI/PutI of 32-bit integer arrays.
Julian Seward [Mon, 9 May 2005 12:16:33 +0000 (12:16 +0000)] 
Support GetI/PutI of 32-bit integer arrays.

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

20 years agoEven more x87 instructions.
Julian Seward [Mon, 9 May 2005 02:57:08 +0000 (02:57 +0000)] 
Even more x87 instructions.

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

20 years agoMake a whole bunch more x87 instructions work on amd64.
Julian Seward [Sun, 8 May 2005 23:03:48 +0000 (23:03 +0000)] 
Make a whole bunch more x87 instructions work on amd64.

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

20 years agoMore x87 instructions.
Julian Seward [Sat, 7 May 2005 01:01:24 +0000 (01:01 +0000)] 
More x87 instructions.

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

20 years agoReinstate the specialisation rule which first exposed the bug fixed by
Julian Seward [Fri, 6 May 2005 16:30:21 +0000 (16:30 +0000)] 
Reinstate the specialisation rule which first exposed the bug fixed by
r1167.

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

20 years agoFix silly bug in folding rule. This 'silly bug' took hours to track
Julian Seward [Fri, 6 May 2005 16:29:26 +0000 (16:29 +0000)] 
Fix silly bug in folding rule.  This 'silly bug' took hours to track
down.  Bah.

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

20 years agoMake some more x87 instructions work.
Julian Seward [Fri, 6 May 2005 11:50:13 +0000 (11:50 +0000)] 
Make some more x87 instructions work.

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

20 years agoFix 64-bit bogon in bt/bts/btc/btr which caused it not to work right.
Julian Seward [Fri, 6 May 2005 01:43:56 +0000 (01:43 +0000)] 
Fix 64-bit bogon in bt/bts/btc/btr which caused it not to work right.

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

20 years agoFix up %rflags handling after 64-bit multiplies.
Julian Seward [Thu, 5 May 2005 21:46:50 +0000 (21:46 +0000)] 
Fix up %rflags handling after 64-bit multiplies.

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

20 years agoImplement a whole bunch more SSE instructions on amd64.
Julian Seward [Thu, 5 May 2005 21:34:02 +0000 (21:34 +0000)] 
Implement a whole bunch more SSE instructions on amd64.

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

20 years agoPlay a few more rounds of the SSE game on amd64.
Julian Seward [Thu, 5 May 2005 12:05:54 +0000 (12:05 +0000)] 
Play a few more rounds of the SSE game on amd64.

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

20 years agoMore %flags-helpers tuning.
Julian Seward [Thu, 5 May 2005 12:05:11 +0000 (12:05 +0000)] 
More %flags-helpers tuning.

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

20 years agoUpdate comment.
Julian Seward [Thu, 5 May 2005 12:04:14 +0000 (12:04 +0000)] 
Update comment.

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

20 years agox86 guest: generate Iop_Neg* in the x86->IR phase. Intent is to
Julian Seward [Tue, 3 May 2005 12:20:15 +0000 (12:20 +0000)] 
x86 guest: generate Iop_Neg* in the x86->IR phase.  Intent is to
ensure that the non-shadow (real) computation done by the program will
fail if Iop_Neg* is incorrectly handled somehow.  Until this point,
Iop_Neg* is only generated by memcheck and so it will not be obvious
if it is mishandled.  IOW, this commit enhances verifiability of the
x86-IR-x86 pipeline.

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

20 years agoGenerate better code for CmpNEZ64(Or64(x,y)), a common idiom resulting
Julian Seward [Tue, 3 May 2005 09:09:27 +0000 (09:09 +0000)] 
Generate better code for CmpNEZ64(Or64(x,y)), a common idiom resulting
from memchecking of FP code.

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

20 years agoMemchecking very large BBs of FP insns on x86 sometimes needs a lot of
Julian Seward [Tue, 3 May 2005 09:08:23 +0000 (09:08 +0000)] 
Memchecking very large BBs of FP insns on x86 sometimes needs a lot of
spill slots.

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

20 years agoWhen handling 'sbb %reg,%reg', first put zero into %reg. This removes
Julian Seward [Mon, 2 May 2005 17:07:02 +0000 (17:07 +0000)] 
When handling 'sbb %reg,%reg', first put zero into %reg.  This removes
the false result dependency on the previous value of %reg.

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

20 years agoMinor tweakage: use testl rather than andl in three places on the
Julian Seward [Mon, 2 May 2005 16:16:15 +0000 (16:16 +0000)] 
Minor tweakage: use testl rather than andl in three places on the
basis that andl trashes the tested register whereas testl doesn't.  In
two out of the three cases this makes no difference since the tested
register is a copy of some other register anyway, but hey.

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

20 years agoMinor cleanups.
Julian Seward [Mon, 2 May 2005 15:52:44 +0000 (15:52 +0000)] 
Minor cleanups.

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

20 years agoGet rid of some functions made redundant by recent isel reorganisation.
Julian Seward [Mon, 2 May 2005 10:54:34 +0000 (10:54 +0000)] 
Get rid of some functions made redundant by recent isel reorganisation.

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

20 years agoDon't complain endlessly about missing folding rule for Iop_64HLto128.
Julian Seward [Mon, 2 May 2005 10:47:22 +0000 (10:47 +0000)] 
Don't complain endlessly about missing folding rule for Iop_64HLto128.

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

20 years agoHandle CmpNEZ16.
Julian Seward [Wed, 27 Apr 2005 13:39:35 +0000 (13:39 +0000)] 
Handle CmpNEZ16.

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

20 years agoHandle various more primops, and reorganise iselCondCode_wrk in line
Julian Seward [Wed, 27 Apr 2005 11:55:08 +0000 (11:55 +0000)] 
Handle various more primops, and reorganise iselCondCode_wrk in line
with similar reorg on x86 side.

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

20 years agoEmit 'negq'.
Julian Seward [Wed, 27 Apr 2005 11:53:23 +0000 (11:53 +0000)] 
Emit 'negq'.

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

20 years ago* Use new 64-to/from-{16,8,1} conversion primops
Julian Seward [Wed, 27 Apr 2005 11:52:40 +0000 (11:52 +0000)] 
* Use new 64-to/from-{16,8,1} conversion primops

* disable "Z after SUBW" specialisation which apparently causes
  xedit to fail for unknown reasons

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

20 years agoUse new 64-to/from-{16,8,1} conversion primops instead of going via
Julian Seward [Wed, 27 Apr 2005 11:50:56 +0000 (11:50 +0000)] 
Use new 64-to/from-{16,8,1} conversion primops instead of going via
Ity_I32.

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

20 years agoAdd even more 64-bit integer primops (sigh)
Julian Seward [Wed, 27 Apr 2005 11:42:44 +0000 (11:42 +0000)] 
Add even more 64-bit integer primops (sigh)

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

20 years ago* Enhance the x86 instruction selector to generate for the primops
Julian Seward [Tue, 26 Apr 2005 23:39:45 +0000 (23:39 +0000)] 
* Enhance the x86 instruction selector to generate for the primops
  introduced in rev 1144.

* Rearrange iselCondCode and introduce a few new patterns which
  deal better with the IR that Memcheck commonly generates

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

20 years agoAdd a few new primops which allow for more concise expression of
Julian Seward [Tue, 26 Apr 2005 23:34:34 +0000 (23:34 +0000)] 
Add a few new primops which allow for more concise expression of
the instrumentation Memcheck generates:

* CmpNEZ{8,16,32,64}, which are equivalent to CmpNE<sz> with one
  argument zero

* Neg{8,16,32,64}, which is equivalent to Sub<sz> with the first
  argument zero

For 64-bit platforms, add these primops.  This gives a complete set of
primops for conversions between the integral types (I8, I16, I32,
I64), so that a widening/narrowing from any type to any other type can
be achieved in a single primop:

* Iop_8Uto64, Iop_8Sto64, Iop_16Uto64, Iop_16Sto64

* Iop_64to8, Iop_64to16

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

20 years agoAdd various %rflag-helper specialisation cases and fast paths. This
Julian Seward [Tue, 26 Apr 2005 01:53:48 +0000 (01:53 +0000)] 
Add various %rflag-helper specialisation cases and fast paths.  This
more or less doubles performance of the baseline simulation on integer
code.

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

20 years agoHandle more cases, and a bit of tuning.
Julian Seward [Tue, 26 Apr 2005 01:52:29 +0000 (01:52 +0000)] 
Handle more cases, and a bit of tuning.

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

20 years agoAdd 64-bit comparisons.
Julian Seward [Tue, 26 Apr 2005 01:52:01 +0000 (01:52 +0000)] 
Add 64-bit comparisons.

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

20 years agoIncrease number of integer registers in use from 3 to 8.
Julian Seward [Tue, 26 Apr 2005 01:51:24 +0000 (01:51 +0000)] 
Increase number of integer registers in use from 3 to 8.

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

20 years agoHandle a couple more memcheck-generated primops. With this, I can run
Julian Seward [Sun, 24 Apr 2005 00:26:37 +0000 (00:26 +0000)] 
Handle a couple more memcheck-generated primops.  With this, I can run
konqueror on memcheck on amd64.

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

20 years agoHandle some artefacts resulting from memchecking of x87 floating-point
Julian Seward [Sat, 23 Apr 2005 23:41:46 +0000 (23:41 +0000)] 
Handle some artefacts resulting from memchecking of x87 floating-point
code (I64-typed PutI/GetI).

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

20 years agoMore code-generation cases.
Julian Seward [Sat, 23 Apr 2005 01:15:47 +0000 (01:15 +0000)] 
More code-generation cases.

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

20 years agoUpdate.
Julian Seward [Fri, 22 Apr 2005 21:21:09 +0000 (21:21 +0000)] 
Update.

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

20 years agoComment-only change.
Julian Seward [Fri, 22 Apr 2005 21:20:47 +0000 (21:20 +0000)] 
Comment-only change.

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

20 years agorm'd.
Julian Seward [Thu, 21 Apr 2005 01:57:44 +0000 (01:57 +0000)] 
rm'd.

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

20 years agoAdd an identity, Or8(x,0) --> x.
Julian Seward [Thu, 21 Apr 2005 01:35:48 +0000 (01:35 +0000)] 
Add an identity, Or8(x,0) --> x.

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

20 years agoFix some more insn selection cases required by Memcheck.
Julian Seward [Wed, 20 Apr 2005 22:57:11 +0000 (22:57 +0000)] 
Fix some more insn selection cases required by Memcheck.

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

20 years agoUpdate comment re PutI/GetI (comment-only change).
Julian Seward [Tue, 19 Apr 2005 23:06:11 +0000 (23:06 +0000)] 
Update comment re PutI/GetI (comment-only change).

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

20 years agoComplete implementation of pslldq/psrldq. Also some whitespace changes.
Julian Seward [Thu, 7 Apr 2005 17:31:27 +0000 (17:31 +0000)] 
Complete implementation of pslldq/psrldq.  Also some whitespace changes.

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

20 years agoHandle bsr{w,l,q} and allow bsfq.
Julian Seward [Thu, 7 Apr 2005 02:03:52 +0000 (02:03 +0000)] 
Handle bsr{w,l,q} and allow bsfq.

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

20 years agoFix comment.
Julian Seward [Thu, 7 Apr 2005 02:02:23 +0000 (02:02 +0000)] 
Fix comment.

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

20 years agoFix a nasty assembler bug, in the handling of Set64, arising from
Julian Seward [Thu, 7 Apr 2005 02:01:23 +0000 (02:01 +0000)] 
Fix a nasty assembler bug, in the handling of Set64, arising from
confusion over whether we were looking at a complete integer register
number or just the lower 3 bits of it.  Rename functions pertaining to
messing with integer register numbers in an attempt to stop this
happening in future.

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

20 years agoReinstate tests for bsf{w,l} and bsr{w,l}.
Julian Seward [Thu, 7 Apr 2005 01:56:21 +0000 (01:56 +0000)] 
Reinstate tests for bsf{w,l} and bsr{w,l}.

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

20 years agoMore AMD64 instructions: sfence, movnti, bsf{w,l,q}
Julian Seward [Wed, 6 Apr 2005 20:01:56 +0000 (20:01 +0000)] 
More AMD64 instructions: sfence, movnti, bsf{w,l,q}

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

20 years agoComment-only changes
Julian Seward [Wed, 6 Apr 2005 10:27:11 +0000 (10:27 +0000)] 
Comment-only changes

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

20 years agoAs per r1121, avoid WaW stalls writing the guest state for movss mem->reg.
Julian Seward [Wed, 6 Apr 2005 01:45:44 +0000 (01:45 +0000)] 
As per r1121, avoid WaW stalls writing the guest state for movss mem->reg.

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

20 years agoiselIntExpr64(const): save a precious register in the case where
Julian Seward [Wed, 6 Apr 2005 01:11:53 +0000 (01:11 +0000)] 
iselIntExpr64(const): save a precious register in the case where
the two halves have the same value.

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

20 years agoWhen generating IR for movsd mem->reg, don't first write the entire
Julian Seward [Wed, 6 Apr 2005 01:11:08 +0000 (01:11 +0000)] 
When generating IR for movsd mem->reg, don't first write the entire
guest reg with zeroes and then overwrite the lower half.  This forces
the back end to generate code which creates huge write-after-write
stalls in the memory system of P4s due to the different sized writes.
This apparently small change reduces the run-time of one
sse2-intensive floating point program from 145 seconds to 90 seconds
(--tool=none).

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

20 years agoAdd a pattern for 64UtoV128(LDle:I64(addr)), so as to generate a
Julian Seward [Wed, 6 Apr 2005 00:47:01 +0000 (00:47 +0000)] 
Add a pattern for 64UtoV128(LDle:I64(addr)), so as to generate a
single movsd.  This fixes a common, poorly handed case in generating
sse2 code.

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

20 years agoWhenever the flags thunk is set, fill in all the fields, even NDEP
Julian Seward [Tue, 5 Apr 2005 01:54:19 +0000 (01:54 +0000)] 
Whenever the flags thunk is set, fill in all the fields, even NDEP
which isn't usually used.  This makes redundant-PUT elimination work
better, fixing a rather subtle optimisation bug.  For at least one
floating-point case this gives a significant speedup.  Consider a bb
like this:

    (no flag setting insns before inc)
    inc ...
    (no flag setting insns)
    add ...

inc sets CC_OP, CC_DEP1 and CC_NDEP; the latter is expensive because a
call to calculate_eflags_c is required.

add sets CC_OP, CC_DEP1 and CC_DEP2.  The CC_NDEP value is now
irrelevant, but because CC_NDEP is not overwritten, iropt cannot
remove the previous assignment to it, and so the expensive helper call
remains even though it is irrelevant.

This commit fixes that: By always setting NDEP to zero whenever its
value will be unused, any previous assignment to it will be removed by
iropt.

This change should be propagated to the amd64 front end too.

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

20 years ago#include <rude_words.h>. The recent change of denotation of no-op IR
Julian Seward [Mon, 4 Apr 2005 23:12:54 +0000 (23:12 +0000)] 
#include <rude_words.h>.  The recent change of denotation of no-op IR
statements from NULL to IRStmt_NoOp screwed up the how-much-to-unroll
heuristics in iropt, resulting in iropt being significantly less
enthusiastic about unrolling than it was before the change.  Gaaah!
This commit should fix it.

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

20 years agoReinstate ADC Iv, eAX.
Julian Seward [Sun, 3 Apr 2005 14:59:54 +0000 (14:59 +0000)] 
Reinstate ADC Iv, eAX.

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

20 years agoRemember to clear C2 after fsincos, as that actually makes it work
Julian Seward [Fri, 1 Apr 2005 20:19:20 +0000 (20:19 +0000)] 
Remember to clear C2 after fsincos, as that actually makes it work
right with reasonable-sized inputs.  This confirms fsincos as the
golden lemon of x87 floating point instructions, since Vex has by now
chomped through vast amounts of floating point code on x86 and this is
the first time this bug has come to light.

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

20 years agoSupport a few more insns I ran across whilst trying to start up
Julian Seward [Wed, 30 Mar 2005 23:20:47 +0000 (23:20 +0000)] 
Support a few more insns I ran across whilst trying to start up
konqueror (mostly successfully) and mozilla (promising but
unsuccessful).

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

20 years agoAdd a folding rule for Mul64.
Julian Seward [Wed, 30 Mar 2005 23:19:46 +0000 (23:19 +0000)] 
Add a folding rule for Mul64.

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

20 years agoGenerate instruction-pointer offsets too.
Julian Seward [Wed, 30 Mar 2005 18:40:23 +0000 (18:40 +0000)] 
Generate instruction-pointer offsets too.

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

20 years agoRe-enable 'xchg reg, mem'.
Julian Seward [Wed, 30 Mar 2005 18:20:48 +0000 (18:20 +0000)] 
Re-enable 'xchg reg, mem'.

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

20 years agoUse cpp symbol __x86_64__ rather than __amd64__ on the advice of
Julian Seward [Tue, 29 Mar 2005 21:35:08 +0000 (21:35 +0000)] 
Use cpp symbol __x86_64__ rather than __amd64__ on the advice of
Michael Matz.

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

20 years agoFix incorrect DIP.
Julian Seward [Tue, 29 Mar 2005 21:33:11 +0000 (21:33 +0000)] 
Fix incorrect DIP.

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

20 years agoIncrease default max bb size from 50 to 60 guest instructions.
Julian Seward [Tue, 29 Mar 2005 21:32:41 +0000 (21:32 +0000)] 
Increase default max bb size from 50 to 60 guest instructions.

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

20 years agomore icc -Wall cleanups
Julian Seward [Mon, 28 Mar 2005 00:46:27 +0000 (00:46 +0000)] 
more icc -Wall cleanups

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

20 years agoHandle Grp8 w/immediate arg.
Julian Seward [Sun, 27 Mar 2005 17:59:45 +0000 (17:59 +0000)] 
Handle Grp8 w/immediate arg.

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

20 years agoFix a stupid bug causing FP instructions to sometimes be ignored, and
Julian Seward [Sun, 27 Mar 2005 17:36:08 +0000 (17:36 +0000)] 
Fix a stupid bug causing FP instructions to sometimes be ignored, and
fill in various missing cases.

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

20 years agoImplement yet more amd64 instructions.
Julian Seward [Sun, 27 Mar 2005 05:08:32 +0000 (05:08 +0000)] 
Implement yet more amd64 instructions.

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

20 years agoRe-enable a couple of SSE MOVQ cases.
Julian Seward [Sun, 27 Mar 2005 04:48:32 +0000 (04:48 +0000)] 
Re-enable a couple of SSE MOVQ cases.

Observe that MOVQ is probably subtly broken on both x86 and amd64 wrt
zeroing out upper halves of destination registers.  This should be
checked out.

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