Commit Graph

171 Commits

Author SHA1 Message Date
Julian Seward
ddd4dcdcde Make a start on the intermediate-representation optimiser.
git-svn-id: svn://svn.valgrind.org/vex/trunk@171
2004-08-17 13:31:55 +00:00
Julian Seward
401af9b34a Increase size of temp area to 100k to handle some really useless
code generation of long BBs.


git-svn-id: svn://svn.valgrind.org/vex/trunk@170
2004-08-16 21:59:34 +00:00
Julian Seward
f4f7d817e1 Fix stupid bug caused by introduction of new FP state.
git-svn-id: svn://svn.valgrind.org/vex/trunk@169
2004-08-16 21:40:49 +00:00
Julian Seward
6101194d5f More FPU stuff.
git-svn-id: svn://svn.valgrind.org/vex/trunk@168
2004-08-15 03:12:41 +00:00
Julian Seward
0755c154c1 More x86 FP stuff, including conversion stuff to/from Ints.
git-svn-id: svn://svn.valgrind.org/vex/trunk@167
2004-08-14 11:50:01 +00:00
Julian Seward
d6f603b8b4 Fix enough stuff to get the first x86 FP instruction through the
pipeline.



git-svn-id: svn://svn.valgrind.org/vex/trunk@166
2004-08-13 00:18:58 +00:00
Julian Seward
b00968b577 Lots of spadework for getting x86 floating point to work.
git-svn-id: svn://svn.valgrind.org/vex/trunk@165
2004-08-12 20:46:53 +00:00
Julian Seward
0046704677 calculate_eflags_all: fix stupid bug in CC_OP_COPY.
git-svn-id: svn://svn.valgrind.org/vex/trunk@164
2004-07-31 20:40:23 +00:00
Julian Seward
001469740e Fix up generation of shldl/shldr instructions, and thereby
unbreak implementation of Shr64 for x86 targets.


git-svn-id: svn://svn.valgrind.org/vex/trunk@163
2004-07-30 16:17:28 +00:00
Julian Seward
654e5d7ee0 Fix silly error in instruction selection of Iop_DivModS64to32
and Iop_DivModU64to32.



git-svn-id: svn://svn.valgrind.org/vex/trunk@162
2004-07-30 14:08:17 +00:00
Julian Seward
476bce8da3 Finally finish pissing around with x86 integer multiply instructions.
The amount of random illogical crap in the x86 instruction set is just
mind-numbing.  Anyway, 8/16/32-bit multiply and multiply longs should
now work correctly, including setting the flags.



git-svn-id: svn://svn.valgrind.org/vex/trunk@161
2004-07-30 10:17:50 +00:00
Julian Seward
42b522cf9b Rehash handling of multiply insns in the x86 front end, so as to make
the flags work right.



git-svn-id: svn://svn.valgrind.org/vex/trunk@160
2004-07-30 01:52:45 +00:00
Julian Seward
96a469f190 Change the x86 front end's implementation of shift instructions so
that 16/8 bit shifts by amounts up to 31 work correctly, and without
requiring any IR-level shifts beyond the word size.



git-svn-id: svn://svn.valgrind.org/vex/trunk@159
2004-07-29 23:41:47 +00:00
Julian Seward
7f5121f3ce * Fix flag computation for neg instructions
* Fix flag and result computation for 16/8-bit shl/shr/sar by amounts
  greater than the word size, which inconveniently is a well-defined
  (if useless) operation on x86.  Sigh.  Unfortunately the solution
  depends on IR shifts behaving as per x86, whereas it would be better
  to define IR shifts only to make sense for values in 0 .. 2^word_size-1.
  This needs to be fixed.

* Implement another shrd case.  shrdl doesn't work correctly 
  according to the QEMU test suite.  I don't know why.



git-svn-id: svn://svn.valgrind.org/vex/trunk@158
2004-07-29 22:26:03 +00:00
Julian Seward
83c70e60e2 Fix carry flag computation for left rotates.
git-svn-id: svn://svn.valgrind.org/vex/trunk@157
2004-07-29 22:22:31 +00:00
Julian Seward
121b045749 Comment-only change
git-svn-id: svn://svn.valgrind.org/vex/trunk@156
2004-07-29 22:21:31 +00:00
Julian Seward
9511754a3b Fill in many more cases thrown up the QEMU test program.
git-svn-id: svn://svn.valgrind.org/vex/trunk@155
2004-07-29 20:31:09 +00:00
Julian Seward
a280d1b89c Fill in / fix many x86->IR->x86 cases exposed by QEMU's test-i386 program.
git-svn-id: svn://svn.valgrind.org/vex/trunk@154
2004-07-29 14:36:40 +00:00
Julian Seward
cac63d9c74 Add enough more x86 integer stuff to make bzip2 and gzip work.
git-svn-id: svn://svn.valgrind.org/vex/trunk@153
2004-07-29 01:40:11 +00:00
Julian Seward
b19d890468 Fix enough integer stuff to make bzip2 work, except for the
floating point bits.


