Commit Graph

90 Commits

Author SHA1 Message Date
Julian Seward
d64a131f0f Mucho x86 instruction selector hacking.
git-svn-id: svn://svn.valgrind.org/vex/trunk@90
2004-07-16 21:03:45 +00:00
Julian Seward
5bca5080f6 setFlags_DSTus_DST1: generate well-typed IR for Mux10 arms
git-svn-id: svn://svn.valgrind.org/vex/trunk@89
2004-07-15 18:18:47 +00:00
Julian Seward
ba6f80475c Get rid of guards on IR Puts, and instead have an IR Mux expression.
Adjust everything else accordingly.



git-svn-id: svn://svn.valgrind.org/vex/trunk@88
2004-07-15 12:39:03 +00:00
Julian Seward
bfb442688a Further improvements to the IR sanity checker.
Use these to fix various bugs found in x86->IR.


git-svn-id: svn://svn.valgrind.org/vex/trunk@87
2004-07-15 09:38:27 +00:00
Julian Seward
8d1868fedb Complete the IR sanity checker -- at least up to the point where
it can typecheck the IR.


git-svn-id: svn://svn.valgrind.org/vex/trunk@86
2004-07-15 03:54:23 +00:00
Julian Seward
7559c79ca8 First part of IR sanity checking: def/use checks.
git-svn-id: svn://svn.valgrind.org/vex/trunk@85
2004-07-14 22:36:10 +00:00
Julian Seward
0b8b72a88a Rationalise IR a bit:
* remove IR next, it was not needed.
* change the IRTemp -> IRType env so it can be directly indexed
  for speed.


git-svn-id: svn://svn.valgrind.org/vex/trunk@84
2004-07-14 18:24:17 +00:00
Julian Seward
a9337368cd x86toIR: SHLD/SHRD
git-svn-id: svn://svn.valgrind.org/vex/trunk@83
2004-07-14 13:18:05 +00:00
Julian Seward
7a93b37641 x86toIR: add support for add with carry
git-svn-id: svn://svn.valgrind.org/vex/trunk@82
2004-07-14 02:46:52 +00:00
Julian Seward
84582762e5 x86toIR: reorganise multiply stuff, and make a start on division stuff
git-svn-id: svn://svn.valgrind.org/vex/trunk@81
2004-07-14 01:39:17 +00:00
Julian Seward
a2b254f597 Compilation fixes for older compilers.
git-svn-id: svn://svn.valgrind.org/vex/trunk@80
2004-07-13 18:47:18 +00:00
Julian Seward
7e20fc8cb9 x86toIR: some multiply stuff
git-svn-id: svn://svn.valgrind.org/vex/trunk@79
2004-07-13 18:42:17 +00:00
Julian Seward
9fa4902dc4 Rationalise IR-level control flow:
* Remove CJump01.  All conditional jumping is now done
  using the IRStmt_Exit mechanism.
* This means IRNext can only represent unconditional jumps.
  All IRNexts to have a jump-kind field.


git-svn-id: svn://svn.valgrind.org/vex/trunk@78
2004-07-12 22:49:27 +00:00
Julian Seward
bf21bd3258 x86toIR: rep-prefixed insns
git-svn-id: svn://svn.valgrind.org/vex/trunk@77
2004-07-12 14:00:46 +00:00
Julian Seward
744b6d6d49 Finish first pass through x86toIR.c, enough to handle most bbs
of "int main ( void ) { return 0; }".  Many more difficult isns
are missing -- rep-prefixes, multiplies, adc, misc others.



git-svn-id: svn://svn.valgrind.org/vex/trunk@76
2004-07-12 08:18:16 +00:00
Julian Seward
136f625770 Yet more x86 to IR cases. Now more than 1000 bbs go through.
git-svn-id: svn://svn.valgrind.org/vex/trunk@75
2004-07-12 01:03:26 +00:00
Julian Seward
6cf35ae736 More x86toIR cases.
Change the type of disAMode so the returned value is assigned
to a temporary, which can be used multiple times without
duplicating work / risking incorrectness.


git-svn-id: svn://svn.valgrind.org/vex/trunk@74
2004-07-11 16:53:24 +00:00
Julian Seward
3b12a4b3d2 Yet more x86toIR cases, including set<cond> insn.
git-svn-id: svn://svn.valgrind.org/vex/trunk@73
2004-07-11 13:28:24 +00:00
Julian Seward
4815ed72de More cases, including inc and dec, and rationalising flag-setting logic.
git-svn-id: svn://svn.valgrind.org/vex/trunk@72
2004-07-11 02:37:54 +00:00
Julian Seward
c6f823f735 Yet more cases in x86toIR.
git-svn-id: svn://svn.valgrind.org/vex/trunk@71
2004-07-10 22:43:54 +00:00
Julian Seward
20d9655a65 x86toIR: machinery for setting condition codes from shift insns.
git-svn-id: svn://svn.valgrind.org/vex/trunk@70
2004-07-10 19:02:10 +00:00
Julian Seward
b03a3c5d2a More x86 -> IR stuff, including baseline %eflags handling.
git-svn-id: svn://svn.valgrind.org/vex/trunk@69
2004-07-10 12:23:30 +00:00
Julian Seward
9788218844 Add to repo.
git-svn-id: svn://svn.valgrind.org/vex/trunk@68
2004-07-10 12:22:40 +00:00
Julian Seward
1d951e21b8 Commit (I thought it was already was).
git-svn-id: svn://svn.valgrind.org/vex/trunk@67
2004-07-10 12:17:26 +00:00
Julian Seward
6f51e3bd77 A whole bunch more x86 -> IR hacking.
git-svn-id: svn://svn.valgrind.org/vex/trunk@66
2004-07-08 20:25:10 +00:00
Julian Seward
bc2080784c - Mucho x86 to IR hacking.
- Build with Intel icc as it can warn about int-enum mismatches