git-svn-id: svn://svn.valgrind.org/vex/trunk@152
2004-07-29 00:09:58 +00:00
Julian Seward
b86a6aacf3 Pretty it up a bit (whitespace changes only).
git-svn-id: svn://svn.valgrind.org/vex/trunk@151
2004-07-28 23:25:02 +00:00
Julian Seward
468a43e58d Implement ROL/ROR and fix enough stuff to make ls -l work.
git-svn-id: svn://svn.valgrind.org/vex/trunk@150
2004-07-28 17:09:04 +00:00
Julian Seward
20c06d25ed Fill in misc cases.
git-svn-id: svn://svn.valgrind.org/vex/trunk@149
2004-07-28 07:13:38 +00:00
Julian Seward
985a06f874 Fix bug in allocation of vregs for 64-bit IRTemps.
git-svn-id: svn://svn.valgrind.org/vex/trunk@148
2004-07-28 07:12:30 +00:00
Julian Seward
9e7b3bfd23 Fill in some add with carry and subtract with borrow cases.
git-svn-id: svn://svn.valgrind.org/vex/trunk@147
2004-07-28 07:11:32 +00:00
Julian Seward
3b377ccb8f Further refine debug printing.
git-svn-id: svn://svn.valgrind.org/vex/trunk@146
2004-07-28 07:09:58 +00:00
Julian Seward
d9e2c9f867 Improve verbosity control, so that verbosity can be set individually
for each bb translated.  Exploit this in vg_translate.c.


git-svn-id: svn://svn.valgrind.org/vex/trunk@145
2004-07-28 01:51:10 +00:00
Julian Seward
741f7e0eec Add LOGICL.
git-svn-id: svn://svn.valgrind.org/vex/trunk@144
2004-07-28 01:50:05 +00:00
Julian Seward
0a83b6677d Oops. Fix silly bug in iselCondCode.
git-svn-id: svn://svn.valgrind.org/vex/trunk@143
2004-07-28 01:49:14 +00:00
Julian Seward
d80b595b1a Fix a couple more cases.
git-svn-id: svn://svn.valgrind.org/vex/trunk@142
2004-07-28 01:48:34 +00:00
Julian Seward
5d244298e0 Fix enough stuff so that 'hello world' works.
git-svn-id: svn://svn.valgrind.org/vex/trunk@141
2004-07-28 00:15:44 +00:00
Julian Seward
3d6c8f2ea6 Track file renaming.
git-svn-id: svn://svn.valgrind.org/vex/trunk@140
2004-07-27 10:54:21 +00:00
Julian Seward
7675725cb8 Fix bug in generation of immediate shifts.
git-svn-id: svn://svn.valgrind.org/vex/trunk@139
2004-07-27 10:50:38 +00:00
Julian Seward
bc9861ae93 More build fixes.
git-svn-id: svn://svn.valgrind.org/vex/trunk@138
2004-07-27 10:43:34 +00:00
Julian Seward
30c9d9a878 Make compilation work again after renaming files.
git-svn-id: svn://svn.valgrind.org/vex/trunk@137
2004-07-27 10:29:41 +00:00
Julian Seward
07c6141395 More file renaming (still borked)
git-svn-id: svn://svn.valgrind.org/vex/trunk@136
2004-07-27 09:50:39 +00:00
Julian Seward
0f4b52f315 Rename some files.
git-svn-id: svn://svn.valgrind.org/vex/trunk@135
2004-07-27 09:42:46 +00:00
Julian Seward
490a8f90a9 Reinstate the "xor %reg,%reg" idiom handler.
git-svn-id: svn://svn.valgrind.org/vex/trunk@134
2004-07-27 09:30:31 +00:00
Julian Seward
6e93128618 x86toIR: implement 'rep scas'
git-svn-id: svn://svn.valgrind.org/vex/trunk@133
2004-07-27 00:15:59 +00:00
Julian Seward
cedfe3cbd2 Print vex storage stats at the end.
git-svn-id: svn://svn.valgrind.org/vex/trunk@132
2004-07-26 23:31:15 +00:00
Julian Seward
12845e890c Improve insn selection for shifts by literal amounts.
git-svn-id: svn://svn.valgrind.org/vex/trunk@131
2004-07-26 23:27:08 +00:00
Julian Seward
282c0efa61 Fix enough bits and pieces so "int main (void) { return 0; }" works.
git-svn-id: svn://svn.valgrind.org/vex/trunk@130
2004-07-26 22:39:11 +00:00
Julian Seward
aeddaca2ff Try and print a bit faster.
git-svn-id: svn://svn.valgrind.org/vex/trunk@129
2004-07-26 02:05:49 +00:00
Julian Seward
04fc72110e Startup delay and debug printing wibbles.
git-svn-id: svn://svn.valgrind.org/vex/trunk@128
2004-07-26 02:05:26 +00:00
Julian Seward
52702e3b6f Fix bug in assembly of shifts.
git-svn-id: svn://svn.valgrind.org/vex/trunk@127
2004-07-26 02:04:54 +00:00
Julian Seward
642e9fce89 Fill in a few more thunks cases.
git-svn-id: svn://svn.valgrind.org/vex/trunk@126
2004-07-25 23:39:13 +00:00
Julian Seward
50647cc68d Fix startup stuff a bit.
git-svn-id: svn://svn.valgrind.org/vex/trunk@125
2004-07-25 23:37:53 +00:00
Julian Seward
f74088b1b6 More eflags thunks.
git-svn-id: svn://svn.valgrind.org/vex/trunk@124
2004-07-25 18:18:03 +00:00
Julian Seward
be98732297 More helpers.
git-svn-id: svn://svn.valgrind.org/vex/trunk@123
2004-07-25 18:00:18 +00:00
Julian Seward
b5adf8b182 Make --stop-after= work.
git-svn-id: svn://svn.valgrind.org/vex/trunk@122
2004-07-25 17:26:40 +00:00