git-svn-id: svn://svn.valgrind.org/vex/trunk@65
2004-07-08 14:23:22 +00:00
Julian Seward
decd9d2442 More stuff.
git-svn-id: svn://svn.valgrind.org/vex/trunk@64
2004-07-08 01:46:01 +00:00
Julian Seward
cef35bd35b Start to make this work.
git-svn-id: svn://svn.valgrind.org/vex/trunk@63
2004-07-08 01:45:30 +00:00
Julian Seward
466bf09b46 Fill in some cases
git-svn-id: svn://svn.valgrind.org/vex/trunk@62
2004-07-08 01:44:38 +00:00
Julian Seward
c1dc1a3c25 Print PUT in uppercase.
git-svn-id: svn://svn.valgrind.org/vex/trunk@61
2004-07-07 17:57:34 +00:00
Julian Seward
b119a5254a First pass at x86 to IR conversion. Compiles, but nothing works.
git-svn-id: svn://svn.valgrind.org/vex/trunk@60
2004-07-07 16:32:57 +00:00
Julian Seward
2e4ad46371 Enable valgrind checking of vex (ugly hack).
git-svn-id: svn://svn.valgrind.org/vex/trunk@59
2004-07-07 12:00:42 +00:00
Julian Seward
7804d908fb Dump -O.
git-svn-id: svn://svn.valgrind.org/vex/trunk@58
2004-07-07 12:00:04 +00:00
Julian Seward
340921f6f2 fix buglet
git-svn-id: svn://svn.valgrind.org/vex/trunk@57
2004-07-07 11:56:59 +00:00
Julian Seward
5801c3737c fix buglet
git-svn-id: svn://svn.valgrind.org/vex/trunk@56
2004-07-07 11:56:35 +00:00
Julian Seward
d92548c382 Test driver, and test input for "int main ( void ) { return 42; }"
git-svn-id: svn://svn.valgrind.org/vex/trunk@55
2004-07-07 11:55:36 +00:00
Julian Seward
7f9edc962f - Pass host-specific insn and register printing functions to
the register allocator, so it can print debug info specific
  to the host.

- Properly propagate some no-return attributes.



git-svn-id: svn://svn.valgrind.org/vex/trunk@54
2004-07-05 20:50:45 +00:00
Julian Seward
358301fa4b Final bits of jit->vex renaming I missed.
git-svn-id: svn://svn.valgrind.org/vex/trunk@53
2004-07-05 17:29:08 +00:00
Julian Seward
eec5e5e1de Rename everything to use the "vex" name.
git-svn-id: svn://svn.valgrind.org/vex/trunk@52
2004-07-05 17:26:47 +00:00
Julian Seward
330a4d82a1 Try and fill in jit_main.c.
git-svn-id: svn://svn.valgrind.org/vex/trunk@51
2004-07-05 17:10:14 +00:00
Julian Seward
418f8e71e6 - Make stuff link.
- Simple test program to establish how fast memory can be pulled
  out of the allocation pool.



git-svn-id: svn://svn.valgrind.org/vex/trunk@50
2004-07-05 14:39:15 +00:00
Julian Seward
8bb110c3d4 Major hashing around to restructure the world.
git-svn-id: svn://svn.valgrind.org/vex/trunk@49
2004-07-05 13:12:34 +00:00
Julian Seward
1ffd102b8c Mash around top-level library structure some more.
git-svn-id: svn://svn.valgrind.org/vex/trunk@48
2004-07-05 01:15:34 +00:00
Julian Seward
13c3ab567e Start to move files into a new structure.
git-svn-id: svn://svn.valgrind.org/vex/trunk@47
2004-07-04 18:21:14 +00:00
Julian Seward
02fc8e76c4 Track recent reg-alloc changes.
git-svn-id: svn://svn.valgrind.org/vex/trunk@46
2004-07-03 19:52:16 +00:00
Julian Seward
1065db090a * Take into account register classes when assigning spill slots.
* When doing V-V move coalescing, handle case when src is spilt.


git-svn-id: svn://svn.valgrind.org/vex/trunk@45
2004-07-03 19:44:54 +00:00
Julian Seward
87180d0510 * Move the x86 genSpill/genRestore functions to the right place.
* Allow HInstrArray to record the number of vregs in the instrs
  in the array.


git-svn-id: svn://svn.valgrind.org/vex/trunk@44
2004-07-03 19:08:18 +00:00
Julian Seward
ab0fd50714 Test for x86 code generation of shifts, and for vreg coalescing
in reg-alloc.


git-svn-id: svn://svn.valgrind.org/vex/trunk@43
2004-07-03 14:52:19 +00:00
Julian Seward
5bf98b642c Add prototype for isMove_X86Instr.
git-svn-id: svn://svn.valgrind.org/vex/trunk@42
2004-07-03 14:51:44 +00:00
Julian Seward
25bd4ccb0a Implement vreg-vreg move coalescing.
git-svn-id: svn://svn.valgrind.org/vex/trunk@41
2004-07-03 14:50:33 +00:00